[Numpy-discussion] Using normal()

Rich Shepard rshepard@appl-ecosys....
Thu Apr 24 12:26:12 CDT 2008

On Thu, 24 Apr 2008, Keith Goodman wrote:

> It's random.normal(loc, scale). But that will give you random x values
> drawn from the normal distribution, not y values at your x. So you'll have
> to code your own normal, which will probably look something like


   I overlooked that, thanks.

> norm = 1 / (scale * sqrt(2 * pi))
> y = norm * exp(-power((x - loc), 2) / (2 * scale**2))

   Can do. So, scale would equate to width and loc to center, yes? It's been
so many years since I've dealt intimately with statistics and mathematics
that I've gotten quite rusty. (However, I still retain what I need to
accomplish a given objective.)

Much appreciated,


Richard B. Shepard, Ph.D.               |  Integrity            Credibility
Applied Ecosystem Services, Inc.        |            Innovation
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863

More information about the Numpy-discussion mailing list