Topic 3
Fundamentals of Hypothesis
Testing: One-Sample Tests
What is a Hypothesis?
n A hypothesis is a claim (assertion) about a
population parameter:
n population mean:
Example: The mean monthly cell phone bill
in this city is μ = $42.
n population proportion:
Example: The proportion of adults in this
city with cell phones is π = 0.88.
The Null Hypothesis, H0
n States the claim or assertion to be tested.
n Is always about a population parameter,
not about a sample statistic .
The Null Hypothesis, H0 (continued)
n Begin with the assumption that the null
hypothesis is true.
n Similar to the notion of innocent until
proven guilty.
n Represents the current belief in a situation.
n Always contains “=“, or “≤”, or “≥” sign. n
May or may not be rejected.
The Alternative Hypothesis, H1
n Is the opposite of the null hypothesis.
n e.g., The mean diameter of a manufactured bolt is
not equal to 30mm ( H1: μ ≠ 30 ). n Challenges the
status quo.
n Never contains the “=“, or “≤”, or “≥” sign.
n May or may not be proven.
n Is generally the hypothesis that the
researcher is trying to prove.
The Hypothesis Testing Process
n Claim: The population mean age is 50. n H0: μ = 50, H1: μ ≠
50
n Sample the population and find the sample mean. n
Suppose the sample mean age was X = 20.
n This is significantly lower than the claimed mean
population age of 50.
n If the null hypothesis were true, the probability of getting
such a different sample mean would be very small, so
you reject the null hypothesis .
n In other words, getting a sample mean of 20 is so
unlikely if the population mean was 50, you conclude
that the population mean must not be 50.
The Hypothesis Testing Process
(continued)
Sampling
Distribution of X
X 20
μ = 50
If it is unlikely that you would get a If H0 is true sample ... then you reject
mean of this value ... ... When in the null hypothesis
fact this was the population that μ = 50.
mean…
The Test Statistic and Critical
Values
n If the sample mean is close to the stated
population mean, the null hypothesis is not
rejected.
n If the sample mean is far from the stated
population mean, the null hypothesis is rejected.
n How far is “far enough” to reject H0?
n The critical value of a test statistic creates a “line
in the sand” for decision making -- it answers the
question of how far is far enough.
The Test Statistic and Critical
Values
(continued)
Sampling Distribution of the test statistic
Region of Region of
Rejection Rejection
Region of
Non-Rejection
Critical Values
“Too Far Away” From Mean of Sampling Distribution
Risks in Decision Making Using
Hypothesis Testing
n Type I Error:
n Reject a true null hypothesis. n A Type I error is a
“false alarm.” n The probability of a Type I Error is
a. n Called level of significance of the test.
n Set by researcher in advance.
n Type II Error:
n Failure to reject a false null hypothesis.
n Type II error represents a “missed opportunity.” n
The probability of a Type II Error is β.
Possible Errors in Hypothesis Test
Decision Making
(continued)
Possible Hypothesis Test Outcomes
Actual Situation
Decision H0 True H0 False
Do Not Correct Decision Type II Error
Reject H0 Confidence = 1 - α P(Type II Error) = β
Reject H0 Type I Error Correct Decision
P(Type I Error) = α Power = (1 – β)
Possible Errors in Hypothesis Test
Decision Making (continued)
n The confidence coefficient (1-α) is the
probability of not rejecting H0 when it is true.
n The confidence level of a hypothesis test is
(1-α)*100%.
n The power of a statistical test (1-β) is the
probability of rejecting H0 when it is false.
Type I & II Error Relationship
§ Type I and Type II errors cannot happen at
the same time.
§ A Type I error can only occur if H0 is true.
§ A Type II error can only occur if H0 is false.
Factors Affecting Type II Error
n All else equal,
n β when the difference between
hypothesized parameter and its true value .n
β when a . n β when σ .n β
when n .
Level of Significance and
the Rejection Region
H0: μ = 30 Level of significance = a
H1: μ ≠ 30
a /2 a /2
30
Critical values
Rejection Region
This is a two-tail test because there is a rejection region in both tails
Hypothesis Tests for the Mean
Hypothesis
Tests for µ
s Known s Unknown
(Z test) (t test)
Z Test of Hypothesis for the
Mean (σ Known)
Critical Value
Approach to Testing
n For a two-tail test for the mean, σ known:
n Convert sample statistic ( ) to test statistic !
(ZSTAT.) n Determine the critical Z values for a
specified level of significance a from a table or
by using computer software.
n Decision Rule: If the test statistic falls in the
rejection region, reject H0 otherwise do not
reject H0.
Two-Tail Tests
H0: μ = 30
n There are two cutoff values
H1: μ ¹ 30
(critical values),
defining the
regions of a /2 a /2
rejection.
30 X
Reject H 0 Do not reject H 0 Reject H 0
-Zα/2 0 +Zα/2 Z
Lower Upper
critical critical
value value
Steps in The Critical Value Approach
To Hypothesis Testing
1. State the null hypothesis, H0 and the alternative
hypothesis, H1.
2. Choose the level of significance, a, and the
sample size, n. The level of significance is based
on the relative importance of Type I and Type II
errors in the problem.
3. Determine the appropriate test statistic and
sampling distribution.
4. Determine the critical values that divide the
rejection and nonrejection regions.
Steps in The Critical Value (continued)
Approach To Hypothesis Testing
5. Collect the sample data, organize the results,
and compute the value of the test statistic.
6. Make the statistical decision, determine whether
the assumptions are valid, and state the
managerial conclusion in the context of the
theory, claim, or assertion being tested. If the
test statistic falls into the nonrejection region,
you do not reject the null hypothesis H0. If the
test statistic falls into the rejection region, reject
the null hypothesis.
Hypothesis Testing Example
Test the claim that the true mean diameter of a
manufactured bolt is 30mm.
(Assume σ = 0.8)
1. State the appropriate null and alternative
hypotheses: n H0: μ = 30 H1: μ ≠ 30 (This is
a two-tail test).
2. Specify the desired level of significance and the
sample size: n Suppose that a = 0.05 and n = 100
are chosen for this test.
Hypothesis Testing Example
(continued)
3. Determine the appropriate technique:
nσ is assumed known so this is a Z test.
4. Determine the critical values:
n For a = 0.05 the critical Z values are ±1.96.
5. Collect the data and compute the test statistic.
n Suppose the sample results are:
n = 100, X = 29.84 (σ = 0.8 is assumed known).
So the test statistic is:
Hypothesis Testing Example(continued)
n 6. Is the test statistic in the rejection region?
Hypothesis Testing Example
(continued)
6 (continued). Reach a decision and interpret the result.
a = 0.05/2 a = 0.05/2
Reject H 0 Do not reject H 0 Reject H 0
-Zα/2 = -1.96 0 +Zα/2= +1.96
-2.0
Since ZSTAT = -2.0 < -1.96, reject the null hypothesis
and conclude there is sufficient evidence that the mean
diameter of a manufactured bolt is not equal to 30.
p-Value Approach to Testing
n p-value: Probability of obtaining a test
statistic equal to or more extreme than the
observed sample value given H0 is true.
n The p-value is also called the observed level of
significance.
n It is the smallest value of a for which H0 can be
rejected.
p-Value Approach to Testing:
Interpreting the p-value
n Compare the p-value with a:
n If p-value < a , reject H0. n If
p-value ³ a , do not reject H0.
n Remember
n If the p-value is low then H0 must go.
The 5 Step p-value approach to
Hypothesis Testing
1. State the null hypothesis, H0 and the alternative hypothesis,
H1.
2. Choose the level of significance, a, and the sample size, n.
The level of significance is based on the relative importance
of the risks of a type I and a type II error.
3. Determine the appropriate test statistic and sampling
distribution.
4. Collect the sample data, compute the value of the test
statistic and the p-value.
5. Make the statistical decision and state the managerial
conclusion in the context of the theory, claim, or assertion
being tested. If the p-value is < α reject H0.
p-value Hypothesis Testing
Example
Test the claim that the true mean diameter
of a manufactured bolt is 30mm.
(Assume σ = 0.8)
1. State the appropriate null and alternative
hypotheses: n H0: μ = 30 H1: μ ≠ 30 (This is a
two-tail test).
2. Specify the desired level of significance and the
sample size: n Suppose that a = 0.05 and n = 100
are chosen for this test.
p-value Hypothesis Testing
Example (continued)
3. Determine the appropriate technique:
n σ is assumed known so this is a Z test.
4. Collect the data, compute the test statistic and the
pvalue. n Suppose the sample results are:
n = 100, X = 29.84 (σ = 0.8 is assumed known.) So
the test statistic is:
p-Value Hypothesis Testing Example:
Calculating the p-value (continued)
4. (continued) Calculate the p-value.
n How likely is it to get a ZSTAT of -2 (or something further from the
mean (0), in either direction) if H0 is true?
p-value Hypothesis Testing
Example (continued)
n 5. Is the p-value < α? n Since p-value = 0.0456 <
α = 0.05 Reject H0.
n 5. (continued) State the managerial
conclusion in the context of the situation.
n There is sufficient evidence to conclude the mean diameter of a
manufactured bolt is not equal to 30mm.
Connection Between Two Tail Tests
and Confidence Intervals
n For X = 29.84, σ = 0.8 and n = 100, the 95%
confidence interval is:
n Since this interval does not contain the hypothesized
mean (30), we reject the null hypothesis at a = 0.05.
Do You Ever Truly Know σ?
n Probably not!
n In virtually all real world business situations, σ is not
known.
n If there is a situation where σ is known then µ is also
known (since to calculate σ you need to know µ.)
n If you truly know µ there would be no need to gather a
sample to estimate it.
Hypothesis Testing for the Mean: σ
Unknown
n If the population standard deviation is unknown, you
instead use the sample standard deviation S.
n Because of this change, you use the t distribution instead
of the Z distribution to test the null hypothesis about the
mean.
n When using the t distribution you must assume the
population you are sampling from follows a normal
distribution.
n All other steps, concepts, and conclusions are the same.
t Test of Hypothesis for the Mean
(σ Unknown)
n Convert sample statistic ( X ) to a tSTAT test statistic
Example: Two-Tail Test (s Unknown)
Example Solution:
Example Solution: Two-Tail t Test
To Use the
t-test Must Assume the Population
Is Normal
n As long as the sample size is not very small
and the population is not very skewed, the t-
test can be used.
n To evaluate the normality assumption:
n Determine how closely sample statistics match the
normal distribution’s theoretical properties.
n Construct a histogram or stem-and-leaf display or
boxplot. n Construct a normal probability plot.
Room Rate
Evaluating Normality
Room Rate Normal Prob. Plot
Mean 170.93
250
Median 171.62
Mode #N/A • The 200
mean
Minimum 143.94
and
Room Rate
Maximum 222.41 150
Range 78.46235266 median are
Variance 265.5409
close. 100
Standard Deviation
16.2954 50
Coeff. of Variation 9.53%
Skewness 1.0241 0
-2 -1 0 1 2
Kurtosis 3.1074
Z Value
Count 25
Boxplot of Room Rate
Standard Error 3.2591 • Normal prob. plot
approximately
straight line.
• Box plot is only somewhat skewed high.
• Conclude population is
140 160 180 200 220 240
approximately normal.
Example Two-Tail t Test Using A p-value
from Excel
n Since this is a t-test we cannot calculate the p-value
without some calculation aid.
n The Excel output below does this:
Connection of Two Tail Tests to
Confidence Intervals
n For X = 172.5, S = 15.40 and n = 25, the 95%
confidence interval for µ is:
172.5 - (2.0639) 15.4/ 25 to 172.5 + (2.0639) 15.4/ 25
166.14 ≤ μ ≤ 178.86
n Since this interval contains the Hypothesized mean (168),
we do not reject the null hypothesis at a = 0.05.
One-Tail Tests
n In many cases, the alternative hypothesis
focuses on a particular direction:
This is a lower-tail test since the
H0: μ ≥ 3
alternative hypothesis is focused on the
H1: μ < 3 lower tail below the mean of 3.
H0: μ ≤ 3 This is an upper-tail test since the
alternative hypothesis is focused on the
H1: μ > 3 upper tail above the mean of 3.
Lower-Tail Tests
DCOVA
H0: μ ≥ 3
n There is only one critical value, H1: μ < 3 since the
rejection area is in
only one tail.
a
Reject H 0 Do not reject H 0
0
Z or t
-Zα or -tα
μ X
Critical value
Upper-Tail Tests
H0: μ ≤ 3
n There is only one critical
value, since H1: μ > 3
the rejection area is
in only one tail. a
Do not reject H 0 Reject H 0
Z or t 0 Zα or tα
_
X μ
Critical value
Example: Upper-Tail t Test
for Mean (s unknown)
A phone industry manager thinks that
customer monthly cell phone bills have
increased, and now average over $52 per
month. The company wishes to test this claim.
(Assume a normal population.)
Form hypothesis test:
H0: μ ≤ 52 the mean is not over $52 per month
H1: μ > 52 the mean is greater than $52 per month
(i.e., sufficient evidence exists to support the
manager’s claim)
Example: Find Rejection Region
(continued)
n Suppose that a = 0.10 is chosen for this test and
n = 25.
Find the rejection region: Reject H0
a = 0.10
Do not reject H 0 Reject H 0
0 1.318
Reject H0 if tSTAT > 1.318
Example: Test Statistic (continued)
Obtain sample and compute the test statistic.
Suppose a sample is taken with the following
results: n = 25, X = 53.1, and S = 10.
n Then the test statistic is:
Example: Decision (continued)
Reach a decision and interpret the result.
Reject H0
a = 0.10
Do not reject H 0 Reject H 0
0
1.318
tSTAT = 0.55
Do not reject H0 since tSTAT = 0.55 < 1.318.
There is not sufficient evidence that the
mean bill is over $52.
Example: Utilizing The p-value for
The Upper Tail t-Test
Calculate the p-value and compare to a (p-value calculation
n
via Excel, Minitab, & JMP shown on next page)
p-value = .2937
Reject H0
a = .10
0
Do not reject Reject
H0 1.318 H0
tSTAT = .55
Do not reject H0 since p-value = .2937 > a = .10
Calculating The p-value for The Upper
Tail t-Test In Excel
Hypothesis Tests for Proportions
n Involves categorical variables.
n Two possible outcomes:
n Possesses characteristic of interest.
n Does not possess characteristic of interest.
n Fraction or proportion of the population in the
category of interest is denoted by π.
Proportions (continued)
n Sample proportion in the category of interest is
denoted by p.
n When both nπ and n(1-π) are at least 5, p
can be approximated by a normal distribution
with mean and standard deviation: n
Hypothesis Tests for Proportions
Z Test for Proportion in Terms of
Number in Category of Interest
Example: Z
Test for Proportion
Z Test for Proportion: Solution
p-Value Solution (continued)
Questions To Address In The
Planning Stage
n What is the goal of the survey, study, or experiment?
n How can you translate this goal into a null and an alternative
hypothesis?
n Is the hypothesis test one or two tailed? n Can a random sample be
selected? n What types of data will be collected? Numerical?
Categorical? n What level of significance should be used? n Is the
intended sample size large enough to achieve the desired power? n
What statistical test procedure should be used and why?
n What conclusions & interpretations can you reach from the results of
the planned hypothesis test?
Failing to consider these questions can lead to bias or
incomplete results.
Statistical Significance vs Practical
Significance
n Statistically significant results (rejecting the null
hypothesis) are not always of practical
significance.
n This is more likely to happen when the sample size gets
very large.
n Practically important results might be found to
be statistically insignificant (failing to reject the
null hypothesis.) n This is more likely to happen
when the sample size is relatively small.
Reporting Findings & Ethical Issues
n Should document & report both good & bad results. n
Should not just report statistically significant results.
n Reports should distinguish between poor research
methodology and unethical behavior.
n Ethical issues can arise in:
n The use of human subjects. n The data collection method. n The
type of test being used. n The level of significance being used. n
The cleansing and discarding of data. n The failure to report
pertinent findings.
Chapter Summary
In this chapter we discussed:
n The principles of hypothesis testing.
n How to use hypothesis testing to test a mean or
proportion.
n To evaluate the assumptions of each hypothesis-testing
procedure and understand the consequences if
assumptions are seriously violated.
n The pitfalls and ethical issues involved in hypothesis.
testing.
n How to avoid the pitfalls involved in hypothesis testing.