We use cookies to track how our visitors are browsing and engaging with our website in order to understand and improve the user experience. Review our Privacy Policy to learn more. What is the Chi-Square Test? Market researchers use the Chi-Square test when they find themselves in one of the following situations: They need to estimate how closely an observed distribution matches an expected distribution.
They need to estimate whether two random variables are independent. There are other Chi-square tests, but these two are the most common. You use a Chi-square test for hypothesis tests about whether your data is as expected. The basic idea behind the test is to compare the observed values in your data to the expected values that you would see if the null hypothesis is true. There are two commonly used Chi-square tests: the Chi-square goodness of fit test and the Chi-square test of independence.
Both tests involve variables that divide your data into categories. As a result, people can be confused about which test to use. The table below compares the two tests. Visit the individual pages for each type of Chi-square test to see examples along with details on assumptions and calculations. Number of categories for first variable minus 1, multiplied by number of categories for second variable minus 1. This is because the assumption of the independence of observations is violated.
In this situation, McNemar's Test is appropriate. The null hypothesis H 0 and alternative hypothesis H 1 of the Chi-Square Test of Independence can be expressed in two different but equivalent ways:. H 0 : "[ Variable 1 ] is independent of [ Variable 2 ]" H 1 : "[ Variable 1 ] is not independent of [ Variable 2 ]". H 0 : "[ Variable 1 ] is not associated with [ Variable 2 ]" H 1 : "[ Variable 1 ] is associated with [ Variable 2 ]".
There are two different ways in which your data may be set up initially. The format of the data will determine how to proceed with running the Chi-Square Test of Independence. At minimum, your data should include two categorical variables represented in columns that will be used in the analysis. The categorical variables must include at least two groups. Your data may be formatted in either of the following ways:. An example of using the chi-square test for this type of data can be found in the Weighting Cases tutorial.
Recall that the Crosstabs procedure creates a contingency table or two-way table , which summarizes the distribution of two categorical variables. A Row s : One or more variables to use in the rows of the crosstab s. You must enter at least one Row variable.
B Column s : One or more variables to use in the columns of the crosstab s. You must enter at least one Column variable.
Also note that if you specify one row variable and two or more column variables, SPSS will print crosstabs for each pairing of the row variable with the column variables. The same is true if you have one column variable and two or more row variables, or if you have multiple row and column variables.
A chi-square test will be produced for each table. Additionally, if you include a layer variable, chi-square tests will be run for each pair of row and column variables within each level of the layer variable. C Layer: An optional "stratification" variable. If you have turned on the chi-square test results and have specified a layer variable, SPSS will subset the data with respect to the categories of the layer variable, then run chi-square tests between the row and column variables.
This is not equivalent to testing for a three-way association, or testing for an association between the row and column variable after controlling for the layer variable. D Statistics: Opens the Crosstabs: Statistics window, which contains fifteen different inferential statistics for comparing categorical variables. E Cells: Opens the Crosstabs: Cell Display window, which controls which output is displayed in each cell of the crosstab.
Note: in a crosstab, the cells are the inner sections of the table. They show the number of observations for a given combination of the row and column categories. There are three options in this window that are useful but optional when performing a Chi-Square Test of Independence:. This option is enabled by default. F Format: Opens the Crosstabs: Table Format window, which specifies how the rows of the table are sorted.
In the sample dataset, respondents were asked their gender and whether or not they were a cigarette smoker. There were three answer choices: Nonsmoker, Past smoker, and Current smoker. Therefore, a chi-square test is an excellent choice to help us better understand and interpret the relationship between our two categorical variables.
To perform a chi-square exploring the statistical significance of the relationship between s2q10 and s1truan , select Analyze , Descriptive Statistics , and then Crosstabs.
Find s2q10 in the variable list on the left, and move it to the Row s box. Find s1truan in the variable list on the left, and move it to the Column s box. Click Statistics , and select Chi-square. Click Continue and then OK to run the analysis. Your output should look like the table on the right. Take a look at the column on the far right of this output table. This means that the relationship between Year 11 truancy and enrolment in full time education after secondary school is significant.
Running a chi-square test cannot tell you anything about a causal relationship between truancy and later educational enrolment. Before we use s1q62a , we should check its frequencies to make sure the data is ready for bivariate analysis.
0コメント