1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Doing Chi-square independence test in SPSS?

  1. Nov 25, 2016 #1
    1. The problem statement, all variables and given/known data

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

    My H0, there is no connection between people who recieved 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]

    2. Relevant equations


    3. 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
     
  2. jcsd
  3. Nov 25, 2016 #2

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    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?
     
  4. Nov 25, 2016 #3

    andrewkirk

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    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.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted