10 Testing a Single Population Mean

10.4 Z-Test on a Single Population Mean

This section will develop the Z-Test on a Single Population Mean (or simply Z-Test), which was partially illustrated in Section 10.2. This test is appropriate if and only if one can reasonably assume that the population of sample means are normally distributed (or approximately normally distributed).

Suppose that X represents a large population of numbers with unknown mean μ and standard deviation σ. Suppose that we are going to take a simple random sample of size n from X, and then use that sample to do a Z-Test on μ. When can we assume that the population of sample means X¯ will be normally distributed, or approximately normally distributed?

  • If X is normally distributed, then the population of sample means X¯ will be exactly normally distributed with mean μX¯=μ and standard deviation σX¯=σ/n.

  • If X is not normally distributed, but the sample size is sufficiently large, then by the Central Limit Theorem, the population of sample means X¯ will be approximately normally distributed with mean μX¯=μ and standard deviation σX¯=σ/n. The rule-of-thumb for “sufficiently large” we’ll us is n30, but 30 might not be large enough if the population is too pathological.

In symbols, if either assumptions are met, then X¯N(μ,σ/n).

Bottom-line on using a Z-Test: In order use a Z-Test, σ must be known, and the population must be normal or the sample size sufficiently large. If σ is unknown, do not use a Z-Test.

10.4.1 The Test Statistic and p-value

If we can assume that

X¯N(μ,σn),

then the random variable

Z=X¯-μσ/n (10.2)

will have a standard normal distribution, i.e., ZN(0,1). The random variable Z is used for the test statistic in a Z-Test.

Recall that the p-value is the chance of observing the test statistic, or anything more extreme, assuming H0 is true. The p-value depends on these three parts: (1) the value of the test statistic, (2) the direction of extreme, and (3) H0.

We’ll examine the p-value computation in each of the three different setups for H0.

Case: Direction of Extreme to the Left
H0:μμ0H1:μ<μ0

If H0 is true, then μμ0. Remember that the population mean μ is a fixed value. If μμ0, then the larger μ is, the stronger the evidence the observed sample mean, x¯, is against H0, that is, the weakest evidence x¯ provides against H0 occurs when μ=μ0. Since we don’t want to reject H0 unless there is strong evidence to do so, we assume μ=μ0 in computing the p-value. This maximizes the value of the computed p-value, thus holding the observed evidence to the strongest standard in deciding whether to reject H0.

Bottom line: In computing the p-value, in assuming H0 is true, we assume the μ=μ0.

To compute the p-value then, we use μ=μ0 in Equation (10.2):

Z=X¯-μ0σ/n

The observed value of x¯ is used to compute the corresponding observed test statistic, z0, as given below:

z0=x¯-μ0σ/n (10.3)

Using x¯ to Compute a p-value

There are two ways we can compute the p-value. The first method uses the observed sample mean x¯. In this case, the p-value is the chance of observing x¯, or anything more extreme(smaller), assuming H0 is true (μ=μ0). If X¯N(μ0,σ/n), then the p-value is

P(X¯x¯)=area under N(μ0,σ/n) to the left of x¯

This is shown graphically in Figure 10.5.

Figure 10.5: p-value using the distribution of X¯
Example 10.4.1.

A company advertises that their product will last at least 1 year before breaking, but a consumer protection agency suspects fraud. To test this, the agency took a random sample of size 50 of the product, and the average number of days until failure was 350.4 with a sample standard deviation of 54.1. At the significance level of 5%, test whether the company is guilty of fraud. For mysterious reasons, it is known that the population standard deviation is σ=54.0.

Solution: Recall from Example 10.3.1 on page 10.3.1 that H0 is the claim that μ365. Since the sample size of 50 is at least 30, the distribution for the sample means X¯ is approximately N(365,54.0/50). Now the observed sample mean is x¯=350.4, so the p-value is

