[Numpy-discussion] Normal Distribution With NumPy?

Keith Goodman kwgoodman at gmail.com
Fri Apr 11 12:12:29 EDT 2008


On Fri, Apr 11, 2008 at 9:05 AM, Rich Shepard <rshepard at appl-ecosys.com> wrote:
>    I see in the NumPy Book that there are functions to allow generation of
>  beta, binomial, and poisson curves, but I don't see one for normal curves.
>  Is there such a function?
>
>    Currently I'm using code (I forget from where) that creates a Gaussian
>  distribution, but the tails do not reach zero (within the range of the x
>  axis) unless the inflection point is less than 0.5 on the y axis.
>
>    I'm using PyX to plot the resulting curves and would like to avoid
>  re-inventing the wheel. If there's python code to calculate a normal
>  distribution given the center, width, and inflection point I would
>  appreciate a pointer to the source.

Here's the formula:

http://en.wikipedia.org/wiki/Normal_distribution

If you want the tails to be zero you could do y - y[0].



More information about the NumPy-Discussion mailing list