In: Statistics and Probability
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 95% confidence interval for the average survival time for male rats exposed to high levels of radiation. Round to two decimal places.
Hint: Use T-distribution as sample is small and variance unknown.
CI <- t.test(RAT$survival.time, conf.level = ???)$conf
Solution:
x | x2 |
152 | 23104 |
152 | 23104 |
115 | 13225 |
109 | 11881 |
137 | 18769 |
88 | 7744 |
94 | 8836 |
77 | 5929 |
160 | 25600 |
165 | 27225 |
125 | 15625 |
40 | 1600 |
128 | 16384 |
123 | 15129 |
136 | 18496 |
101 | 10201 |
62 | 3844 |
153 | 23409 |
83 | 6889 |
69 | 4761 |
x=2269 | x2=281755 |
The sample mean is
Mean = (x / n) )
=152+152+115+109+137+88+94+77+160+165+125+40+128+123+136+101+62+153+83+69/20
=2269 /20
=113.45
Mean =113.45
The sample standard is S
S =(
x2 ) - ((
x)2 / n ) n -1
=(281755-(2269)220
/19 )
=(281755-257418.05
/19)
=24336.95/19
=1280.8921
=35.789
The sample standard is = 35.79
Degrees of freedom = df = n - 1 = 20 - 1 = 19
At 95% confidence level the t is ,
= 1 - 95% = 1 - 0.95 = 0.05
/ 2 = 0.05 / 2 = 0.025
t /2,df = t0.025,19 =2.093
Margin of error = E = t/2,df * (s /n)
= 2.093 * (35.79 / 20)
= 16.75
Margin of error =16.75
The 95% confidence interval estimate of the population mean is,
- E < < + E
113.45 - 16.75 < < 113.45 + 16.75
96.70 < < 130.20
(96.70, 130.20 )