[SciPy-user] using tcdf

David M. Cooke cookedm at physics.mcmaster.ca
Fri Feb 24 16:27:33 CST 2006

Miles Lubin <miles at lubin.us> writes:

> Hi,
> I've looked through the documentation and the help for the stats module, 
> but I haven't be able to find any examples of how to use the cdf 
> function. Let's say I want n degrees of freedom, and want the cumulative 
> probability from the left tail to -x (standard deviations) on a 
> t-distribution, how would I generate it?
> On the TI-83+ there's a simple tcdf() function, but I'm lost on how to 
> do it in scipy.

The distributions in scipy.stats are objects that have methods that
calculate the interesting stuff. In your case, I think you want

scipy.stats.t.cdf(-x, n)

help(scipy.stats.t) will give you more info about what's implemented.

|David M. Cooke                      http://arbutus.physics.mcmaster.ca/dmc/
|cookedm at physics.mcmaster.ca

More information about the SciPy-user mailing list