Chi Square Test for one variable

1.4k Views Asked by At

I got a question about the use of Chi Square test. Let's assume I am conducting a survey. And I have a question: "Have you ever heard of the Internet"?

The possible answers are: "Yes", "No", "Not sure" and I have 3 different age groups for my respondents: "<18", "18

When I want to do a Chi Square test to see if the age factor has an effect, can I just conduct this test on the "Yes" part? Or Do I need to include all the variables?

2

There are 2 best solutions below

1
On

Inorder to use Chi Square test you need to have two variables. In your example these variables are age and use/no use of internet. Hence you have to use 'yes','no,'not sure'.

1
On

It depends on what you want to measure.

You could test whether or not the distribution of "Yes"/"No"/"Not sure" is significantly different from what would occur under the null hypothesis - say, an equal distribution of Y/N/DKs. This is the so-called test for homogeneity use of the $\chi^2$-test.

However, in most cases one uses the $\chi^2$-test to test for independence between two variables. Stochastic independence is defined by $\Pr(A \cap B)=\Pr(A)\Pr(B)$ - this forms our null hypothesis. This directly translates into the expected cell count $E_{xi}$ of the cell xi as the product of the marginal probabilities times the number of observations. The test statistic is then $\sum\frac{(E_{xi}-O_{xi})^2}{E_{xi}}$, which is $\chi^2_k$-distributed with k being the number of rows minus 1 times the number of columns minus 1.