MathStudio  Blog  Share  Manual  Forums  Support 
Is the normalpdf function providing correct values?
  • I don't know if I am missing something here but the values of the normalpdf function don't look correct. Can someone please help?
    NormalPdf(1,0,1)=0.24197
    Shouldn't the correct value be 0.84134
  • That value is correct. Why are you expecting 0.84134?
    http://www.mathstudio.net/manual/NormalPDF
  • I think you're confusing it with the CDF. This would be 0.84134 if you were integrating from minus large number to 1 with unit variance centred at zero, i.e.

    NormalCdf(-100,1,0,1)

    I notice that

    NormalCdf(-100,1)

    doesn't currently work, although the manual page suggests that it should with default [0,1] for the last two parameters.


    Edit: Indeed I meant minus infinity. I should have put e.g. not i.e. above as there is nothing special about -100. As Stephen confirms below there's negligible density 10 standard errors away from the mean. A value of 100 times the standard error was overkill and in fact 5 would have done the job.
  • Thank you for pointing that out. That is fixed for the next update now.
  • Thanks. I was using the wrong function.
  • I check out the manual but didn't find an explanation for -100. Experimenting -10 does the same result! So I guess -100 is acting as -oo as explained above. I am very grateful for the help. I believe some examples are necessary in the help file. Thanks again.
  • The reason why -10 works as well as -100 is because the function decays very fast, on the order of exp(-x^2/2), so by the time you get to -10 you are looking at exp(-50) which is approximately 10^(-22).

    Stephen

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Login with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

In this Discussion