P(X¯350.4)=area under N(365,54.0/50) to the left of 350.4.

The p-value is shown in Figure 10.6.

Figure 10.6: p-value

Recall that we can use Microsoft’s Excel to compute areas under normal distributions using the command 𝙽𝙾𝚁𝙼.𝙳𝙸𝚂𝚃, as shown in Figure 10.7.

Figure 10.7: p-value using Excel

Thus, the p-value is approximately 0.0280. Since α=0.05, we would reject H0, and conclude that there is significant evidence that the company is guilty of fraud.

Using z0 to Compute a p-value

Note that in the calculations above, it wasn’t necessary to compute the test statistic z0 to find the p-value. But, in modern scholarly work, it is still commonly expected that the value of the test statistic be reported together with the found p-value. The test statistic in Equation (10.3) can be used to compute the corresponding p-value, which we will demonstrate now.

The z-score for the observed sample mean x¯=350.4 is

z0=x¯-μ0σ/n=350.4-36554/50-1.91,

as shown in Figure 10.8.

Figure 10.8: z-score Calculation

The p-value is the chance of observing z0=-1.91, or anything more extreme (smaller), assuming H0 is true (μ=365). That is, the p-value is

P(Z-1.91)=area under N(0,1) to the left of -1.91,

as shown in Figure 10.9.

Figure 10.9: p-value using N(0,1)

The calculation in Excel is given in Figure 10.10.

Figure 10.10: p-value using N(0,1)

So, the same p-value is gotten, and H0 is rejected. Here’s how the result might be presented in a scientific journal: There is significant evidence (Z=-1.91, p=0.0280) that the average time for the product to break is less than 1 year.


Concepts Check: 1. Suppose that in a Z-Test, the p-value is found to be 0.0558. If α=5%, what is the conclusion of the test? Answer: Fail to reject H0. 2. Suppose that in a Z-Test, the value of z0 obtained is -1.78. If the direction of extreme is to the left, as a probability, describe the corresponding p-value. Answer: The p-value is the probability of observing -1.78, or anything smaller, assuming H0 is true. 3. Suppose that in a Z-Test, the value of z0 obtained is -1.78. If the direction of extreme is to the left, as an area under a curve, describe the corresponding p-value? Answer: The p-value is the area under N(0,1) to the left of -1.78. 4. Suppose that in a Z-Test, the value of z0 obtained is -1.78. If the direction of extreme is to the left, what Excel command will compute the corresponding p-value? Answer: =𝙽𝙾𝚁𝙼.𝙳𝙸𝚂𝚃(-1.78,𝟶,𝟷,𝚃𝚁𝚄𝙴) 5. Suppose the in a Z-Test, H0 is the claim that μ40.0, and the summary statistics for the sample are x¯=45.3, s=6.6, and n=35. What is the value of the test statistic? Answer: z0=45.3-40.06.6/354.75
Case: Direction of Extreme to the Right
H0:μμ0H1:μ>μ0

If the direction of extreme is to the right, the calculations are handled identically as given previously, except that p-values are areas to the right. The subtlety here is that the Excel command 𝙽𝙾𝚁𝙼.𝙳𝙸𝚂𝚃 gives area to the left, which we must remember so that a correct p-value is computed.

Example 10.4.2.

A pet food manufacturer claims that each can of cat food they make contains 6 ounces of product. The manufacturer is concerned that the cans are being overfilled, so the company randomly selects 25 cans and measures the contents. The sample average and sample standard deviation for the sample are 6.20 and 0.51 ounces, respectively. At a level of 5%. test whether there is significant evidence that the cans are, on average, being overfilled. It is reasonable to assume that the population of ounces of food in cans is normal, and for reasons unknown, the population standard deviation is known to be σ=0.50.

Solution: From Example 10.3.2 on page 10.3.2, the null hypotheses H0 is μ6 and the direction of extreme to the right. Since the population is normal and σ is known, we can use a Z-Test. Since we need to compute a z-score anyhow, we will consistently use the z-score to compute the p-value.

