3 Confidence Intervals
3.1 Concrete items
A construction company receives concrete items for a construction. The length of the items are assumed reasonably normally distributed. The following requirements for the length of the elements are made \mu=3000mm. The company samples 9 items from a delivery which are then measured for control. The following measurements (in mm) are found: 3003, 3005, 2997, 3006, 2999, 2998, 3007, 3005, 3001.
a)
Compute the following three statistics: the sample mean, the sample standard deviation and the standard error of the mean, and what are the interpretations of these statistics?
> sample <- c(3003, 3005, 2997, 3006, 2999, 2998, 3007, 3005, 3001)
> mean <- mean(sample)
[1] 3002.333
> sd <- sd(sample)
[1] 3.708099
> error <- sd/sqrt(9)
[1] 1.236033
b)
In a construction process, 5 concrete items are joined together to a single construction with a length which is then the complete length of the 5 concrete items. It is very important that the length of this new construction is within 15 m plus/minus 1 cm. How often will it happen that such a construction will be more than 1 cm away from the 15 m target (assume that the population mean concrete item length is \mu = 3000 mm and that the population standard deviation is \sigma = 3)?
Find:
We know:
Solution: $$ P(14990>L^{scale}>15010) = 2*P(L^{scale}<14990) = 0.1360371 \ $$
> 2*pnorm(14990, mean=15000, sd=sqrt(45))
[1] 0.1360371
c)
Find the 95% confidence interval for the mean \mu.
> qt(0.975,9-1)
[1] 2.306004
d)
Find the 99% confidence interval for \mu. Compare with the 95% one from above and explain why it is smaller/larger!
> qt(0.995,9-1)
[1] 3.355387
- It is larger, because in this case 99% of all CI's should contain the true mean. So that means, if we want a higher likelihood, that the CI contains the population mean, so we should make the CI larger.
e)
Find the 95% confidence intervals for the variance \sigma^2 and the standard deviation \sigma.
- The 95% CI for the variance:
> (9-1)*var(sample)/qchisq(0.975, df=8)
[1] 6.27333
> (9-1)*var(sample)/qchisq(0.025, df=8)
[1] 50.46495
- The 95% CI for the standard deviation:
f)
Find the 99% confidence intervals for the variance \sigma^2 and the standard deviation \sigma.
- The 99% CI for the variance:
> (9-1)*var(sample)/qchisq(0.995, df=8)
[1] 5.010259
> (9-1)*var(sample)/qchisq(0.005, df=8)
[1] 81.82009
- The 99% CI for the standard deviation:
3.2 Aluminum profile
The length of an aluminum profile is checked by taking a sample of 16 items whose length is measured. The measurement results from this sample are listed below, all measurements are in mm: 180.02, 180.00, 180.01, 179.97, 179.92, 180.05, 179.94, 180.10,180.24, 180.12, 180.13, 180.22, 179.96, 180.10, 179.96, 180.06 . From data is obtained: $\bar{x}=180.05 $ and s = 0.0959 . It can be assumed that the sample comes from a population which is normal distributed.
a)
A 90%-confidence interval for \mu becomes?
> qt(0.95,15)
[1] 1.75305
b)
A 99%-confidence interval for \sigma becomes?
> sqrt((16-1)*0.0959^2/qchisq(0.995, df=15))
[1] 0.06485128
> sqrt((16-1)*0.0959^2/qchisq(0.005, df=15))
[1] 0.1731578