Bottles of softdrink are meant to contain 300ml. A sample of n = 10 bottles were measured and the contents were: 299, 276, 283, 301, 297, 281, 300, 291, 295, 291.
300.
For these data, we assume X~N(µ, s 2) but µ and s are unknown.
From the data
= 291.4, s
= 8.72, n = 10
(i) To test the null hypothesis, firstly assume H0 is true. Assume µ = 300, so the observed value of the t-statistic is
t =
= -3.12
The p-value p is the probability of observing this t statistic,
or a more extreme one, in either direction
p = P(t9 < - 3.12 or t9 > 3.12)
< P(t9 < - 2.82 or t9 > 2.82)
Therefore p < 2 × P(t9 > 2.82) = 0.02
Note that the t-tables for 9 degrees of freedom did not have a probability for the value 3.12. The closest smaller tabulated value was 2.82. Nowadays, there is no reason not to use a computer program for the exact t-distribution, which gives a two-tailed p-value of 0.0123.
As the p-value is less than 0.05 we say the p-value is small
and there is reasonable evidence against H0. You would
conclude the data provide evidence against H0:
µ
300.
To find a 90% CI for µ, from tables for t9 we first need to find the value c such that
P(- c < t9 < c) = 0.9
To do this, an area of .05 must be left in each tail of the t9 distribution, and so from Table 2, must take the value 1.833.
Pr (-1.833 < t9 < 1.833) = 0.9
Hence
± 1.833
will give the observed 90% C.I. where
and s are the observed values.
Using
= 291.4, s = 8.72 the
interval is 291.4 ± 1.833
= (286.3, 296.5).
So with 90% confidence the (population) mean contents for the bottles is in the interval (286.3ml, 296.5ml). As this interval does not contain the value 300, the data do not support the hypothesis that the true mean content of all drink bottles is 300ml.
Note that for a 95% CI using the t9 distribution the
calculation would be
± 2.262
.
Find the value to use when calculating a 99% CI from this distribution. Answer:
If you need a value for a t distribution which is not listed in Table 2 (e.g. df = 37) then use the next lower tabulated df distribution (e.g. df = 30) or interpolate to estimate the value.
e.g. TTEST 300 C1
if the data are stored in column C1 and the hypothesised value is µ = 300.
e.g. TINTERVAL 90 C1
where 90 = required confidence level
| ... Previous page | Next page ... |