Session - 14-15-Hypothesis Testing
Session - 14-15-Hypothesis Testing
• Research Hypothesis
▪ a statement of what the researcher believes will be
the outcome of an experiment or a study
• Statistical Hypothesis
▪ a formal structure used to statistically (based on a
sample) test the research hypothesis
• Examples of Research Hypotheses
H0 : 0.18 or H0 : = 0.18
H1 : 0.18
The Hypothesis Testing
• Claim: The population mean age is 50 years.
▪ H0: μ = 50, H1: μ ≠ 50
• Sample the population and find sample mean.
Population
Sample
• Suppose the sample mean age is 20 years.
• Acceptance Region
▪ When the statistical outcome falls into this region,
H0 is not rejected.
▪ Size of this region is (1-α).
Critical Values
Acceptance Region
Distribution of the test statistic (1- a)
Region of Region of
Rejection Rejection
a/2 a/2
Critical Values
0
Upper-tail test or Right Tail Test
Example:
H0: μ ≤ 50 Vs H1: μ > 50
a 1- a
0
Lower-tail test or Left Tail Test
Example:
H0: μ ≥ 50 Vs H1: μ < 50
Example:
• A survey, done 10 years ago, of CPAs in the U.S.
found that their average salary was $74,914.
• A sample of 112 CPAs produced a mean salary of
$78,695.
• Assume that = $14,530.
• An accounting researcher would like to test
whether over the years
▪ this average has increased?
▪ this average has decreased?
▪ this average has changed?
Hypothesis Testing for μ
(σ known)
Example:
• A survey, done 10 years ago, of CPA’s (Certified Public Accountant)
in the U.S. found that their average salary was $74,914.
• An accounting researcher would like to test whether over the
years
▪ this average has increased?
• Right or Upper Tail Test (H0: μ ≤ 74914, H1: μ > 74914)
▪ this average has decreased?
• Left or Lower Tail Test (H0: μ ≥ 74914, H1: μ < 74914)
▪ this average has changed?
• Two Tail Test (H0: μ = 74914, H1: μ ≠ 74914)
• A sample of 112 CPAs produced a mean salary of $78,695.
• Assume that = $14,530.
• Has the average salary of CPAs in the U.S. increased?
• Right or Upper Tailed Test
• (H0: μ ≤ 74914, H1: μ > 74914)
• Test Statistic x - 78695- 74914
Zc = = = 2.7539
n 14530 112
(0.025)
(0.025) (0.95)
-1.96 1.96
tα
• For left tail test (H0: μ ≥ μ0, H1: μ < μ0): -tα
• P( T > -tα) = 1- α Rejection T~t(n-1)
Region (α)
• P(T < -tα ) = α
Acceptance
Region (1- α)
-tα
• For two tail test (H0: μ = μ0, H1: μ ≠ μ0): tα/2
T~t(n-1)
Rejection Rejection
Region (α/2) Acceptance Region (α/2)
Region (1- α)
- tα/2 tα/2
• P(- tα/2 < T< tα/2 ) = 1- α
• P(T > tα/2 ) = α/2 P( T < -tα/2 ) = α/2
• We reject H0 in the favor of H1 at α x100% level
• If |Tc| > tα/2 (for two tailed test)
• If Tc > tα (for right tailed test)
• If Tc < -tα (for left tailed test)
• Example:
• The mean tariff of a hotel room in New York is said to be
$168 per night.
• A random sample of 25 hotels resulted in mean tariff
$172.50 with standard deviation $15.40.
• Test at the a = 0.05 level:
• if the mean tariff of a hotel room in New York is more
than $168 per night;
• if the mean tariff of a hotel room in New York is not
$168 per night.
• A stem-and-leaf display and a normal probability plot
indicate the data are approximately normally distributed.
• Computed Value of Test Statistic = 1.461039
• Example:
• An engineer has developed a new, energy-efficient lawn
mower engine.
• He claims that the engine will run continuously for an
average of 300 minutes on a single gallon of regular
gasoline.
• Suppose a simple random sample of 50 engines is tested.
• The engines run for an average of 295 minutes, with a
standard deviation of 20 minutes.
• Test the null hypothesis that the mean run time is 300
minutes against the alternative hypothesis that the mean
run time is not 300 minutes.
• Use a 0.05 level of significance.
• Computed Value of Test Statistic = -1.76777
p – value Approach
• Let Zc be the computed value of test statistic
• Let Z ~ N(o,1)
• Then p – value is given by the following probability
▪ For two tailed tests:
• 2P(Z> |Zc|)
▪ For right tailed tests:
• P(Z> Zc)
▪ For left tailed tests:
• P(Z< Zc)
• Decision: H0 is rejected in the favor of H1 at α x100% level of
significance, if
• p – value < α
• The p – value is the smallest level of significance at which H0
would be rejected.
• Example:
• A phone industry manager thinks that customer monthly cell
phone bills have increased, and now average more than $52 per
month.
• The company wishes to test this claim.
• Suppose a sample is taken with the following results
• Sample size = 64, sample mean = $53.1 per month
• Past company records indicate that the standard deviation is
about $10.
• To Test
• H0: μ ≤ 52 Against H1: μ > 52
• Test Statistic: Zc =
x- μ
=
53.1 - 52
= 0.88
σ 10
n 64
P(Z Zc ) = P(Z 0.88) = 1 - 0.8106 = 0.1894
p-value = 0.1894
Zc = 0.88
Reject H0
a = 0.10
0
Do not reject H0 1.28 Reject H0
0
Do not reject H0 1.28 Reject H0
• α = 0.05, z
0
• Critical Value = ± 1.96 -1.96 1.96
• α = 0.05, z
0
• Critical Value = ± 1.96 -1.96 1.96
xi - x
n 2
i =1
(n -1)s ( xi - x) xi - x
2 2 n 2 n 2
= =
ns
= 1
~ 2
( n-1)
2
2
i =1 2 i =1
df = 7
α = 0.10
α/2 = 0.05
1- α =0.90 α /2 = 0.05
2.167 14.067
• Assumptions:
▪ Population is normal.
• Test Statistic: n
i
( x - x ) 2
(n - 1)s12 ns2
c2 = i =1
= =
2
2
2
Critical Region
(α)
Acceptance Region
(1-α)
0
(2a )
Acceptance Region
(1-α)
0
(21-a )
2
c
2
(1-a )
• For two tail test (H0: σ = σ0, H1: σ ≠ σ0):
Critical Region
(α/2) Critical Region
(α/2)
Acceptance Region
(1-α)
0
(21-a / 2) (2a / 2)
• This distribution is not symmetric.
• So, we have different notations for critical values.
• Area after the point is mentioned in subscript.
• We reject H0 in the favor of H1 at α x100% level, if
2
c
2
(a / 2) or
2
c
2
(1-a / 2)
• Example:
• Consider the “bottling machines” example.
• Sample size = 30, sample variance = 1.2
• We want to test:
• H0: σ2 ≥ 1.6, H1: σ2 < 1.6
•
n
Test Statistic: (xi - x)2 2
(n - 1)s1 291.2 1.2
c2 = i =1
= = = 16.3125
2 2 1.6 1.6
• For
▪ left tail test, 5% level of significance, d.f = 29,
• Critical Value is (0.95) = 17.708
2