Doing Chi-square independence test in SPSS?

  • Thread starter Thread starter Mathman2013
  • Start date Start date
  • Tags Tags
    Independence Test
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 2K views
Mathman2013
Messages
23
Reaction score
1

Homework Statement



Hi there I have problem I hope some can help me solve.

My H0, there is no connection between people who received the new and old medication? And them getting well or not well.

I suppose to test the following data using Chi-square test in SPSS.
[tex]\pmatrix{\\\textrm{"""} & \textrm{treatment} & \textrm{New-treatment} \\\textrm{well} &10 &25\\\textrm{not-well} &15 &10 }[/tex]

I calculate my expected values by hand to be.

[tex]\pmatrix{\\\textrm{"""} & \textrm{treatment} & \textrm{New-treatment} \\\textrm{well} &14.58 &20.41\\\textrm{not-well} &10.42 &14.59 }[/tex]

Homework Equations

The Attempt at a Solution


I calculate my expected values by hand to be.

[tex]\pmatrix{\\\textrm{"""} & \textrm{treatment} & \textrm{New-treatment} \\\textrm{well} &14.58 &20.41\\\textrm{not-well} &10.42 &14.59 }[/tex]

and then my [tex]\chi^2 = \frac{(obs-exp)^2}{exp}=5.92[/tex] and with df = 1 and using a s-level of 0.05 and looking up in a chi-square table I get critical value of 3.84. And since 5.92>3.84, then my H0 fails.

But my question: How do I get a simular result in SPSS?

If I insert my data in data-mode and choose crosstabs and chi-square test, then I get a chi-value of only by my degree of freedom is correct.

So any idear? Or hints to a guide I can learn to get the proper result?

P.s. this is not homework, but for my own better understanding of SPSS.

cheers

MF
 
Physics news on Phys.org
Mathman2013 said:

Homework Statement



Hi there I have problem I hope some can help me solve.

My H0, there is no connection between people who received the new and old medication? And them getting well or not well.

I suppose to test the following data using Chi-square test in SPSS.
[tex]\pmatrix{\\\textrm{"""} & \textrm{treatment} & \textrm{New-treatment} \\\textrm{well} &10 &25\\\textrm{not-well} &15 &10 }[/tex]

I calculate my expected values by hand to be.

[tex]\pmatrix{\\\textrm{"""} & \textrm{treatment} & \textrm{New-treatment} \\\textrm{well} &14.58 &20.41\\\textrm{not-well} &10.42 &14.59 }[/tex]

Homework Equations

The Attempt at a Solution


I calculate my expected values by hand to be.

[tex]\pmatrix{\\\textrm{"""} & \textrm{treatment} & \textrm{New-treatment} \\\textrm{well} &14.58 &20.41\\\textrm{not-well} &10.42 &14.59 }[/tex]

and then my [tex]\chi^2 = \frac{(obs-exp)^2}{exp}=5.92[/tex] and with df = 1 and using a s-level of 0.05 and looking up in a chi-square table I get critical value of 3.84. And since 5.92>3.84, then my H0 fails.

But my question: How do I get a simular result in SPSS?

If I insert my data in data-mode and choose crosstabs and chi-square test, then I get a chi-value of only by my degree of freedom is correct.

So any idear? Or hints to a guide I can learn to get the proper result?

P.s. this is not homework, but for my own better understanding of SPSS.

cheers

MF

What does the sentence "... then I get a chi-value of only by my degree of freedom is correct." I cannot figure out what you are tying to say. In plain English: what value of chi-square does SPSS produce? Do you and SPSS both use the same number of degrees of freedom?
 
Mathman2013 said:
So any idea? Or hints to a guide I can learn to get the proper result?
I think it is very likely that the difference between your chi-square statistic and the one produced by SPSS is that SPSS applies Yates' Continuity Correction, which involves adjusting the residuals by an addition or subtraction of 0.5. You can read about the correction, the exact formula for the corrected statistic, and why it is done here.

I don't use SPSS, so I can't be sure what it does, but I use R, which applies the continuity correction and hence gets a different chi-square statistic from the one obtained from the standard formula you quote.

The chi-square statistic produced from your data by R, using the continuity correction, is 4.7. If that is what SPSS gives you then you can be confident that the continuity correction is the reason for the difference.