The z-score for the observed sample mean x¯=6.20 is

z0=6.2-60.5/25=2.0.

The p-value is the chance of observing z0=2.0, or anything more extreme (larger), assuming H0 is true (μ=6). That is, the p-value is

P(Z2.0)=area under N(0,1) to the right of 2.0,

as shown in Figure 10.9.

Figure 10.11: p-value using N(0,1)

The calculation in Excel is given in Figure 10.12.

Figure 10.12: p-value using N(0,1)

Since the p-value is α, we reject H0. That is, there is significant evidence (Z=2.0, p=0.0228) that the true average amount of food in the cans is greater than 6 ounces.

Case: Two-Sided Direction of Extreme
H0:μ=μ0H1:μμ0

If the direction of extreme is two-sided, then H0 is of the form μ=μ0. In this case, sample means x¯ that are larger or smaller than μ0 give evidence against H0. Equivalently values of z0 larger or smaller than 0 provide evidence against H0. So to compute a corresponding p-value, we compute area of the tail more extreme than z0, and the area of the tail more extreme than the symmetric value of z0, -z0. More precisely, under the curve N(0,1), the p-value is the combined area to the right of |z0| and to the left of -|z0|. Figure 10.13 illustrates.

Figure 10.13: Two-sided p-value
Example 10.4.3.

Let’s use the sample summary data from Example 10.4.2 on page 10.4.2, but use a two-sided direction of extreme. That is, suppose the competing hypotheses are:

H0:μ=6H1:μ6

For purposes of illustration, let’s perform the hypothesis test using α=0.01.

Solution: The calculation of the test statistic is unchanged, i.e., the test statistic is still

z0=6.20-60.50/25=2.0.

Since the direction of extreme is two-sided, however, the p-value is the chance of observing 2.0 or anything larger, together with the chance of observing -2.0 or anything smaller, assuming H0 is true. The p-value is illustrated in Figure 10.14.

Figure 10.14: Two-tailed p-value

The calculation in Figure 10.15 computes the area to the right of 2.0, then using the symmetry of the standard normal distribution N(0,1), multiplies the result by 2.

Figure 10.15: Two-tailed calculation in Excel

Since the p-value is greater than α, we fail to reject H0. Thus, there is insufficient evidence (Z=2.0, p=0.0455) that the true mean amount of food in the cans is different than 6 ounces.

Bottom line for when a Z-test on a single population mean is appropriate: The population X is known to be normally distributed, or the sample size is sufficiently large (30). The population standard deviation σ is known.

