Professional Documents
Culture Documents
Population Mean
H 0 : μ 30 H 0 : X 30
DCOVA
Population
Sample
DCOVA
The Hypothesis Testing Philosophy
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 .
Sampling
Distribution of X
X
20 μ = 50
If H0 is true ... then you reject
If it is unlikely that you
the null hypothesis
would get a sample
that μ = 50.
mean of this value ... ... When in fact this were
the population mean…
DCOVA
Test Statistic and Critical Values?
Region of Region of
Rejection Rejection
Region of
Non-Rejection
Critical Values
Type I Error
Reject a true null hypothesis
A type I error is a “false alarm”
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
Type II error represents a “missed opportunity”
The probability of a Type II Error is β
DCOVA
Risks in Decision Making
Actual Situation
𝜷 𝜶 𝜷 𝜶
Reduce SE for better distinction
Decrease 𝛽 (Increases 𝛼)
(Increase sample size)
𝜷 𝜶
𝜷 𝜶
DCOVA
Hypothesis test for the mean
Hypothesis
Tests for
Known Unknown
(Z test) (t test)
DCOVA
Z Test of Hypothesis for the Mean (σ
Known)
Convert sample statistic ( 𝑋ത ) to a ZSTAT test statistic
X μ
ZSTAT
σ
n
DCOVA
Critical Value Approach
/2 /2
H0: μ = 30 X
30
H1: μ 30
Reject H0 Do not reject H0 Reject H0
-Zα/2 0 +Zα/2 Z
Lower Upper
critical critical
value value
DCOVA
6 Steps in Hypothesis Testing
= 0.05/2 = 0.05/2
Probably not!
If you truly know µ there would be no need to gather a sample to estimate it.
DCOVA
Hypothesis Testing where 𝜎 is unknown
If the population standard deviation is unknown, you instead use the sample
standard deviation S.
Because of this change, you use the t distribution instead of the Z distribution
to test the null hypothesis about the mean.
X μ
t STAT
S
n
When using the t distribution you must assume the population you are
sampling from follows a normal distribution
(Or large sample)
As long as the sample size is not very small and the population is not very
skewed, the t-test can be used.
To evaluate the normality assumption:
Determine how closely sample statistics match the normal distribution’s
theoretical properties.
Construct a histogram or stem-and-leaf display or boxplot or a normal probability
plot.
Produce a normal probability plot
10 Minute Break
Lady Tasting Tea
A historical story in randomised trials
Bristol claims that she can taste whether milk or tea was poured into a cup
first
Fisher provided her with 8 cups, 4 with milk first, 4 with tea first
Random order, presented all at once Sir Ronald Fisher
Bristol had to choose 4 cups prepared by one method
Remember
2. Choose the level of significance, 𝛼, 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.
4. Collect data and compute the value of the test statistic and the p-value
5. Make the statistical decision and make a conclusion. If the p-value is < α then
reject H0, otherwise do not reject H0. State the conclusion in the context of the
problem
DCOVA
Calculating p-values in Excel
t Test for the Hypothesis of the Mean
Data
Null Hypothesis µ= $ 168.00
Level of Significance 0.05
Sample Size 25
Sample Mean $ 172.50
Sample Standard Deviation $ 15.40
Intermediate Calculations
Standard Error of the Mean $ 3.08 =B8/SQRT(B6)
Degrees of Freedom 24 =B6-1
t test statistic 1.46 =(B7-B4)/B11
Two-Tail Test
Lower Critical Value -2.0639 =-TINV(B5,B12)
Upper Critical Value 2.0639 =TINV(B5,B12)
p-value > α p-value 0.157 =TDIST(ABS(B13),B12,2)
So do not reject H0 Do Not Reject Null Hypothesis =IF(B18<B5, "Reject null hypothesis",
"Do not reject null hypothesis")
DCOVA
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
H0: μ = 30 H1: μ ≠ 30 (This is a two-tail test)
2. Specify the desired level of significance and the
sample size
Suppose that = 0.05 and n = 100 are chosen
X μ 29.84 30 0.16
Z STAT 2.0
σ 0.8 0.08
n 100
DCOVA
Example
0 Z
-2.0 2.0
p-value = 0.0228 + 0.0228 = 0.0456
DCOVA
Example
0.8 0.8
29.84 - (1.96) to 29.84 (1.96)
100 100
29.6832 ≤ μ ≤ 29.9968
H0: μ = 3
There is only one H1: μ < 3
critical value, since
the rejection area
is in only one tail
μ X
Critical value
DCOVA
Upper-Tail Tests
H0: μ = 3
There is only one
critical value, since H1: μ > 3
the rejection area is
in only one tail
Critical value
DCOVA
Example
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
DCOVA
Example
Reach a decision and interpret the result:
Reject H0
= 0.10
Conclusion:
Do not reject H0 since tSTAT = 0.55 < tcritical =1.318.
With 0.1, there is no statistically sufficient evidence
that the mean bill is over $5.
DCOVA
Utilizing the p-value approach
p-value = .2937
Reject H0
= .10
0
Do not reject Reject
H0 1.318 H0
tSTAT = .55
Do not reject H0 since p-value = .2937 > = .10
There is no statistically sufficient evidence that
the mean bill is over $52.
DCOVA
Hypothesis Tests for Proportions
μp (1 )
σp
n
DCOVA
Hypothesis Tests for Proportions
The sampling
distribution of p is
approximately normal Hypothesis
(with known 𝜎), so Tests for p
the test statistic is a
ZSTAT value:
nπ 5 nπ < 5
and or
pπ n(1-π) 5
ZST AT n(1-π) < 5
π (1 π )
Out of scope
n for this class
DCOVA
Example
A marketing company
claims that it receives
8% responses from its
mailing. To test this
claim, a random sample
of 500 were surveyed
Check:
with 25 responses. Test
at the = 0.05 n π = (500)(.08) = 40
✓
significance level. n(1-π) = (500)(.92) = 460
DCOVA
Critical Value Solution
Do not reject H0
Reject H0 Reject H0 p-value = 0.0136:
/2 = .025 /2 = .025
P(Z 2.47) P(Z 2.47)
0.0068 0.0068
2(0.0068) 0.0136
-1.96 0 1.96
Z = -2.47 Z = 2.47