testing of hypothesis
testing of hypothesis
2/4/2024
Examples of Hypothesis
2/4/2024
Terms-Definition
2/4/2024
Example
– Average credit card balance across ethnic groups is same
H0: μ1=μ2 = μ3
H1: At least one inequality
• H0: μ = 15
H1: μ ≠ 15
Example
Suppose a bank knows that their customers are waiting
in line an average of 10.2 minutes during the lunch
hour. The branch manager has decided to add an
additional teller during the 12-2 p.m. period and wishes
to test the hypothesis that the average wait has
decreased due to the additional teller. Set up the null
and alternative hypothesis for the bank manager.
Example
Suppose a bank knows that their customers are waiting
in line an average of 10.2 minutes during the lunch
hour. The branch manager has decided to add an
additional teller during the 12-2 p.m. period and wishes
to test the hypothesis that the average wait has
decreased due to the additional teller. Set up the null
and alternative hypothesis for the bank manager.
H0: μ = 10.2
H1: μ < 10.2
One-Tailed and Two-Tailed Tests
The tails of a statistical test are determined by the need for an action. If action
is to be taken if a parameter is greater than some value a, then the alternative
hypothesis is that the parameter is greater than a, and the test is a right-tailed/
upper-tail test.
H0: = 50 H1: 50
ˆ = 0.3
Test Statistic : Sample proportion= p
Concepts of Hypothesis Testing
• The decision rule of a statistical hypothesis test is a rule
that specifies the conditions under which the null
hypothesis may be rejected.
• Critical Region (ω) : The set of values of the test statistic
which cause us to reject the null hypothesis (H0)
• Rejection of null hypothesis implies that the test is
significant, otherwise is insignificant
Power = (1 - )
1. Making assumptions
2. Constructing hypotheses
3. Determining the test statistic
4. Constructing critical region
5. Determining p-values
6. Drawing conclusion
Univariate Population
Significance test for
population mean
(when σ is known)
Assumptions :
• A random sample is drawn from a population (normal
distribution) with mean μ and sd σ
• Sample size should be large (small)
• Population sd is known
Hypotheses:
H 0 : = 0 H 0 : = 0 H 0 : = 0
H1 : 0 H 0 : 0 H 0 : 0
Reject H0 if
Reject H0 if z < −z z > z/2 or z < −z/2 Reject H0 if z > z
LO 9.4
Critical Region :
Right tail : = {zobs z }
Left tail : = {zobs − z }
Two tail : = {zobs z / 2 or z − z / 2 }
Example
An automatic bottling machine fills cola into two liter (2000 cc)
bottles. A consumer advocate wants to challenge this average
amount. A random sample of 40 bottles coming out of the machine
was selected and the exact content of the selected bottles are
recorded. The sample mean was 1999.6 cc. The population
standard deviation is known from past experience to be 1.30 cc.
Test appropriate hypothesis.
Ho : = 2000
H 1 : 2000
The p-value Approach
✓ Determining the p-value depending on the specification
of the competing hypotheses.
LO 9.3
Critical value and p-value approaches
lj 0
𝑥−𝜇
Test Statistic : 𝑧𝑜𝑏𝑠 = 𝜎
𝑛
p-value approach
𝑝−value = P(Z < −1.95)
= 0.0256 < 0.05
Conclusion: Reject Null i.e. the test is significant
There is sufficient evidence for rejection
Example
I believe that on an average a PGP student at IIMK
spends 15 hours per week using library resources. A
random sample of 8 students were selected and
the average number of hours they spend in the library
came out to be 16.3 hrs. Assuming reading time to follow
normal distribution with sd 3.6 hrs, test a suitable
hypothesis
To test
H0: μ = 15 H1: μ ≠ 15
Critical value and p-value approaches
𝑥lj − 𝜇0 16.3−15
𝑧𝑜𝑏𝑠 = 𝜎 = = 1.02
3.6
𝑛 8
z0.025 = 1.96
zobs < 1.96
Hypotheses:
H 0 : = 0 H 0 : = 0 H 0 : = 0
H1 : 0 H 0 : 0 H 0 : 0
n 2
x − 0
tobs = '
~ t n −1 , under H 0
s
n
This test statistic has a t distribution
with n - 1 degrees of freedom.
Critical Region :
Right tail : = {tobs t ;n −1}
Left tail : = {tobs −t ;n −1}
Two tail : = {tobs t / 2;n −1 or tobs −t / 2;n −1}
Example
A State Highway Patrol periodically samples
vehicle speeds at various locations on a particular
roadway. The sample of vehicle speeds is used to
test the hypothesis H0: µ < 65.
The locations where H0 is rejected are deemed the
best locations for radar traps. At Location F, a
sample of 64 vehicles shows a mean speed of 66.2
mph with a standard deviation of 4.2 mph. Test
suitable hypothesis at 5% level of significance
Critical and p-value approaches
𝑥lj − 𝜇0 66.2 − 65
𝑡= = = 2.286
𝑠/ 𝑛 4.2/ 64
Critical value approach
Reject H0
Do Not Reject H0
=
t
0 t =
1.669
Example
New software companies that create programs for world wide web applications believe
that average staff age at these companies is 27. A random sample of 18 staff is chosen
from these companies and their age is given as follows: 41, 18, 25, 36, 26, 35, 24, 30, 28,
19, 22, 22, 26, 23, 24, 31, 22, 22. Test appropriate hypothesis.
H0: = 27 n = 18
H1: 27 x = 26.3
n = 18 s = 6.15
For = 0.05 and (18-1) = 17 df , x − 26.3 - 27
critical values of t are ±2.11 t = s 0 = 6.15
obs
x − 0 n 18
The test statistic is: t =
s = − 0.48 Do not reject H
n 0
Equivalence between Hypothesis
tests and Confidence intervals
The main idea is that a two-sided hypotheses test will give us
exactly the same conclusion (about the population parameter) as
a confidence interval
If we test H0: θ = θ0 vs H1: θ ≠ θ0 and fail to reject H0 at
significance level (=0.01/0.05/0.1), then the corresponding
100(1−)% (99%, 95%, 90%) confidence interval will contain
the null value (i.e θ0).
95% CI of 𝜇
[26.3−(2.11∗6.15/ 18) , 26.3−(2.11∗6.15/ 18)]
[23.46 , 29.14]