Exercises

  1. 1.

    A psychologist is studying the distribution of IQ scores of girls at an alternative school. They want to test the hypothesis that the average IQ score is higher than 105. A random sample of 34 girls is taken and their sample average score was 106 with a sample standard deviation of 14. It is known that the population standard deviation is 15.

    1. (a)

      What is the population of interest?

    2. (b)

      State the competing hypotheses.

    3. (c)

      What is the direction of extreme?

    4. (d)

      Why is it reasonable to use a Z-Test?

    5. (e)

      Compute the test statistic and corresponding p-value.

    6. (f)

      Sketch the p-value.

    7. (g)

      State your conclusion at the α=0.05 level.

    8. (h)

      State the conclusion in a manner appropriate for a scientific journal.

    9. (i)

      What type of error could have been made?

  2. 2.

    Colleges frequently provide estimates of student expenses such as housing. A local community college claims that the average student housing expense per month is $650. To test the claim, a consultant is hired. The consultant samples 200 students yielding a sample mean of $611.63 and sample standard deviation $132.85. It is known that the population standard deviation is $130.0.

    1. (a)

      What is the population of interest?

    2. (b)

      State the competing hypotheses.

    3. (c)

      What is the direction of extreme?

    4. (d)

      Why is it reasonable to use a Z-Test?

    5. (e)

      Compute the test statistic and corresponding p-value.

    6. (f)

      Sketch the p-value.

    7. (g)

      State your conclusion at the 5% significance level.

    8. (h)

      State the conclusion in a manner appropriate for a scientific journal.

    9. (i)

      What type of error could have been made?

  3. 3.

    A company’s service technicians took an average of 1.8 hours to respond to trouble calls from business customers who had purchased service contracts. The CEO of the company believes that the average response time this year has decreased. A simple random sample size of 35 of independent response times from business customers is selected, yielding a sample mean and sample standard deviation of of 1.5 hours and 0.5 hours, respectively. It is known that the population standard deviation is 0.52 hours.

    1. (a)

      What is the population of interest?

    2. (b)

      State the competing hypotheses.

    3. (c)

      What is the direction of extreme?

    4. (d)

      Why is it reasonable to use a Z-Test?

    5. (e)

      Compute the test statistic and corresponding p-value.

    6. (f)

      Sketch the p-value.

    7. (g)

      State your conclusion at the α=0.05 level.

    8. (h)

      State the conclusion in a manner appropriate for a scientific journal.

    9. (i)

      What type of error could have been made?

  4. 4.

    The Survey of Study Habits and Attitudes (SSHA) is a psychological test that measures the motivations, attitude toward school, and study habits of students. Scores range from 0 to 200. The mean score for U.S. college students is about 115. A teacher who suspects that older students have better attitudes toward school gives the SSHA to 25 students who are at least 30 years of age. Their sample mean score is 133.2, with sample standard deviation 32.0. It is known that the population of scores for students at least 30 years of age is normally distributed and that the population standard deviation is 35.

    1. (a)

      What is the population of interest?

    2. (b)

      State the competing hypotheses.

    3. (c)

      What is the direction of extreme?

    4. (d)

      Why is it reasonable to use a Z-Test?

    5. (e)

      Compute the test statistic and corresponding p-value.

    6. (f)

      Sketch the p-value.

    7. (g)

      State your conclusion at the α=0.10 level.

    8. (h)

      State the conclusion in a manner appropriate for a scientific journal.

    9. (i)

      What type of error could have been made?

  5. 5.

    The average yield of corn in the U.S. is about 135 bushels per acre (BPA). A survey of 25 farmers this year gives a sample mean yield of 138.4 BPA and sample standard deviation yield of 15.1 BPA. We want to know whether this is good evidence that the national mean this year is not 135 bushels per acre. Assume that the farmers surveyed are a simple random sample from the population of all commercial corn growers, and that the population of bushels per acre is normally distributed. It is known that the population standard deviation is 15.0 BPA.

    1. (a)

      What is the population of interest?

    2. (b)

      State the competing hypotheses.

    3. (c)

      What is the direction of extreme?

    4. (d)

      Why is it reasonable to use a Z-Test?

    5. (e)

      Compute the test statistic and corresponding p-value.

    6. (f)

      Sketch the p-value.

    7. (g)

      State your conclusion at the 10% level.

    8. (h)

      State the conclusion in a manner appropriate for a scientific journal.

    9. (i)

      What type of error could have been made?

10.4.2 Decision Rules and Critical Values

Recall that a decision rule is a description of the values for either X¯ or Z for which a null hypothesis H0 will be rejected. The collection of these values is called a rejection region. A value of x¯* or z* that delineates between rejecting and failing to reject H0 is called a critical value.

These terms don’t add anything new structurally to hypothesis testing, but they are terms used by some scientists. Hence, we should be familiar with their meanings.

Case: Direction of Extreme to the Left

Suppose that H0 is the claim that μμ0. Note that the direction of extreme is to the left. Suppose that the significance level α is given. In order to reject H0, we would need that the observed p-value is α, so the largest possible p-value that still results in rejecting H0 is if the p-value is equal to α. Let z* denote the value of Z that gives a p-value equal to α, i.e.,

