Some data:
Data are comparison of 2 drugs for effectiveness at reducing pain.
In reading example, each child tried only one reading method.
But here, each subject tried out both drugs, giving us two measurements.
Possible because, if you wait long enough, one drug has no influence over effect of other.
Advantage: focused comparison of drugs. Compare one drug with another on same person, removes a lot of variability due to differences between people.
Matched pairs, requires different analysis.
Design: randomly choose 6 of 12 subjects to get drug A first, other 6 get drug B first.
Values aligned in columns:
Rows: 12
Columns: 3
$ subject <dbl> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
$ druga <dbl> 2.0, 3.6, 2.6, 2.6, 7.3, 3.4, 14.9, 6.6, 2.3, 2.0, 6.8, 8.5
$ drugb <dbl> 3.5, 5.7, 2.9, 2.4, 9.9, 3.3, 16.7, 6.0, 3.8, 4.0, 9.1, 20.9
Paired t-test
data: druga and drugb
t = -2.1677, df = 11, p-value = 0.05299
alternative hypothesis: true mean difference is not equal to 0
95 percent confidence interval:
-4.29941513 0.03274847
sample estimates:
mean difference
-2.133333
One Sample t-test
data: diff
t = -2.1677, df = 11, p-value = 0.05299
alternative hypothesis: true mean is not equal to 0
95 percent confidence interval:
-4.29941513 0.03274847
sample estimates:
mean of x
-2.133333
Bootstrap sampling distribution of sample mean differences:
Yes we did; this is clearly skewed left and not normal.
Comments