Chi square test Ch16

Discussion in 'SP8' started by Snowy, Jun 27, 2010.

  1. Snowy

    Snowy Member

    Does the order in which we subtract the scaled deviances and degrees of freedom between 2 models matter? eg. Model 1-Model 2 for both calculations.

    The example questions suggest not, but the notation in the formula suggests an order.

    My stats is a bit rusty, so I can't remember if the order should matter or not.
     
  2. Duncan Brydon

    Duncan Brydon ActEd Tutor Staff Member

    Hi

    Suppose model X has d(X) degrees of freedom and scaled deviance D(X) and model Y has d(Y) degrees of freedom and scaled deviance D(Y). If d(Y) exceeds d(X) then subtract D(X) from D(Y) and use a chi-squared distribution with d(Y)-d(X) degrees of freedom. I hope this helps.

    Can you point me to the examples that you were concerned about?

    Thanks
    Duncan
     
    Last edited: Jul 11, 2010
  3. Snowy

    Snowy Member

    Hi,
    Thanks for your reply.

    I was looking at the questions in the notes 16.6 and 16.7.
    The revised models seem to have the higher degrees of freedom.

    So I was wondering if there will be a change in the critical region/hypotheses if the revised model had a smaller number of degrees of freedom, and the subtraction was done the other way around.

    Will this be any different?
     
  4. Duncan Brydon

    Duncan Brydon ActEd Tutor Staff Member

    The order of subtraction for the test in the notes is determined by which model has more degrees of freedom. In the Core Reading, model 1 is the one with more degrees of freedom. We don’t need to label one model the “initial model” and one the “revised model”. In terms of getting the order right, what matters is which has more degrees of freedom. If this comes up, follow the guidance in my previous post.

    I hope this is helpful.
     
    Last edited: Jul 11, 2010
  5. jensen

    jensen Member

    I think the scaled deviance in 16.6 should be swapped around.

    Question 16.7 also looks weird.
     
  6. jensen

    jensen Member

    Sorry, I take it back. Q16.7 is correct, but 16.6 scaled deviance need to be swapped around.
     
  7. WTang

    WTang Member

    Hi Ducan
    I have the same confusion. Could we take a closer look at the course note CH 16, question 16.6?

    What is being done in the question is:
    D1 - D2 = 6.72
    df2 - df1 = 4
    They are in different order.

    The question asks if Model B (2) improves from Model A (1).
    What if, instead they ask: Explain if Model A improves from Model B?
    That's why we got confused about the order of subtracting.

    Could you please explain?

    Thanks a lot.
     
  8. Darren Michaels

    Darren Michaels ActEd Tutor Staff Member

    Hi WTang

    I think you are confusing the number of parameters with the number of degrees of freedom. The greater the number of parameters, the lower the number of degrees of freedom. Since the models are nested, the difference in the number of parameters will be the same as the difference in the number of degrees of freedom.

    Hence in the question as Model B has 4 more parameters than Model A, it has 4 fewer degrees of freedom.

    thus df(A)-df(B)=4

    So you need to compare D(A)-D(B) = 17.80-11.08=6.72 with a chi-squared distribution with 4 degrees of freedom to see if you should reject Model A in favour of Model B.

    By the way, it is probably best if you don't address your forum posts to one particular person as that discourages others from replying.
     
  9. maz1987

    maz1987 Member

    I struggled with this to but have worked it out.

    Suppose model 1 is a nested version of model 2.

    The number of degrees of freedom for a model is actually defined in the notes as "number of observations minus number of parameters". Therefore (assuming the same observations have been used for both models) df1 - df2 = (ob1 - par1) - (ob2 - par2) = par2 - par1, since ob1 and ob2 cancel out.

    This has the effect of swapping the values round and is why it appears that the scaled deviances and degrees of freedom are inconsistent.
     

Share This Page