In: Statistics and Probability
Introduction to Probability and Statistics
Is honey a cough remedy?
Does a teaspoon of honey before bed really calm a child’s cough? To test the folk remedy, pediatric researchers carried out a designed study involving a sample of 105 children who were ill with an upper respiratory tract infection.
On the first night, parents rated their children’s cough symptoms on a scale from 0 (no problems at all) to 30 (extremely severe). On the second night, the parents were instructed to give their sick child a dosage of liquid “medicine” prior to bedtime.
Unknown to the parents,
• a first group: are given a dose of honey.
• a second group: are given a similar dosage of
dextromethorphan (DM), i.e., cough medicine.
• a third group (the control group) gave their sick
children no dosage at all.
Again, the parents rated their children’s cough symptoms, and the improvement in total cough symptoms score was determined for each child. The data (improvement scores) for the study is given below:
Honey Dosage: 12 11 15
11 10 13 10 4
15 16 9 14
10 6 10 8 11
12 12 8 12
9 11 15
10 15 9 13 8 12 10 8 9 5 12
DM Dosage: 4 6 9
4 7 7 7
9 12 10 11
6
3 4 9 12 7
6 8 12 12
4 12 13
7 10 13 9 4
4 10 15 9
No Dosage (Control): 5 8 6 1
0 8 12 8
7 7 1
6 7 7 12 7
9 7 9 5
11 9
5 6 8 8 6 7 10 9 4 8 7
3 1 4 3
Question : Write the R code?
We will run the anova test and Tukey HSD test to test the below hypotheses.
H0: Average improvement in cough symptoms scale for all dosages are equal.
H1: At least one dosage have different improvement in cough symptoms scale.
R Code is,
# Load the data
scale <-
c(12,11,15,11,10,13,10,4,15,16,9,14,10,6,10,8,11,12,12,8,12,9,11,15,10,15,9,13,8,12,10,8,9,5,12,
4,6,9,4,7,7,7,9,12,10,11,6,3,4,9,12,7,6,8,12,12,4,12,13,7,10,13,9,4,4,10,15,9,
5,8,6,1,0,8,12,8,7,7,1,6,7,7,12,7,9,7,9,5,11,9,5,6,8,8,6,7,10,9,4,8,7,3,1,4,3)
# Create vectors of factors (3 levels) for Dosage varieties
dosage=factor(c(rep(1,35),rep(2,33),rep(3,37)))
# Fit a regression model on scale for different
factors of dosage and run the anova test
summary(model <- aov(scale ~ dosage))
# Run the anova test
TukeyHSD(model, "dosage", ordered = TRUE)
The output of the code is,
> summary(model <- aov(scale ~ dosage))
Df Sum Sq Mean Sq F value Pr(>F)
dosage 2 318.5 159.2 17.51 2.9e-07 ***
Residuals 102 927.7 9.1
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
P-value (Pr(> F)) is less than the significance level 0.05, so we reject H0 and conclude that there is significant evidence that at
least one dosage have different improvement in cough symptoms scale.
Tukey HSD test output is,
> TukeyHSD(model, "dosage", ordered = TRUE)
Tukey multiple comparisons of means
95% family-wise confidence level
factor levels have been ordered
Fit: aov(formula = scale ~ dosage)
$dosage
diff lwr upr p adj
2-3 1.819820 0.1023625 3.537277 0.0351562
1-3 4.200772 2.5094509 5.892094 0.0000001
1-2 2.380952 0.6405157 4.121389 0.0043728
P-value for the mean scale difference between Honey dosage and DM
Dosage (1-2) is less than 0.05. So, there is significant difference
in improvement in cough symptoms scale for Honey and DM dosage.
P-value for the mean scale difference between Honey dosage and No Dosage (1-3) is less than 0.05. So, there is significant difference in improvement in cough symptoms scale for Honey and No dosage.
Thus, there is significant evidence that honey is a cough remedy.