 Quandaries and Queries

OF75 PEOPLE, 43 ARE EXPOSED TO A VIRUS AND BECOME ILL. 11 PEOPLE ARE EXPOSED AND DO NOT BECOME ILL. 3 PEOPLE ARE NOT EXPOSED AND BECOME ILL. 18 PEOPLE ARE NOT EXPOSED AND DO NOT BECOME ILL. THE ATTACK RATE IS 80% FOR THOSE EXPOSED AND 14% FOR THOSE NOT EXPOSED. THE RELATIVE RISK IS 5.7. CAN YOU EXPLAIN TO ME HOW TO CALCULATE A CHI SQUARE TEST FROM THIS. I HAVE THE FOLLOWING FORMULA.
-----------------
(a+b)(C+D)(a+c)(b+d)
A=43
B=11
C=D=18
PLEASE CAN YOU HELP URGENTLY. I HAVE AN ASSIGNMENT TO BE HANDED IN AND I AM COMPLETELY LOST.
YOURS GRATEFULLY
GILLIAN

Hi Gillian,

I put the information in a table, called a contingency table.

ill:
yes
ill:
no
total
exposed: yes 43 11 54
exposed: no 3 18 21
total 46 29 75

The four numbers in the body of the table are the observed values that you supplied. I have also included row totals, column totals and an overall total in the lower right position. If the two variables "whether the person was exposed" and "whether the person becomes ill" are independent then you can estimate expected values for the four positions in the table. To calculate the expected value in each ceel multiply the row sum in the row by the column sum in the column and divide by the overall sum. Foe example for the ill=yes exposed=yes cell

54 46/75 = 33.12

and for the ill=no exposed=yes cell

54 29/75 = 20.88

Put the expected values in the table.

ill:
yes
ill:
no
total
exposed: yes 43
33.12
11
20.88
54
exposed: no 3
12.88
18
8.12
21
total 46 29 75

The Chi-squared value is then calculated by summing, for each ceel in the table

(observed value - expected value)2 / (expected value)

thus

Chi-Sq = (43 - 33.12)2/33.12 + (11- 20.88)2/20.88 + (3 - 12.88)2/12.88 + (18 - 8.12)2/8.12

The Chi-Sq number follows the Ch-Squared distribution with the number of degrees of freedom given by

df = (Number of rows -1) (number of columns -1)

In you case this is

df = (2 - 1) (2 - 1) = 1

Penny

Go to Math Central