Docsity

Hypothesis Testing about the Mean: Z-Test and P-Value - Prof. David K. Neal, Exams of Statistics

Toggle sidebar
bg1
Dr. Neal, Spring 2009
MATH 203 Hypothesis Tests
about the Mean
Let
X
be a measurement with mean and standard deviation . Suppose someone
has made the claim that =
M
. If true, then for large random samples of
n
measurements, the distribution of all possible sample means
x
is approximately
N M, / n
( )
. (The distribution is exactly N M, / n
( )
for any sample size when
X
is
normally distributed.) Thus, the bounds that contain the various
x
with probability
r
=
1−
are given by
M−z/2
n≤x ≤M+z/2
n,
or approximately
M−z/2 S
n≤x ≤M+z/2 S
n.
Example 1. Suppose the packaged weights of a product are to have a mean of 50 oz.
with a standard deviation of 0.7 oz. But a random check 49 packages yields
x
= 49.7 oz.
Is that unusual? What is the probability of obtaining an
x
as low as 49.7 (i.e. 49.7 or
lower) with a sample of size 49?
Solution. If =50 oz. and = 0.7, were true, then 95% of the
x
from random samples
of size
n
= 49 should be from 50 −1.96 ×0.7
49
to 50 +1.96 ×0.7
49
which is from 49.804 oz.
to 50.196 oz. We see that
x
= 49.7 is well below the left bound of the confidence
interval; thus it is a rare event to obtain an
x
this low.
To find the probability of having
x
≤ 49.7, we note that
x
≈ N, / n
( )
=
N50, 0.7
49
= N50, 0.1
( )
. We then can compute P(x ≤49.7) with the command
normalcdf(-1E99, 49.7, 50, 0.1):
We see that P(x ≤49.7) ≈ 0.00135.
So it is very rare to obtain an
x
as low as 49.7 if really equals 50 with = 0.7.
If = 50 oz. and = 0.7 were true, then there would be only a 0.00135
probability of obtaining an
x
of 49.7 or lower with a sample of size 49. This
small probability, called the
-value, gives evidence to reject the claim that
= 50 oz. in favor of the alternative that < 50 oz.
pf3
pf4
pf5

Partial preview of the text

Download Hypothesis Testing about the Mean: Z-Test and P-Value - Prof. David K. Neal and more Exams Statistics in PDF only on Docsity!

MATH 203 Hypothesis Tests

about the Mean

Let X be a measurement with mean and standard deviation. Suppose someone has made the claim that = M. If true, then for large random samples of n measurements, the distribution of all possible sample means x is approximately

N M ( , / n ). (The distribution is exactly N M ( , / n ) for any sample size when X is

normally distributed.) Thus, the bounds that contain the various x with probability r = 1 − are given by

M −

z (^) / n

≤ x ≤ M +

z (^) / n

or approximately

M −

z (^) /2 S n

≤ x ≤ M +

z (^) /2 S n

.

Example 1. Suppose the packaged weights of a product are to have a mean of 50 oz. with a standard deviation of 0.7 oz. But a random check 49 packages yields x = 49.7 oz. Is that unusual? What is the probability of obtaining an x as low as 49.7 (i.e. 49.7 or lower) with a sample of size 49?

Solution. If = 50 oz. and = 0.7, were true, then 95% of the x from random samples

of size n = 49 should be from 50 −

1.96 × 0.

to 50 +

1.96 × 0.

which is from 49.804 oz.

to 50.196 oz. We see that x = 49.7 is well below the left bound of the confidence interval; thus it is a rare event to obtain an x this low.

To find the probability of having x ≤ 49.7, we note that x ≈ N ( , / n ) =

N 50,

 = N ( 50, 0.1). We then can compute P ( x ≤ 49.7) with the command

normalcdf(-1E99, 49.7, 50, 0.1) :

We see that P ( x ≤ 49.7) ≈ 0.00135. So it is very rare to obtain an x as low as 49.7 if really equals 50 with (^) = 0.7.

If = 50 oz. and = 0.7 were true, then there would be only a 0. probability of obtaining an x of 49.7 or lower with a sample of size 49. This small probability, called the P -value, gives evidence to reject the claim that = 50 oz. in favor of the alternative that < 50 oz.

If = M , then most often we should have M −

z (^) / n

≤ x ≤ M +

z (^) / n

Equivalently we would have −

z (^) / n

≤ x − M ≤

z (^) / n

