Q9 Knowledge Base & Cheat Sheet --Two-Way Chi-Square

Bivariate Frequency Distribution Example


Two-way Chi-square

Two-way Chi-square example: The Food Service at a police academy is entertaining the notion that serving healthier food in the chow hall will result in a reduction in cases of the flu virus. At the beginning of the cadet training, 90 cadets were randomly selected from the corps. An experiment was designed wherein some cadets were secretly served a low-sugar, low-fat meals that call for an animal fat substitute manufactured from vegetable protein instead of the traditional meals that utilize beef and poultry products (which typically contain a relatively high-fat content). The participants did not know which diet they were being fed: the low-fat, low-sugar diet or the usual high-fat, high-sugar diet.

Half of the cadets (n = 45, the experimental group) were secretly served meals that consisted of the vegetable protein products disguised as beef and poultry items, and low-sugar desserts. The other half (n = 45, the control group) ate the regular fare, which consisted of high-fat menu items and high-sugar desserts. During Flu season, data were gathered on how many of the 90 cadets caught the flu virus. It was expected there would be a higher instance of flu virus among the poor-diet control group than the healthy-diet experimental group.

A Two-way Chi-Square is calculated by formulating a bivariate frequency distribution showing the results of the experiment like the one presented below. The independent variable is arrayed in columns and the dependent variable in rows.

Then compare percentages across the row as narrated in analysis:

                 Healthy-diet  Poor-diet     Total

   f Flu        15        33          (48)

   % Flu        33%       73%

   f No Flu     30        12          (42)     

   % No Flu     67%       27%             

   Total        (45)      (45)         (90)   

 

Let’s review the process of creating a bivariate frequency distribution:

(1)  Facts:  N = 90 (Where N is the number in the sample)  (N = 15 + 33 + 30 + 12 = 90)

(2)  Set up a table with 6 rows and 4 columns.

(3)  In “Row 1” place the labels as shown for the independent variable

(4)  In “Column 1” place the labels as shown for the dependent variable

(5) Insert the frequencies

 (6) Insert the percentages

(7)  Place the row totals and column totals in parentheses (these are marginals,).

(8) Identify the minimum value in Column 4, the smallest number in Column 4 is E1.

(9) Identify the lowest value in Column 2, and add it to the lowest value in Column 3. This produces E2.

(10) Compute Lambda, the Magnitude of Effect (MOE). λ = (E1   -  E2) / E1

                                                    λ = (42   -  27) / 42

                                                    λ =  15 / 42 = .357

                   

Lambda is the proportional reduction in error. .20 is weak, .40 is moderate, .60 is strong.

 

Theory?  Healthy diet is effective at reducing instances of the flu among cadets at the police academy. (O ≠ E)

 

Null hypothesis?  There is not a statistically significant difference in the number of cadets who caught the flu among those who ate the healthy diet or the unhealthy diet, between the observed count and the expected count of chance alone. (O = E)  (Implication: no difference between the experimental and the control group).

 


The Two-way Chi-Square is calculated exactly the same way as the One-way Chi-square: by summing the squared products of observed count minus the expected count divided by the expected count -- X2obt  =  Sum of (O - E)2/E. Set up a table with 6 Columns and 8 Rows.

 

         Col 1    Col 2     Col 3     Col 4 Col 5    Col 6

 Row 1             Flu            Flu       No Flu   No Flu      Totals

  Labels Healthy   Poor      Healthy     Poor     

Row 2   "O"      15.000    33.000    30.000    12.000 90.000

Row 3   "E"      24.000    24.000          21.000    21.000 90.000

Row 4   (O-E)    -9.000    9.000           9.000    -9.000   

Row 5   (O-E)2   81.000    81.000           81.000   81.000   

Row 6   (O-E)2/E  3.375    3.375    3.857     3.857   

Row 7   X2obt  =  14.464   

Row 8   X2crit  =  3.841                 

 

 Calculate df: (the # rows minus one times the # columns minus one)

   df = (R-1)*(C-1)       df = (2-1)*(2-1)        df =   1  *  1     df = 1

   h.  Consult chart for Chi-square, probability, and df. As always if the obtained Chi-square exceeds the table Chi-square, it is statistically significant.

   X2obt  = 14.464           X2crit  = 3.841

 9.  Results: Reject  X2(1) = 14.464, p. <  .05

Then execute the formula:  λ = (E -  E2)  / E  

                            λ = (42  -  27) /  42 = .357

                                λ = .357

                                λ = 36%

Using diet as a predictor to reduce the number of errors provided a 36% reduction in errors.

     Analysis: The theory is supported. Among the 90 participants in the study, while only 34% of those who ate the healthy diet caught the flu, 73% of those who ate a poor diet caught the Flu. Chi-square analysis of the data revealed that there is a statistically significant difference in the number of flu cases between those who ate healthy and those who did not, therefore, the treatment had the intended effect and the theory is supported. The reduction in error using Lambda as MOE, is 35.7%.