• We are pleased to announce that the winner of our Feedback Prize Draw for the Winter 2024-25 session and winning £150 of gift vouchers is Zhao Liang Tay. Congratulations to Zhao Liang. If you fancy winning £150 worth of gift vouchers (from a major UK store) for the Summer 2025 exam sitting for just a few minutes of your time throughout the session, please see our website at https://www.acted.co.uk/further-info.html?pat=feedback#feedback-prize for more information on how you can make sure your name is included in the draw at the end of the session.
  • Please be advised that the SP1, SP5 and SP7 X1 deadline is the 14th July and not the 17th June as first stated. Please accept out apologies for any confusion caused.

Chi square test Ch16

S

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.
 
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:
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?
 
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:
I think the scaled deviance in 16.6 should be swapped around.

Question 16.7 also looks weird.
 
Sorry, I take it back. Q16.7 is correct, but 16.6 scaled deviance need to be swapped around.
 
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

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.
 
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.
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.
 
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.
 
Back
Top