Module # 7: Confidence Interval Estimation And introduction to Fundamental of hypothesis testing

This week we looked at estimating confidence intervals and formulating test hypotheses.

1. The code I used with the given variables to find the confidence interval is:

testmean <- 85
testsd <- 8
testsize <- 64
testconf <- 0.95
testforz <- testconf + (1 - testconf) / 2
testerr <- qnorm(testforz)*testsd/sqrt(testsize)
testmean - testerr
testmean + testerr

The calculated interval was from 83.040 to 86.960.

2. I used similar code for this question:

testmean <- 125
testsd <- 24
testsize <- 36
testconf <- 0.99
testerr <- qnorm(testforz)*testsd/sqrt(testsize)
testmean - testerr
testmean + testerr

The calculated interval was from 117.160 to 132.840.

3a. I used this code to calculate the confidence interval for the paint measurements:

testmean <- 0.99
testsd <- 0.02
testsize <- 50
testconf <- 0.95
testforz <- testconf + (1 - testconf) / 2
testerr <- qnorm(testforz)*testsd/sqrt(testsize)
testmean - testerr
testmean + testerr

The resulting interval was from 0.984 to 0.996.

3b. Given that the target value, 1, was not in the 99% confidence interval, it looks like the shop manager does have a good reason to complain to the company he bought the paint from.

4a. The code I used to get the confidence interval is:

testmean <- 1.67
testsd <- 0.32
testsize <- 20
testconf <- 0.95
testforz <- testconf + (1 - testconf) / 2
testerr <- qnorm(testforz)*testsd/sqrt(testsize)
testmean - testerr
testmean + testerr

The interval was from 1.53 to 1.81

4b. The store owner now has a range of possible means – he can be 95% certain that the mean of all the cards in the store is between those two values.

5. The code I used to find the sample size required for the given error range is:

testsd <- 15
testconf <- 0.95
testforz <- testconf + (1 - testconf) / 2
testerr <- 5
qnorm(testforz)^2 * testsd^2 / testerr^2

The result was 34.573, so I rounded up to get a required sample size of 35.

6. The average male student’s shoe size is 10, so:

mean = 10

The falsifying statement is that the mean is not 10:

mean != 10

The original statement concerns equality, so the alternative hypothesis will be the false state and the null hypothesis will be the original assertion.

Null hypothesis: The average male student’s shoe size is 10.
Alternative hypothesis: The average male student’s shoe size is not 10.

This entry was posted in Advanced Statistics and Analytics. Bookmark the permalink.

Comments are closed.