[SciPy-User] [SciPy-dev] Bug/Error with chi-squared distribution and df<1
Bruce Southey
bsouthey at gmail.com
Tue Sep 22 15:02:21 EDT 2009
On 09/22/2009 01:48 PM, Pierre GM wrote:
> On Sep 22, 2009, at 2:27 PM, josef.pktd at gmail.com wrote:
>
>>>>> I'm not an expert on distributions, but as far as I can tell, the
>>>>> chi2
>>>>> distribution is defined for degrees of freedom>0.
>>>>>
> Mmh, could anybody point me to a *real* case where we would have less
> than 1 degree of freedom ?
> Check the definition of the X2 on wikipedia, for example: if k
> variables are iid scaled normal, their sum is X2 w/ k degrees of
> freedom (dfs). Naturally, k, the dfs are integers, and that makes
> quite sense to prevent the use of 0< k< 1. Or returning NaNs instead
> of raising an exception...
>
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
The easy and common one is when using a likelihood ratio test when one
parameter is on a boundary. So when you use the LRT in a mixed effects
model with one random term to test that variance of that term is zero
then, you have to use a 50:50 mixture of chi-squared values at df=0 and
df=1.
The classic paper is:
Self, S. and Liang, K-Y. (1987) Asymptotic Properties of Maximum
Likelihood Estimators
and Likelihood Ratio Tests under Nonstandard Conditions. Journal of the
American
Statistical Association 82, 605-610.
Bruce
More information about the SciPy-User
mailing list