In: Statistics and Probability
For the problem below, part b), discuss which distribution is appropriate to use when constructing the confidence interval (C.I.) - Normal or T-distribution. Explain your reasoning.
The survival times in weeks for 20 male rats that were exposed to a high level of radiation are152 152 115 109 137 88 94 77 160 165 125 40 128 123 136 101 62 153 83 69. Data are from Lawless (1982) and are stored in the data frame RAT. Load the data with data(RAT)
Construct a quantile-quantile plot of the survival times. Based on the quantile-quantile plot, can normality be ruled out?
Construct a 95% confidence interval for the average survival time for male rats exposed to high levels of radiation.
Solution:
data(RAT) ggplot(data = RAT, aes(sample = survival.time)) + stat_qq() + theme_bw()
R codes and output:
> rat=scan('clipboard')
Read 20 items
> rat
[1] 152 152 115 109 137 88 94 77 160 165 125 40 128 123 136 101 62
153 83
[20] 69
> qqnorm(rat,main='QQ plot of the survival time for rats')
> qqline(rat)
> t.test(rat)
One Sample t-test
data: rat
t = 14.176, df = 19, p-value = 1.48e-11
alternative hypothesis: true mean is not equal to 0
95 percent confidence interval:
96.69997 130.20003
sample estimates:
mean of x
113.45
Que.a
Almost all pints lie on straight line except some points in the right tail. Hence we conclude that normality assumption is satisfied.
Que.b
95% confidence interval for the average survival time for male rats exposed to high levels of radiation.
We use t statistic o compute 95% confidence interval, because we don't know population standard deviation and sample size is also small.
Confidence interval = ( 96.69997 , 130.20003 )