Question

I'm trying to generate PDF's (or in this case "discrete PDF's").

I'am trying to use the numpy.random.normal(mu,sigma,size) but the function does not take in consideration if the standard deviation was calculated for 68%, 95% or 99%. The webpage says:

The function has its peak at the mean, and its “spread” increases with the standard deviation (the function reaches 0.607 times its maximum at x + sigma and x - sigma

  1. What does this mean? The function assumes that the standard deviation is at 60,7%?
  2. Is there a function/package that generates a PDF taking in consideration what confidence interval is associated with the standard deviation.

Note: The standard deviation i'm trying to input as argument are actually expanded uncertainties which is why the confidence intervals are needed.

Was it helpful?

Solution

  1. The standard deviation is sigma. I think Bhajun's comment on the question may have cleared up the rest of your confusion on this point.
  2. See here: Alternative for scipy.stats.norm.pdf? You can use scipy.stats.norm.pdf or one of the alternatives to get the values of the normal distribution (as opposed to randomly sampling).
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top