import scipy.stats as st
st.t.ppf(0.95, df=9)

Output: 1.8331129326536335

As per this, I should get 2.262 with dof = 9.

enter image description here


1 Answer 1


t.ppf is calculating a 1-tail inverse cdf. It looks like you're trying to look up the t-value for p=.95, but the value you are referring to in the table is a 2-tailed value of .95, meaning the one tailed value is 1 - (1-.95)/2 = .975. So

In [104]: st.t.ppf(0.975, df=9)
Out[104]: 2.2621571627409915

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.