# Doing Chi-square independence test in SPSS?

• Mathman2013
If not, then we can go back to the drawing board and try to figure out what else is going on.In summary, the difference in chi-square statistics between your manual calculation and SPSS may be due to the use of Yates' Continuity Correction in SPSS.
Mathman2013

## 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 }$$

## 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

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 }$$

## 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.

## 1. What is a Chi-square independence test?

A Chi-square independence test is a statistical method used to determine if there is a relationship between two categorical variables. It is often used to analyze data from surveys or experiments to see if there is a significant association between two variables.

## 2. How do I perform a Chi-square independence test in SPSS?

To perform a Chi-square independence test in SPSS, you first need to open your data set in the program. Then, go to the "Analyze" tab and select "Descriptive Statistics." From there, choose "Crosstabs" and select the two variables you want to analyze. Finally, click on the "Statistics" button and check the box next to "Chi-square" under the "Chi-square tests" option. Click "Continue" and then "OK" to run the test.

## 3. What is the null hypothesis in a Chi-square independence test?

The null hypothesis in a Chi-square independence test is that there is no relationship between the two variables being analyzed. In other words, the two variables are independent of each other and any observed association is due to chance.

## 4. How do I interpret the results of a Chi-square independence test in SPSS?

The results of a Chi-square independence test in SPSS will include a Chi-square value, degrees of freedom, and a p-value. The p-value indicates the probability of obtaining the observed results if the null hypothesis is true. If the p-value is less than 0.05, it is typically considered statistically significant, and the null hypothesis can be rejected. This suggests that there is a relationship between the two variables.

## 5. What are some limitations of a Chi-square independence test?

One limitation of a Chi-square independence test is that it can only determine if there is a relationship between two categorical variables, not the strength or direction of that relationship. Additionally, the test assumes that the data is independent and the sample size is large enough to meet certain criteria. If these assumptions are not met, the results of the test may not be accurate.

• Calculus and Beyond Homework Help
Replies
3
Views
2K
• Calculus and Beyond Homework Help
Replies
14
Views
2K
• Set Theory, Logic, Probability, Statistics
Replies
10
Views
585
• Calculus and Beyond Homework Help
Replies
28
Views
2K
• Set Theory, Logic, Probability, Statistics
Replies
6
Views
927
• Calculus and Beyond Homework Help
Replies
2
Views
2K
• Set Theory, Logic, Probability, Statistics
Replies
8
Views
2K
• Set Theory, Logic, Probability, Statistics
Replies
5
Views
2K
• Calculus and Beyond Homework Help
Replies
21
Views
2K
• Set Theory, Logic, Probability, Statistics
Replies
7
Views
2K