Session 12 - Hypothesis Testing-Single Sample Tests
Session 12 - Hypothesis Testing-Single Sample Tests
Sample Tests
Session 12
BUSINESS STATISTICS
Module: V of Course Outline
ANOVA – Session 15
Sample
The Hypothesis Testing Process
Sampling
Distribution of X
X
30 μ = 35
If H0 is true
The Test Statistic and
Critical Values
• If the sample mean is close to the stated population mean, the null
hypothesis is not rejected [do not have enough evidence].
• If the sample mean is far from the stated population mean, the null
hypothesis is rejected [have enough evidence to reject].
• Quantifying “close” and “far” to reject H0: critical value of a test statistic
The Test Statistic and
Critical Values
Sampling Distribution of the test statistic
Region of Region of
Rejection Rejection
Region of
Non-Rejection
Critical Values
Actual Situation
• Type I Error
• Reject a true null hypothesis
• Considered a serious type of error
• The probability of a Type I Error is
• Called level of significance of the test
• Set by researcher in advance
• Type II Error
• Failure to reject a false null hypothesis
• The probability of a Type II Error is β
Type I & II Error Relationship
• β when
• β when σ
• β 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
Hypothesis
Tests for
Known Unknown
(Z test) (t test)
σKnown
Known σUnknown
Unknown
(Z test) (t test)
The test statistic is:
X μ
ZSTAT
σ
n
APPROACH I - Critical Value
Approach to Testing
• For a two-tail test for the mean, σ known:
• Convert sample statistic ( X ) to test statistic (ZSTAT)
• Determine the critical Z values for a specified
level of significance from a table or computer
• Decision Rule: If the test statistic falls in the rejection
region, reject H0 ; otherwise do not reject H0
Two-Tail Tests: Simple Hypothesis Test
H0: μ = 30
There are two
cutoff values H1: μ ¹
(critical values), 30
defining the
regions of /2 /2
rejection
30 X
Reject H0 Do not reject H0 Reject H0
-Zα/2 0 +Zα/2 Z
Lower Upper
critical critical
value 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
H : μ = 30 H1: μ ≠ 30 (This is a two-tail test)
0
= 0.05/2 = 0.05/2
• Remember
• If the p-value is low then H0 must go
The 5 Step p-value approach to
Hypothesis Testing
4. Collect data and compute the value of the test statistic and the
p-value
X μ 29.84 30 0.16
Z STAT 2.0
σ 0.8 0.08
n 100
p-Value Hypothesis Testing Example:
Calculating the p-value
4. (continued) Calculate the p-value.
• How likely is it to get a ZSTAT of -2 (or something further from the mean
(0), in either direction) if H0 is true?
0 Z
-2.0 2.0
p-value = 0.0228 + 0.0228 = 0.0456
p-value Hypothesis Testing Example
(continued)
• 5. Is the p-value < α?
• Since p-value = 0.0456 < α = 0.05 Reject H0
• 5. (continued) State the managerial conclusion in
the context of the situation.
• There is sufficient evidence to conclude the average diameter of a
manufactured bolt is not equal to 30mm.
Connection Between Two Tail
Tests and Confidence Intervals
For X = 29.84, σ = 0.8 and n = 100, the 95%
confidence interval is:
0.8 0.8
29.84 - (1.96) to 29.84 (1.96)
100 100
29.6832 ≤ μ ≤ 29.9968
σKnown
Known σUnknown
Unknown
(Z test) (t test)
The test statistic is:
X μ
t STAT
S
n
Example: Two-Tail Test
( Unknown)
The average cost of an unskilled labor
in Odisha is said to be Rs. 168 per day.
To determine if this is true, a random
sample of 25 labour/district is taken
and resulted in an X of Rs. 172.50 and
an S of Rs. 15.40. Test the appropriate
hypotheses at = 0.05.
±t24,0.025 = ± 2.0639
Do not reject H0: insufficient evidence that
true labor cost is different from Rs.168
Connection of Two Tail Tests to
Confidence Intervals
For X = 172.5, S = 15.40 and n = 25, the 95%
confidence interval for µ is:
166.14 ≤ μ ≤ 178.86
Critical value
Upper-Tail Tests
H0: μ ≤ 3
There is only one
critical value, since H1: μ > 3
the rejection area is
in only one tail a
Critical value
Example: Upper-Tail t Test
for Mean ( 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)
= 0.10
Xμ 53.1 52
t STAT 0.55
S 10
n 25
Example: Decision
Reach a decision and interpret the result: (continued)
Reject H0
= 0.10
Reject H0
= .10
0
Do not reject Reject H0
H0 1.318
tSTAT = .55
μp (1 )
σp
n
Hypothesis Tests for Proportions
• The sampling
distribution of p is Hypothesis
approximately normal,
so the test statistic is a Tests for p
ZSTAT value:
nπ 5 nπ < 5
and or
pπ
ZSTAT n(1-π) 5 n(1-π) < 5
π (1 π )
Not in scope
n of this course
Z Test for Proportion in Terms of Number in Category of
Interest
• An equivalent form to
the last slide, but in
terms of the number Hypothesis
in the category of Tests for X
interest, X:
X5 X<5
and or
n-X 5 n-X < 5
X n
ZSTAT
n (1 )
Not in scope
of this course
Example: Z Test for Proportion
A marketing company
claims that it receives 8%
responses from its mailing.
To test this claim, a random
sample of 500 were mailed
out of which 25 turned to
purchases. Test at the = Check:
0.05 significance level.
n π = (500)(.08) = 40
n(1-π) = (500)(.92) = 460
Z Test for Proportion: Solution
Test Statistic:
H0: π = 0.08
p π .05 .08
H1: π ¹ ZSTAT 2.47
π (1 π ) .08(1 .08)
a0.08
= 0.05
n 500
n = 500, p = 0.05
Critical Values: ± 1.96 Decision:
Reject Reject Reject H0 at = 0.05
Conclusion:
.025 .025
There is sufficient
-1.96 0 1.96 z evidence to reject the
-2.47 company’s claim of 8%
response rate.
p-Value Solution
(continued)
Calculate the p-value and compare to
(For a two-tail test the p-value is always two-tail)
Do not reject H0
Reject H0 Reject H0 p-value = 0.0136:
/2 = .025 /2 = .025
P(Z 2.47) P(Z 2.47)
-1.96 0 1.96
Z = -2.47 Z = 2.47
1
0 STAT / 2
Reject H if 2 follows
> 2 or STAT 1 / 2
a chi-square 2
if 2 < distribution with d.f. = n-
Hypothesis Test for Variance or Standard Deviation:
Example using Chi-Square Table
Suppose you have gathered a random sample of size 25 and
obtained a sample standard deviation of s = 7 and want to
do the following hypothesis test:
H0: σ2 = 81
Ha: σ2 ≠ 81
(n - 1)S 2 24 * 49
2
χ STAT 2
14.185
σ 81
Since 0.975 12.401 < 14.185 < 0.025 39.364 you fail to reject H0
2 2