Problem 2-2, Comparing a single mean to a specified value (second example)

From Statistics
Jump to navigation Jump to search

Problem Statement[edit]

The viscosity of a liquid detergent is supposed to average 800 centistokes at 25 °C. A random sample of 16 batches of detergent is collected, and the average viscosity is 812. Suppose we know that the standard deviation of viscosity is σ = 25 centistokes.

  1. State the hypotheses that should be tested.
  2. Test these hypotheses using α = 0.05. What are your conclusions?
  3. What is the P-value for the test?
  4. Find a 95 percent confidence interval on the mean.

Solution[edit]

Figure 1: Our data compared to a theoretical Gaussian distribution.

Section A: Choosing hypotheses[edit]

In this problem we are told we would like our liquid detergent to have a mean of and a standard deviation of : this is our theoretical distribution. We are also told that a sample of batches of detergent have an average viscosity of , which estimates the mean of our true distribution. We would like to know if the means of our true and theoretical distributions are likely to be the same. There are two hypotheses to consider here. Our null hypothesis is that the means of the two distributions are equal, and our alternative hypothesis is that they are not equal.

H0: μ = μ0
H1: μ ≠ μ0

The alternate hypothesis is called two-tailed because it is true if and if .


Figure 2: Our plot after normalizing.

Section B: Z-values[edit]

To compare the mean of the true distribution to that of the theoretical distribution, we test the null hypothesis with a z-test. The z-value is calculated as in problem 2-1:


Since we have a two-tailed alternative hypothesis, we must define a rejection region at both extremes of our theoretical distribution. Our value for determines the total size of the rejection region, so we simply declare that 2.5% (since = .05, or 5%) of the area on the left of our theoretical distribution is a rejection region, and 2.5% of the area on the right is also a rejection region (see Figure 2). We calculate to determine the x-value that corresponds to the rightmost edge of the rejection region on the left, and to find the leftmost edge of the rejection region on the right (see Figure 2 again).

,

If z is between and , it is not in the rejection region and we claim the null hypothesis to be true (with a confidence of 95%). Otherwise we claim the alternative hypothesis to be true (with the same confidence).

Note that . This is always true. You can simply compare your z-value to to perform a z-test. If , claim your null hypothesis to be true, otherwise claim that your alternative hypothesis is true.

Section C: P-values[edit]

We now calculate a P-value the same way we did in problem 2-1. Graphically, we extend the rejection region inwards from both tails until we run into our z-value. The P-value is the area of the shaded area, calculated in Excel with =2*NORMSDIST(-ABS(z)) or in R with 2*pnorm(-abs(z)). These functions integrate a normal distribution from negative infinity to the number we give it (in this case the negative absolute value of z), so we give it our negative z-value and multiply by two in order to get the total area of the shaded regions on the graph.

P-value

Our z-value is very close to the rejection region, so a plot illustrating the extended rejection regions will look nearly identical to Figure 2.

Figure 4: The confidence interval about the sample mean.

Figure 5: The confidence interval about the theoretical mean.

Section D: Confidence intervals[edit]

To calculate the limits of the confidence interval for the sample mean, we use the following formula:

confidence interval limits =

This tells us the range in which a sample mean could lie in order for us to accept our null hypothesis:

We can calculate the confidence interval for in a similar way, which tells us the range in which the mean of our theoretical distribution (given a sample mean of 812) could lie in order for us to accept our null hypothesis:

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mu_0} confidence interval limits =