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.8 0, 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.
Code:
>>> from scipy.stats import chisqprob >>> chisqprob(3.84, 1) 0.050043521248705189
Comment