In: Statistics and Probability
3) Suppose we are interested in comparing the effectiveness of two different antibiotics, A and B, in treating gonorrhea. Each person receiving antibiotic A is matched with an equivalent person (age within 5 years, same sex), to whom antibiotic B is given. These people are asked to return to the clinic within 1 week to see if the gonorrhea has been eliminated. Suppose the results are as follows:
1) For 40 pairs of people, both antibiotics are successful.
2) For 20 pairs of people, antibiotic A is effective whereas antibiotic B is not.
3) For 16 pairs of people, antibiotic B is effective whereas antibiotic A is not.
4) For 3 pairs of people, neither antibiotic is effective.
a) The null and alternative hypotheses are:
H0: Two antibiotics are independent
Ha: Two antibiotics are dependent.
-----------------------------------------------------------------------------------------------
b) We can use chi square test.
Observed | B successful | B is not effective | Total |
A is effective | 40 | 20 | 60 |
A is not effective | 16 | 3 | 19 |
Total | 56 | 23 | 79 |
For expected value, use formula:
Expected values= (row total x column total)/grand total
For example, for first cell, Expected value = 60 * 56/79 = 42.53
Expected | B successful | B is not effective | Total |
A is effective | 42.53 | 17.47 | 60 |
A is not effective | 13.47 | 5.53 | 19 |
Total | 56 | 23 | 79 |
For Chi square contribution, use formula:
Chi square contribution = (O-E)²/E
For example, for first cell, Chi square contribution = (40-42.53)²/42.53 = 0.15
Chi square | B successful | B is not effective | Total |
A is effective | 0.15 | 0.37 | 0.52 |
A is not effective | 0.48 | 1.16 | 1.63 |
Total | 0.63 | 1.53 | 2.15 |
The test statistic is:
There are r=2 rows and c=2 columns. Therefore, degrees of freedom is:
df = (r-1)(c-1) = (2-1)(2-1) = 1
At α = 0.05, the critical value of chi square is 3.841.
Since test statistic = 2.15 is less than critical value, fail to reject null hypothesis. We can conclude that two antibiotics are independent.
-----------------------------------------------------------------------------------------------
c) The percent agreement expected by chance is: