MATHEMATICS AS A
TOOL FOR DATA
MANAGEMENT
Hypothesis Tests for One
Population Mean
By RUMPELSTILTSKIN
Upon completing this module, you should be able
to:
1. Define the terms associated with hypothesis
testing.
2. Choose the null and alternative hypotheses for
a hypothesis test.
LEARNING 3. Explain the logic behind hypothesis testing.
OBJECTIVES 4. Identify the test statistic, rejection region, non-
rejection region, and critical value(s) for a
hypothesis test.
5. Define and apply the concepts of Type I and
Type II errors.
6. State and interpret the possible conclusions for
a hypothesis test.
2
7. Obtain the critical value(s) for a
specified significance level.
8. Perform a hypothesis test for a
population mean when the population
standard deviation is known.
LEARNING 9.
test.
Obtain the P-value of a hypothesis
OBJECTIVES 10. State and apply the steps for
(CONT.) performing a hypothesis test, using the critical-
value approach to hypothesis testing.
11. State and apply the steps for
performing a hypothesis test, using the P-value
approach to hypothesis testing.
12. Perform a hypothesis test for a
population mean when the population
standard deviation is unknown.
3
HOW IS A STATISTIC
USED?
Recall some methods for obtaining the
confidence intervals for one population mean.
A confidence interval for a population mean, is
based on a sample mean (a statistic).
In this lecture - module, we are going to look at
how a statistic (sample mean) is used to make
decisions about hypothesized values of a
parameter (population mean.)
4
One of the commonly
used methods for making
decision is to perform a
hypothesis test
DECISION
A hypothesis test involves
two hypotheses: the null AND
hypothesis and the
alternative hypothesis. HYPOTHESIS
TEST
“Testing a hypothesis” is
like “testing a claim.”
5
Hypotheses are working models that we adopt
temporarily.
Our starting hypothesis is called the null
hypothesis.
The null hypothesis, that we denote by H0,
WHAT ARE specifies a population model parameter of
interest and proposes a value for that
HYPOTHESES? parameter.
We usually write down the null hypothesis in the
form H0: parameter = hypothesized value.
The alternative hypothesis, which we denote by
HA, contains the value of the parameter that
we consider plausible when we reject the null
hypothesis.
6
The first step in defining the null and alternative
hypotheses is to determine which parameter is
being tested. A parameter describes a population.
Examples are the population mean, the population
standard deviation and the population proportion.
TESTING The next step is to define the null hypothesis,
HYPOTHESES specifies a population model parameter of interest
and proposes a value for that parameter.
We might have, for example, H0: parameter =
0.20
We want to compare our data to what we
would expect, given that H0 is true.
Note that the null hypothesis is a statement of
equality (with the equal sign.)
7
Think about the logic of jury trials:
A TRIAL AS A To prove someone is guilty, we start by assuming he/she
is innocent.
HYPOTHESIS We retain that hypothesis until the facts make it unlikely
beyond a reasonable doubt.
TEST Then, and only then, we reject the hypothesis of
innocence and declare the person guilty.
8
The same logic used in jury trials is used in
A TRIAL AS A statistical tests of hypotheses:
We begin by assuming that a hypothesis is true.
HYPOTHESIS Next we consider whether the data are consistent with
the hypothesis.
TEST (CONT.) If they are, all we can do is retain the hypothesis we
started with. If they are not, then like a jury, we ask
whether they are unlikely beyond a reasonable doubt.
9
W HAT AR E N ULL HY POT HE S I S, ALT E RNA TI V E H YPO THE S I S AND H YPO THE S I S T ES T ,
AGA IN?
10
WHAT ARE TYPE I ERROR AND
TYPE II ERROR?
The probability of making type I error, that is, of
rejecting a true null hypothesis, is called the
significance level of a hypothesis test.
11
WHAT IS THE POWER OF A
HYPOTHESIS TEST?
12
WHAT TO DO If the evidence is not strong enough to reject
the presumption of innocent, the jury returns
WITH AN with a verdict of “not guilty.”
The jury does not say that the defendant is innocent.
“INNOCENT” All it says is that there is not enough evidence to
convict, to reject innocence.
DEFENDANT? The defendant may, in fact, be innocent, but the jury
has no way to be sure.
13
WHAT TO DO Said statistically, we will fail to reject the null
WITH AN hypothesis.
“INNOCENT” We never declare the null hypothesis to be true,
because we simply do not know whether it’s true or
not.
DEFENDANT Sometimes in this case we say that the null hypothesis
has been retained.
?(CONT.)
14
In a trial, the burden of proof is
on the prosecution.
WHAT TO DO
WITH AN
“INNOCENT” In a hypothesis test, the burden
of proof is on the unusual claim.
DEFENDANT
?(CONT.) The null hypothesis is the
ordinary state of affairs, so it’s
the alternative to the null
hypothesis that we consider
unusual (and for which we must
marshal evidence).
15
There are three possible alternative hypotheses:
HA: parameter < hypothesized value
HA: parameter ≠ hypothesized value
HA: parameter > hypothesized value
WHAT ARE THE THREE POSSIBLE
ALTERNATIVE HYPOTHESES?
16
HA: parameter ≠ value is known as a two-sided
alternative or two-tailed alternative because we
are equally interested in deviations on either side
of the null hypothesis value.
For two-sided alternatives, the P-value is the
WHAT IS A probability of deviating in either direction from the
null hypothesis value.
TWO-SIDED
ALTERNATIVE
HYPOTHESIS
?
17
The other two alternative hypotheses are called
one-sided alternatives or one-tailed alternatives.
A one-sided alternative focuses on deviations from
the null hypothesis value in only one direction.
WHAT IS Thus, the P-value for one-sided alternative is the
probability of deviating only in the direction of the
ONE-SIDED alternative away from the null hypothesis value.
ALTERNATIVE
HYPOTHESIS
?
18
CRITICAL VALUE
AND DECISION
The rejection region (shaded
area) is based on the chosen
significance level, which
determines the critical value -
2 and 2.
When the value of the test-
statistic (z = -2.56) falls in this
rejection region, we reject the
null hypothesis.
19
CRITICAL VALUE AND REJECTION REGION (CONT.)
How to obtain the
critical value -2 in this
case (by TI-84+)?
Press the following
keys: 2nd, DISTR
Then perform:
invNorm(0.0228)
The critical value(s) can be obtained from the standard-normal table or
technology, based on the chosen significance level. In this case, the
significance level is 4.56%. Since this is a two-tailed alternative/two-
tailed test, we divide the significance level by two for each tail.
Hint: Rewrite 4.56% as 0.0456 and then compute 0.0456/2 =0.0228.
20
WHERE IS THE REJECTION REGION?
For a two-tailed or two-sided test, the rejection region is on both the
left and right. For a left-tailed test, the rejection region is on the left.
For a right-tailed test, the rejection region is on the right.
Note that the rejection region is always at the tail(s).
21
ONE-MEAN
Z-TEST
(CRITICAL-
VALUE
APPROACH)
22
ONE-MEAN
Z-TEST
(CRITICAL-
VALUE
APPROACH)
23
Note that P-value is a conditional probability. It tells us
the probability of getting results at least as unusual as the
observed statistic, given that the null hypothesis is true. In
short, we can write
HOW TO P-value = P(observed statistic value | H0)
OBTAIN THE Thus, P-value is not the probability that the null hypothesis
is true. It is the probability about the data.
P-VALUE OF
A
HYPOTHESIS
TEST?
24
The statistical twist is that we can quantify our
level of doubt.
WHAT IS P- We can use the model proposed by our hypothesis to
VALUE,
calculate the probability that the event we’ve
witnessed could happen.
That’s just the probability we’re looking for—it
AGAIN? quantifies exactly how surprised we are to see our
results.
This probability is called a P-value.
25
When the data are consistent with the model
from the null hypothesis, the P-value is high
and we are unable to reject the null
hypothesis.
WHAT IS P- In that case, we have to “retain” the null hypothesis
we started with.
We can’t claim to have proved it; instead we say we
VALUE, “fail to reject the null hypothesis” when the data are
consistent with the null hypothesis model and in line
AGAIN? with what we would expect from natural sampling
variability.
(CONT.) If the P-value is low enough, we’ll “reject the
null hypothesis,” since what we observed
would be very unlikely were the null model
true.
26
WHERE IS THE P-VALUE, AGAIN? (CONT.)
In short, P-value is the probability at the tail(s).
If the P-value is small, we reject the null hypothesis.
Otherwise, we do not reject the null hypothesis.
27
How small should the P-value be in order for
P-VALUES AND you to reject the null hypothesis?
DECISIONS: It turns out that our decision criterion is context-
dependent.
WHAT TO TELL When we’re screening for a disease and want to be
sure we treat all those who are sick, we may be willing
to reject the null hypothesis of no disease with a fairly
ABOUT A large P-value.
A longstanding hypothesis, believed by many to be true,
HYPOTHESIS needs stronger evidence (and a correspondingly small
P-value) to reject it.
TEST? Another factor in choosing a P-value is the
importance of the issue being tested.
28
P-VALUES AND DECISIONS (CONT.)
Your conclusion about any null hypothesis should be accompanied by
the P-value of the test.
If possible, it should also include a confidence interval for the parameter of interest.
Don’t just declare the null hypothesis rejected or not rejected.
Report the P-value to show the strength of the evidence against the hypothesis.
This will let each reader decide whether or not to reject the null hypothesis.
ANY GUIDELINES
ON
HOW TO USE P-
VALUE?
In general, the P-value is the
smallest significance level at
which the null hypothesis can be
rejected. Knowing the P-value
allows us to evaluate the
strength of the evidence
against the null hypothesis. The
smaller the P-value, the
stronger will be the evidence
against the null hypothesis.
30
ONE-MEAN
Z-TEST
(P-VALUE
APPROACH)
31
ONE-MEAN
Z-TEST
(P-VALUE
APPROACH)
32
HERE IS A COMPARISON OF
CRITICAL-VALUE AND P-VALUE
APPROACH
33
HOW TO
CONDUCT A
ONE-MEAN
T-TEST?
34
HOW TO CONDUCT A ONE-
MEAN T-TEST
35
Don’t base your null hypothesis on what you see
in the data.
WHAT CAN GO Think about the situation you are investigating and
develop your null hypothesis appropriately.
WRONG? Don’t base your alternative hypothesis on the
data, either.
Again, you need to Think about the situation.
36
Don’t make your null hypothesis what you want to show to
be true.
You can reject the null hypothesis, but you can never
“accept” or “prove” the null hypothesis.
Don’t forget to check the conditions.
We need randomization, independence, and a sample
that is large enough to justify the use of the Normal
model.
WHAT CAN GO WRONG?
(CONT.)
37
We have learned to:
1. Define the terms associated with
hypothesis testing.
2. Choose the null and alternative
hypotheses for a hypothesis test.
WHAT HAVE 3. Explain the logic behind hypothesis
WE LEARNED? 4.
testing.
Identify the test statistic, rejection region,
non-rejection region, and critical value(s)
for a hypothesis test.
5. Define and apply the concepts of Type I
and Type II errors.
6. State and interpret the possible
conclusions for a hypothesis test.
38
7. Obtain the critical value(s) for a specified
significance level.
8. Perform a hypothesis test for a population
mean when the population standard deviation
is known.
WHAT HAVE 9. Obtain the P-value of a hypothesis test.
WE LEARNED? 10. State and apply the steps for performing a
hypothesis test, using the critical-value
(CONT.) 11.
approach to hypothesis testing.
State and apply the steps for performing a
hypothesis test, using the P-value approach to
hypothesis testing.
12. Perform a hypothesis test for a population
mean when the population standard deviation
is unknown.
39
This presentation is adapted from Dr. A.
Shaw of Valencia CC, who cited the
following textbooks.
Weiss, Neil A., Introductory Statistics, 8th
CREDIT Edition
Weiss, Neil A., Introductory Statistics, 7th
Edition
Bock, David E., Stats: Data and Models, 2nd
Edition
40