You are on page 1of 3

Dr. Krishan K.

Pandey UPES

Examples of Z-test/ t-test.


Dr. Krishan K. Pandey
University Of Petroleum & Energy Studies

1. A vending machine that dispenses coffee into cups must fill the cups with 7.8 ounces of liquid.
Before selling the vending machine to a business, the company tests the machine to be sure it is
dispensing an average of 7.8 ounces. The amount of coffee dispensed by the vending machine is
assumed to be normally distributed with a mean of ounces and a standard deviation of 0.05
ounce. A random sample of 20 amounts (in ounces) of coffee dispensed is listed as follows:

7.78 7.79 7.82 7.82 7.87 7.84 7.80 7.82 7.80 7.78
7.83 7.75 7.85 7.83 7.84 7.73 7.82 7.87 7.81 7.88

(a) Find and interpret the 90% confidence interval for the population mean amount of liquid
dispensed by the vending machine.
(b) Is the 95% confidence interval for the population mean amount of liquid dispensed by the
vending machine wider or narrower than the 90% confidence interval in part (a)?
(c) Is there strong evidence, at = 0.10, to indicate that the population mean amount of liquid
dispensed by the vending machine is not 7.8 ounces? You must: state the null and alternative
hypotheses; state the test statistic and its distribution; state the decision rule by both the
rejection region and by the P-value; calculate the value of the test statistic and the P-value; state
your statistical decision and conclusion.
(d) Can you use your 90% confidence interval in part (a) to test the hypothesis in part (c)? If no,
explain. If yes, what is your conclusion?

SOLUTIONS:
Since the population distribution is normal with a known standard deviation, Z procedures are
used. Moreover, the sample mean is X = 7.8165.
0.05
(a) The 90% Z confidence interval for is 7.8165 1.645 = ( 7.798, 7.835). We are 90%
20
confident that the true population
mean amount of liquid dispensed by the vending machine is
between 7.798 ounces and 7.835 ounces.
(b) The 95% confidence interval for the population mean amount of liquid dispensed by the
vending machine is wider thanthe 90% confidence interval in part (a) because the confidence
level is higher.
(c) Hypotheses:
Ho: = 7.8
Ha: 7.8
Test statistic and its distribution:
X 7.8
Z= which follows N(0,1)
0.05
n
Decision rule: reject the null hypothesis Ho if the calculated value Z* of the test statistic
satisfies | Z* | 1.645 or if the calculated P-value = 0.10.
7.8165 7.8
Now, Z* = = 1.476 and the P-value = 2P(Z 1.476) 0.1402.
0.05
20

Page 1 of 3


Dr. Krishan K. Pandey UPES

Do not reject the null hypothesis and conclude that there is no evidence to indicate that the
population mean amount of liquid dispensed by the vending machine is not 7.8 ounces.
(d) Yes, the 90% confidence interval in part (a) can be used to test the hypothesis in part (c). Since
the hypothesized mean 7.8 is included in the 100(1-)% confidence interval (7.798, 7.835), we
do not reject the null hypothesis and conclude that there is no evidence to indicate that the
population mean amount of liquid dispensed by the vending machine is not 7.8 ounces.

2. Computer centers at universities are aware of the increased number of web surfers. To begin to
understand the demands that will be made on the computer centers resources, one university
studied 25 children in grades 7 to 12. The numbers of hours that these children spent on the
Internet in one week are as follows:

5.0 4.4 5.7 5.6 5.5 5.2 5.0 4.8 3.6 4.1 4.6 4.9 4.0
6.7 5.5 5.4 6.7 5.8 5.4 4.8 5.9 5.1 3.8 4.1 6.7

Assume that the time spent web surfing is normally distributed.


(a) Find and interpret the 95% confidence interval for the population mean number of hours spent
on the Internet by children in grades 7 to 12.
(b) Is there strong evidence, at = 0.05, to indicate that children in grades 7 to 12 spend more than
an average of 5 hours per week web surfing? You must: state the null and alternative
hypotheses; state the test statistic and its distribution; state the decision rule by both the
rejection region and by the P-value; calculate the value of the test statistic and the P-value; state
your statistical decision and conclusion.
(c) Can you use your 95% confidence interval in part (a) to test the hypothesis in part (b)? If no,
explain. If yes, what is your conclusion?

SOLUTIONS:
Since the population distribution is normal with an unknown standard deviation, t procedures are
used. Moreover, the sample mean is X = 5.132 and the sample standard deviation is s = 0.867.
0.867
(a) The 95% t confidence interval for is 5.132 2.064 = (4.774, 5.490). We are 95%
25
confident that the true population
mean is between 4.774 hours and 5.490 hours.
(b) Hypotheses:
Ho: = 5
Ha: > 5
Test statistic and its distribution:
X 5
t= which follows t distribution with df = 24.
s
n
Decision rule: reject the null hypothesis Ho if the calculated value t* of the test statistic
satisfies t* 1.711 or if the calculated P-value = 0.05.
5.132 5
Now, t* = = 0.761 and the P-value = P(t 0.761) is between 0.2 and 0.25.
0.867
25
Do not reject the null hypothesis and conclude that there is no evidence to indicate that the
population mean time spent on Internet by children in grades 7 to 12 is more than 5 hours.

Page 2 of 3
Dr. Krishan K. Pandey UPES

(c) No, the 95% confidence interval in part (a) cannot be used to test the hypothesis in part (b),
because the alternative hypothesis is one-sided.

Page 3 of 3

You might also like