α=P(Zz*)= area to the left of z* under N(0,1).

This is shown in Figure 10.16.

Figure 10.16: z* and α

For an observed z0, H0 is rejected if and only z0z*, because the p-value is α if and only if z0z*. This interval, (-,z*), is called the rejection region. Figure 10.17 illustrates.

Figure 10.17: Red area + blue area = α.

We can use the Excel command 𝙽𝙾𝚁𝙼.𝙸𝙽𝚅 to compute z*. For example, if α=0.05, then z*-1.6449 as shown in Figure 10.18.

Figure 10.18: z*

If z* is known, then Equation (10.3) can used to compute the critical value, x¯*, for X¯:

z*=x¯*-μ0σ/n (10.4)

The critical value x¯* works similarly, i.e., H0 is rejected if and only if the observed sample mean x¯ is less than or equal to x¯*.

Example 10.4.4.

Suppose that H0:μ4 and α=0.10. Suppose a random sample of size 40 yields a sample mean of 3.9, and suppose it is known that σ=1.1. Use x* to decide on whether to reject H0.

Solution: Using Excel, we have z*=𝙽𝙾𝚁𝙼.𝙸𝙽𝚅(0.1,𝟶,𝟷)-1.28. Equation (10.4) gives

-1.28=x¯*-41.1/40

and hence, x*3.78. Since the direction of extreme is to the left, the rejection region is all real numbers less than or equal to 3.78. The observed sample mean of 3.9 falls outside of the rejection region, so we fail to reject H0.

Remark: In Example 10.4.4, x* can be found directly using 𝙽𝙾𝚁𝙼.𝙸𝙽𝚅, as shown in Figure 10.19. Note that computation uses the assumption that the H0 is true in similar fashion to computing a p-value, i.e., μ0=4 is used for the population mean μ, and σ/n=1.1/40 for the standard deviation.

Figure 10.19: x* using 𝙽𝙾𝚁𝙼.𝙸𝙽𝚅

Case: Direction of Extreme to the Right

The only change here is that the direction of extreme switches the inequalities. For example, if the direction of extreme is to the right, then z* is chosen so that

α=P(Zz*)=area to the right of z* under N(0,1).

Figure 10.20 illustrates.

Figure 10.20: z* and α

For example, suppose α=0.01 and the direction of extreme is to the right. Then

z*=𝙽𝙾𝚁𝙼.𝙸𝙽𝚅(0.99,𝟶,𝟷)2.3263,

as illustrated in Figure 10.21.

Figure 10.21: z*=𝙽𝙾𝚁𝙼.𝙸𝙽𝚅(0.99,𝟶,𝟷)

Case: Two-sided Direction of Extreme

If the direction of extreme is two-sided, then in order to determine the value of z*, the significance level α is split in half over the two tales. This is shown in Figure 10.22.

Figure 10.22: Two-sided Direction of Extreme
Example 10.4.5.

Suppose the direction of extreme is two-sided and that α=0.05. Compute z*.

Solution: The area in each tail is α/2=0.025, so the area to the left of z* is 0.975, as shown in Figure 10.23.

Figure 10.23: Two-tailed z*

Using Excel, the value of z* can be computed using 𝙽𝙾𝚁𝙼.𝙸𝙽𝚅 as follows:

z*=𝙽𝙾𝚁𝙼.𝙸𝙽𝚅(0.975,𝟶,𝟷)1.96.

In the Concepts Check below, assume that has been determined appropriate to use a Z-Test.

