In: Statistics and Probability
We need to use R for this example!
10 patients have diagnostic procedures repeated on two different units. Relative exposure data is shown below:
Unit A: 84, 109, 57, 91, 80, 81, 109, 107, 98, 111
Unit B: 86, 104, 68, 95, 83, 87, 118, 114, 108, 116
Due to poor record keeping, we do not know what exposure corresponds to what patient.
Result:
We need to use R for this example!
10 patients have diagnostic procedures repeated on two different units. Relative exposure data is shown below:
Unit A: 84, 109, 57, 91, 80, 81, 109, 107, 98, 111
Unit B: 86, 104, 68, 95, 83, 87, 118, 114, 108, 116
Due to poor record keeping, we do not know what exposure corresponds to what patient.
Create an appropriate chart to visualize the data
What statistical test is appropriate to determine whether the exposures from the two units differ significantly
Independent sample t test ( two sided)
What can you conclude from the statistical analysis?
Obtained test statistic t = -0.67987, df = 18, p-value = 0.5052 which is > 0.05 level of significance. Ho is not rejected. we conclude that the exposures from the two units not differ significantly.
You have reason to suspect exposure from Unit B is greater than Unit A. What statistical test would you use and how would this affect the level of significance of the test?
To test exposure from Unit B is greater than Unit A, we have to do one sided ( upper tail ) test. For this alternate hypothesis is H1: µB > µA.
If we are using a significance level of 0.05, a two-tailed test allots half of your alpha to testing the statistical significance in one direction and half of your alpha to testing statistical significance in the other direction. If we are using a significance level of .05, a one-tailed test allots all of your alpha to testing the statistical significance in the one direction of interest.
R code:
# test beween A and B
A=c(84, 109, 57, 91, 80, 81, 109, 107, 98, 111)
B=c( 86, 104, 68, 95, 83, 87, 118, 114, 108, 116)
boxplot(A,B,names=(c("Unit A","Unit B")))
t.test(A,B, var.equal = TRUE, conf.level=.95)
R output:
t.test(A,B, var.equal = TRUE, conf.level=.95)
Two Sample t-test
data: A and B
t = -0.67987, df = 18, p-value = 0.5052
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-21.26896 10.86896
sample estimates:
mean of x mean of y
92.7 97.9