, or

− z (^) /2 ≤

x − M

n

≤ z (^) /.

The value

x − M

n

is called the z -test statistic, denoted by z. So the test statistic

should be within ± z (^) /2. When the test statistic is too small or too large, that is beyond

± z (^) /2 , then x is also too small or too large, and we have evidence to reject the claim

that = M. In the previous example, the test statistic is z =

= –3. And this

value is beyond even the 99% z -scores of ± 2.576 which leave only 0.005 probability at each tail. Thus, there is less than 0.005 probability of having a z -statistic as low as –3. (As we have seen, the probability is actually about 0.00135.)

The Z–Test Feature

Item 1 in the STAT TESTS menu is the Z–Test screen that computes the z -test statistic and P -value p for such an hypothesis test about the mean. The Inpt can be set to Stats (if we already have n and x ) or to Data if we have entered measurements into a list. The previous example can be written formally as

A null hypothesis of H 0 : = 50 versus an alternative hypothesis of Ha : < 50.

We have chosen this left-sided alternative because the value of x = 49. is less than the initial claim of = 50.

Level of Significance

The level of significance, denoted by , is the pre-assigned allowable bound for the P - value p. If p < , then we believe we have enough evidence to reject the null hypothesis. Generally, we take = 0.05. In the above example, the P -value is 0. which is less than = 0.05; so we have strong evidence to reject H 0.

Practice Homework

In each case, compute the P -value and explain your conclusion in terms of the P -value (see the boxed explanations in Examples 1 and 2.)

  1. A student group claims that, on average, first-year students at a university study 2. hours per night during the school week. A skeptic suspects that they study less than that on average. A class survey finds that the average study time claimed by 269 students is x = 137 minutes. Assume that the study time follows a normal distribution with standard deviation = 65 minutes. Carry out a test of H 0 : = 150 minutes

against the one-sided alternative Ha : < 150 minutes.

  1. The systolic blood pressure for males 35 to 44 years of age varies normally with mean 128 and standard deviation 15. But in a large company, a sample of 72 executives in this age group have a mean systolic blood pressure of x = 126.07. Is this evidence that the company’s executives in this age group have a different mean systolic blood pressure from the general population? Carry out a two-sided test.
  2. The DMS odor thresholds (in μg/liter) for 10 untrained wine tasters are

31 31 43 36 23 34 32 30 20 24

Assume that the odor threshold is normally distributed with = 7. Is there significant evidence that the mean threshold for untrained tasters is greater than 25?

  1. Explain the conclusions of Exercises 1 and 3 in terms of the test-statistic, z -score, and = 0.05 level of significance.

Solutions

  1. We test H 0 : = 150 versus Ha : < 150

with the Z–Test.

The z -statistic is –3.28 which gives a P -value of about 0.00052.

Proper Explanation : If = 150 and = 65 were true, then there would be only a 0.00052 probability of obtaining an x of 137 or lower with a sample of size 269. This small P -value gives strong evidence to reject the claim that = 150 in favor of the alternative that < 150.


  1. We test H 0 : = 128 versus Ha : ≠ 128 with the Z–Test. The z -statistic is –1.

which gives a two-sided P -value of 0.274933.

Proper Explanation : If = 128 and = 15 were true, then there would still be a 27.49% chance of obtaining a sample mean as far away from 128 as x = 126.07 with a sample of size 72. The large P -value means we do not have evidence to reject H 0.


  1. We test H 0 : = 25 versus Ha : > 25. Enter the data into a list, then apply the Z–

Test with the Inpt on Data. The z -statistic is 2.44 which gives a P -value of about 0.00735.

If = 25 and = 7 were true, then there would be only a 0.00735 probability of obtaining an x of 30.4 or higher with a sample of size 10. This small P -value gives strong evidence to reject the claim that = 25 in favor of the alternative that > 25.


  1. Ex. 1: The test stat is

x − M

n

= −3.28. For an alternative of Ha : < 150 at

= 0.05 level of significance, the z -score that creates 0.05 probability at the left-tail is

  • 1.645. The test stat is beyond –1.645; so x = 137 is too low and gives us significant evidence to reject = 150.

Ex. 3: For an alternative of Ha : > 25 at = 0.05 level of significance, the z -score that

creates 0.05 probability at the right-tail is +1.645. The test stat of 2.44 is beyond 1.645, so x = 30.4 is too high and gives us enough evidence to reject = 25.