Surfstat.australia: an online text in introductory Statistics

STATISTICAL INFERENCE

ONE CONTINUOUS VARIABLE

Example - 300 mL bottles of softdrink

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.

  1. Test the null hypothesis H0 : µ = 300 against the alternative hypothesis H1: µ300.
  2. Find a 90% confidence interval for µ.

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.

Comments

  1. For hypothesis testing the t-distribution gives higher p-values than the normal distribution, so the null hypothesis is less likely to be rejected (even if it is false). Thus the power is lower because the test is based on less information (as the sample estimate s is used instead of the population value s).
  2. The MINITAB command is
  3. e.g. TTEST 300 C1

    if the data are stored in column C1 and the hypothesised value is µ = 300.

  4. Confidence intervals from the t-distribution are wider than confidence intervals from the normal distribution (because there is less information and the t-statistic has larger variance than z-statistic).
  5. The MINITAB command for a confidence interval using the t-distribution is
  6. e.g. TINTERVAL 90 C1

    where 90 = required confidence level

    C1 = column of data values


... Previous page Next page ...