Page 264 - Statistics II for Dummies
P. 264

248        Part IV: Building Strong Connections with Chi-Square Tests



                                Calculating the test statistic
                                Here are the major steps of how to calculate the Chi-square test statistic for
                                independence (Minitab does these steps for you as well):

                                  1. Subtract the observed cell count from the expected cell count for the
                                    upper-left cell in the table.
                                  2. Square the result from step one to make the number positive.
                                  3. Divide the result from step two by the expected cell count.
                                  4. Repeat this process for all the cells in the table, and add up all the
                                    results to get the Chi-square test statistic.

                                The reason you divide by the expected cell count in the Chi-square test statis-
                                tic is to account for cell-count sizes. If you expect a big cell count, say 100, and
                                are off by only 5 for the observed count of that cell, that difference shouldn’t
                                count as much as if you expected a small cell count (like 10) and the observed
                                cell count was off by 5. Dividing by the expected cell count puts a more fair
                                weight on the differences that go into the Chi-square test statistic.

                                To perform a Chi-square test in Minitab, you have to first enter the raw data
                                (the data on each person) in two columns. The first column contains the
                                values of the first variable in your data set. (For example, if your first variable
                                is gender, go down the first Minitab column entering the gender of each
                                person.) Then enter the data from your second variable in the second column,
                                where each row represents a single person in the data set. (If your second
                                variable is house paint color preference, for example, enter each person’s
                                paint color preference in column two, keeping the data from each person
                                together in each row.) Go to Stat>Tables>Cross-tabulation and Chi-square.
                                Now Minitab needs to know which is your row variable and which is your
                                column variable in your table. On the left-hand side, click on the variable that
                                you want to represent the rows of your two-way table (you may click on the
                                first variable). Click Select, and the variable name appears in the row variable
                                portion of the table on the right. Now find the column variable blank on the
                                right-hand side and click on it. Go to the left-hand side and click on the name
                                of your second variable. Click Select. Then click on the Chi-square button and
                                choose Chi-square analysis by checking the box. If you want the expected cell
                                counts included, check that box also. Then click OK. Finally, click OK again to
                                clear all the windows.

                                Picking through the output
                                The Minitab output for the Chi-square analysis for the gender and house
                                paint color preference example (from Table 14-1) is shown in Figure 14-1. You
                                can pick out quite a few numbers from the output in Figure 14-1 that are espe-
                                cially important. The following three numbers are listed in each cell:










          21_466469-ch14.indd   248                                                                   7/24/09   9:51:30 AM
   259   260   261   262   263   264   265   266   267   268   269