Concepts Check: 1. Suppose the direction of extreme is to the left. If α=0.2, what is the value of z*? Answer: z*=𝙽𝙾𝚁𝙼.𝙸𝙽𝚅(0.2,𝟶,𝟷)-0.8416 2. Suppose the direction of extreme is to the right. If α=0.15, what is the value of z*? Answer: z*=𝙽𝙾𝚁𝙼.𝙸𝙽𝚅(0.85,𝟶,𝟷)1.0364 3. Suppose the direction of extreme is two-sided. If α=0.1, what is the value of z*? Answer: z*=𝙽𝙾𝚁𝙼.𝙸𝙽𝚅(0.95,𝟶,𝟷)1.6449 4. Suppose the direction of extreme is to the left. If α=0.2, what is the decision rule? Answer: z*=-0.8416 (from Problem 1). The decision rule is, “Reject H0 if the observed z0 is less than or equal to -0.8416. 5. Suppose the direction of extreme is two-sided. If α=0.1, what is the decision rule? Answer: z*=1.6449 (from Problem 3). The decision rule is, “Reject H0 if the observed z0 is less than or equal to -1.6449 or greater or equal to 1.6449.” 6. Suppose that the direction of extreme is to the left. It is determined that z*=3.1, and from a sample of size 30, z0=3.3 is observed. What decision is made? Answer: Fail to reject H0, because z0z*. 7. Suppose that H0 is the claim μ10 and that α=0.15 has been chosen. If a sample of size n=50 is selected, yielding a sample mean of 10.4, what is the approximate value of x¯*? Assume σ=2.0 Answer: The direction of extreme is to the right, and for α=0.15 the value of z*1.0364 (from Problem 2). Using Equation 10.4, we have
1.0364=x¯*-102.0/50,
and solving for x¯* gives x¯*10.29. Or, equivalently, the Excel command
𝙽𝙾𝚁𝙼.𝙸𝙽𝚅(0.85,𝟷𝟶,𝟸/𝚂𝚀𝚁𝚃(𝟻𝟶))
yields that same result.

Exercises

  1. 1.

    A psychologist is studying the distribution of IQ scores of girls at an alternative school. They want to test the hypothesis that the average IQ score is higher than 105. A random sample of 34 girls is taken and their average score was 106 with a standard deviation of 14. Use α=0.05 and and assume σ=15.

    1. (a)

      What is the value of z*?

    2. (b)

      In terms of z*, what is the decision rule?

    3. (c)

      What is the rejection region?

    4. (d)

      What is the relationship between the decision rule and the rejection region?

  2. 2.

    Colleges frequently provide estimates of student expenses such as housing. A local community college claims that the average student housing expense per month is $650. To test the claim, a consultant is hired. The consultant samples 200 students yielding a sample mean of $611.63 and sample standard deviation $132.85. Use α=0.05 and assume σ=130.

    1. (a)

      What is the approximate value of x*?

    2. (b)

      In terms of x*, what is the decision rule?

    3. (c)

      Using part (b) and the observed sample mean, what is the decision made?

  3. 3.

    A company’s service technicians took an average of 1.8 hours to respond to trouble calls from business customers who had purchased service contracts. The CEO of the company believes that the average response time this year has decreased. A simple random sample size of 35 of independent response times from business customers is selected, yielding a sample mean and sample standard deviation of of 1.5 hours and 0.5 hours, respectively. Use α=0.1 and assume σ=1.

    1. (a)

      What is the value of z*?

    2. (b)

      In terms of z*, what is the decision rule?

    3. (c)

      Using part (b) and the observed sample mean, what is the decision made?

  4. 4.

    The Survey of Study Habits and Attitudes (SSHA) is a psychological test that measures the motivations, attitude toward school, and study habits of students. Scores range from 0 to 200. The mean score for U.S. college students is about 115. A teacher who suspects that older students have better attitudes toward school gives the SSHA to 30 students who are at least 25 years of age. Their sample mean score is 133.2, with sample standard deviation 32.0. Use α=0.05 and assume σ=30.

    1. (a)

      What is the approximate value of x*?

    2. (b)

      In terms of x*, what is the decision rule?

    3. (c)

      Using part (b) and the observed sample mean, what is the decision made?