MATLAB Answers

t-test weird degrees of freedom

9 views (last 30 days)
laurie
laurie on 6 Jun 2012
Hi,
I did some t-test (two-tailed) and keeps geting weird degrees of freedom.
I have some pairs of vectors, all of size = [1 144], so n=144 observations for each group
ttest gave me the expected df (142) for some tests, but I also got 139 in another one, and even... 124 in an other one.
What is going on ? Why is the degree of freedom not 142 in all those tests ?
Thank you

  0 Comments

Sign in to comment.

Accepted Answer

Tom Lane
Tom Lane on 6 Jun 2012
I can think of two possibilities. First, if you have any NaN values, they are treated as missing and the df would be reduced accordingly. Second, if you ask for a test based on 'unequal' variances, the df is computed using a Satterthwaite approximation and may be a non-integer.

  1 Comment

laurie
laurie on 6 Jun 2012
thanks ! it was a bit of both actually !

Sign in to comment.

More Answers (0)

Sign in to answer this question.