quantiles of a student distribution

P

Pierre

Hello...

Do you know how I can calculate the quantiles of a student
distribution in pyhton ?

Thanks
 
R

Robert Kern


[Please pardon the piggybacking. I have not gotten the original, yet.]

Using scipy:

In [1]: from scipy import stats

In [2]: import numpy as np

In [3]: x = np.linspace(-1.0, 1.0, 21)

In [4]: x
Out[4]:
array([-1. , -0.9, -0.8, -0.7, -0.6, -0.5, -0.4, -0.3, -0.2, -0.1, 0. ,
0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1. ])

In [5]: ndof = 10

In [6]: stats.t.cdf(x, ndof)
Out[6]:
array([ 0.17044657, 0.19463963, 0.22115021, 0.24994379, 0.28092759,
0.3139468 , 0.3487837 , 0.3851603 , 0.4227446 , 0.46116036,
0.5 , 0.53883964, 0.5772554 , 0.6148397 , 0.6512163 ,
0.6860532 , 0.71907241, 0.75005621, 0.77884979, 0.80536037,
0.82955343])


--
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
 
T

Terry Reedy

Pierre said:
Hello...

Do you know how I can calculate the quantiles of a student
distribution in pyhton ?

Try searching the net for 'Python student distribution quantiles'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,197
Messages
2,571,041
Members
47,643
Latest member
ashutoshjha_1101

Latest Threads

Top