In a classic study of peptic ulcer blood hypos wore determin
Solution
Given that in a classic study of peptic ulcer, blood types were determined for 1655 ulcer patients.
For an independently chosen group of 10000 healthy controls from the same city.
Here we have to test the hypothesis that,
H0 : The two groups ulcer and control are independent.
H1 : The two groups ulcer and control are not independent.
The test statistic for testing H0 and H1 is,
2 = (O - E)2 / E
where O is observed frequency.
and E is the expected frequency.
Given that observed frequencies and from observed we have to calculate some expected frequencies.
The formula for Expected frequencies is,
E = (row total) * (column total) / sample size
sample size = 11655
For 579,
E = (4798 * 1655) / 11655 = 681.31
For 124,
E = (1014 * 1655) / 11655 = 143.99
For 4219,
E = (4798*10000)/11655 = 4116.69
So the complete table for observed frequency and expected frequency is,
degrees of freedom = (R-1)*(C-1)
where R = number of rows = 2
C = number of columns = 4
degrees of freedom = (2-1)*(4-1) = 1 * 3 = 3
Calculate P-value for taking decision is,
P-value =
=chiinv(x , d.f.)
where x is the test statistic value.
d.f. = 3
P-value = 1.29457E-10 = 0.0000
given that alpha = level of significance = 0.01
P-value < alpha
reject H0 at 1% level of signifcance.
Conclusion :
The two groups ulcer and control are not independent.
| blood type | O | A | B | AB | total | 
| ulcer | 911 | 579 | 124 | 41 | 1655 | 
| control | 4578 | 4219 | 890 | 313 | 10000 | 
| total | 5489 | 4798 | 1014 | 354 | 11655 | 


