Doing Chi-square independence test in SPSS?

  • Thread starter Thread starter Mathman2013
  • Start date Start date
  • Tags Tags
    Independence Test
Click For Summary
SUMMARY

The discussion focuses on performing a Chi-square independence test using SPSS to analyze the relationship between medication type and patient recovery status. The user calculated an observed Chi-square value of 5.92 with 1 degree of freedom, indicating that the null hypothesis (H0) of no connection between treatment and recovery can be rejected. However, the user encountered discrepancies when obtaining results from SPSS, which may be due to the application of Yates' Continuity Correction, leading to a different Chi-square statistic. The conversation highlights the importance of understanding SPSS's default settings and adjustments in statistical calculations.

PREREQUISITES
  • Understanding of Chi-square tests and their applications
  • Familiarity with SPSS software for statistical analysis
  • Knowledge of null hypothesis formulation and testing
  • Basic statistical concepts such as degrees of freedom and expected values
NEXT STEPS
  • Learn how to perform Chi-square tests in SPSS, including data entry and analysis steps
  • Research Yates' Continuity Correction and its impact on Chi-square results
  • Explore the differences between Chi-square calculations in SPSS and R
  • Study how to interpret SPSS output for Chi-square tests effectively
USEFUL FOR

This discussion is beneficial for statisticians, data analysts, and researchers who are using SPSS for hypothesis testing, particularly those interested in understanding the nuances of Chi-square tests and software-specific adjustments.

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.
\pmatrix{\\\textrm{"""} & \textrm{treatment} & \textrm{New-treatment} \\\textrm{well} &10 &25\\\textrm{not-well} &15 &10 }

I calculate my expected values by hand to be.

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

Homework Equations

The Attempt at a Solution


I calculate my expected values by hand to be.

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

and then my \chi^2 = \frac{(obs-exp)^2}{exp}=5.92 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.
\pmatrix{\\\textrm{"""} & \textrm{treatment} & \textrm{New-treatment} \\\textrm{well} &10 &25\\\textrm{not-well} &15 &10 }

I calculate my expected values by hand to be.

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

Homework Equations

The Attempt at a Solution


I calculate my expected values by hand to be.

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

and then my \chi^2 = \frac{(obs-exp)^2}{exp}=5.92 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.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 28 ·
Replies
28
Views
2K
  • · Replies 23 ·
Replies
23
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 6 ·
Replies
6
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K