By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,009 Members | 1,487 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,009 IT Pros & Developers. It's quick & easy.

How to calculate critical value of Chi square distribution in python

P: 1
By using Chi square distribution table it is easy to get chi square distribution value corresponding to degrees of freedom and probability for left side of curve . If we have degrees of freedom=4 and probability=0.80, How to calculate the corresponding value of Chi square distribution to these values in python.In the FOLLOWING example probability is found with python when chi squared sum and degrees of freedom are given.
Expand|Select|Wrap|Line Numbers
  1. >>> from scipy.stats import chisqprob
  2. >>> chisqprob(3.84, 1)
  3. 0.050043521248705189
Jun 18 '15 #1
Share this Question
Share on Google+
1 Reply

P: 1
Expand|Select|Wrap|Line Numbers
  1. >>> from scipy.stats import chi2
  2. >>> chi = chi2.isf(q=0.05, df=1)
  3. >>> chi
  4. 3.8414588206941245
Feb 16 '16 #2

Post your reply

Sign in to post your reply or Sign up for a free account.