10 Testing a Single Population Mean

10.2 Drug Manufacturing Example

Suppose we are running a pharmaceutical company that manufactures a commonly used drug, Drug U, that cures Illness A. For an adult with Illness A, a standard dosage of Drug U is a single 200 mg tablet every 8 hours. In the manufacturing process that produces 200 mg tablets of Drug U, there is inevitable variation in the actual weight of the pills as they are produced. It is important that the average weight of the tablets is very close to 200 mg, as dosage amounts too large or too small are bad for patients’ health.4040This implies too that the variance in tablet weights must be small, but that test is addressed in Chapter 11.

Manufacturing processes can go awry, needing periodic adjustments or more serious interventions. In this scenario, “going awry” translates to the mean weight, μ, of pills being produced is different from 200 mg. This can be expressed in terms of two competing hypothesis:

H0:μ=200H1:μ200

Rejecting H0 would result in halting manufacturing to correct whatever problems are necessary. Because halting manufacturing is costly, we don’t want to reject H0 unless there is compelling evidence to do so.

Note that with an H0 of μ=200, the direction of extreme is two-sided. That is, sample means larger (or smaller) than 200 mg give evidence against H0.

Testing these hypotheses requires sample data. Before collecting data, the researcher should decide on the following:

  1. 1.

    How the data will be analyzed, i.e., what statistical test(s) will be used. Doing this first helps ensure that good data are collected.4141Bad data are worthless.

  2. 2.

    The significance level α.4242Choosing α after computing a p-value is certainly unethical.

On the first decision, the following example will illustrate a common analysis. As for the second decision, though rejecting H0 could be costly to the company, an unwillingness to reject H0 could be dangerous to patients, so let’s choose α=0.05.

Suppose that a sample is generated, yielding the data given below:4343These data are given in the Excel file dutws.xlxs

199.9199.6199.5200.6199.8199.8200.5200.4199.5200.3200.0199.9200.4199.6200.0199.8200.5199.8199.9200.2200.2199.6200.3200.1199.7199.8199.5200.5199.6200.0201.0199.9199.8199.9200.2200.0201.1200.8200.1200.7200.1201.5201.0

Recall that the essential question in a hypothesis test is, “does the sample provide significant evidence against H0?” To answer the question, we will compute a p-value based on the sample, and then compare that value to α.

Using Excel, compute the summary statistics for the sample, as in Figure 10.1.

Figure 10.1: Summary Statistics

Note that x¯200.13 is, indeed, not equal to 200, so this is evidence against H0. However, we are to judge whether this provides significant evidence against H0. This means that while this x¯ looks close to 200, the difference of 0.13 must be judged relative to the population standard deviation σ and sample size n.

Because the sample size n=43 is sufficiently large (n30), we can invoke the Central Limit Theorem and model the population of sample means X¯ using a normal distribution with standard deviation σ/n. In symbols, we have

X¯N(μ,σn),

and so the random variable

Z=X¯-μσ/n

has a standard normal distribution, N(0,1). If we knew σ, we would be able to compute the p-value, i.e., we could compute the chance of observing x¯=200.13, and anything more extreme, assuming H0 is true.

Since, in manufacturing, a value for σ is sometimes assumed to be known, let us suppose we are given that σ=0.5 mg.4444Two things: (1) It is not possible to know σ without knowing μ, but if a situation assumes a value for σ, then there are discipline-specific justifications, and (2) a σ of 0.5 mg might be too large in this type of manufacturing process.

To calculate a p-value based on the observed x¯, we compute the z-score for x¯,

z=x¯-μ0σ/n, (10.1)

where μ0 is the hypothesized value of μ given in H0. In this example, the z-score is then

z=200.13-2000.5/431.65,

as shown in Figure 10.2.

Figure 10.2: z-score Computation

The calculation shows that the observed x¯ is approximately 1.65 standard deviations above the mean, assuming H0 is true. The p-value is the chance of observing z=1.65, or anything more extreme, assuming H0 is true. Now, because the direction of extreme is two-sided, ”anything more extreme” would be values z1.65 or z-1.65. The p-value is the shaded two-tailed region in Figure 10.3.

Figure 10.3: p-value

The p-value is twice the area to the right of 1.65, and we can compute that using Excel’s 𝙽𝙾𝚁𝙼.𝙳𝙸𝚂𝚃. That is,

p-value=𝟸*(𝟷-𝙽𝙾𝚁𝙼.𝙳𝙸𝚂𝚃(𝙳𝟾,𝟶,𝟷,𝚃𝚁𝚄𝙴))

gives the p-value, as shown in Figure 10.4. (Remember that 𝙽𝙾𝚁𝙼.𝙳𝙸𝚂𝚃 gives area to the left, so subtract from 1 if you want area to the right.)

Figure 10.4: p-value Calculation

Since the p-value is >α, we would fail to reject H0, that is, there is insufficient evidence that the manufacturing process is producing tablets of average weight different from 200 mg.

In failing to reject H0, a Type II error could have been made. But, recall that it is generally impossible to know whether the error has occurred. The probability that a Type II error has occurred is either 0 or 1: It is 1 if the error did occur, or it is 0 if the error did not occur.

Remarks: This example illustrates a Z-test on a single population mean. Test on means are called parametric tests, as the test is done on a parameter of a population. Tests on population standard deviations and population proportions are also parametric tests. In doing a test on a population mean, one should explore the sample data more than simply computing the summary statistics of n, x¯ and s. Unless the sample is too small (e.g., n=6), at minimum a histogram of the sample data should be studied to assess if the test is appropriate. More on this later.