[SciPy-user] probability tools in scipy

Thomas Nelson thn@cs.utexas....
Tue Mar 6 16:06:33 CST 2007


Thanks, this is exactly what I needed.

On Tue, 6 Mar 2007, Robert Kern wrote:

> Thomas Nelson wrote:
>> I'm looking for a function something like:
>>
>> normalcdf(lo,hi,mu,sigma)
>> that returns the probability that
>> lo < X < hi
>> where X is a normal random variable with mean = mu and standard deviation
>> = sigma.  Is there something like this, or a tool to make something like
>> this, in scipy?  I looked at the scipy.stats.distributions module, but as
>> far as I can tell that seems to be more of a random number generator.  Am
>> I correct about this?  does scipy have something like the functionality
>> I'm looking for?
>
> from scipy import stats
>
> stats.norm.cdf(hi, mu, sigma) - stats.norm.cdf(lo, mu, sigma)
>
> -- 
> Robert Kern
>
> "I have come to believe that the whole world is an enigma, a harmless enigma
> that is made terrible by our own mad attempt to interpret it as though it had
> an underlying truth."
>  -- Umberto Eco
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>


More information about the SciPy-user mailing list