Professional Documents
Culture Documents
Introduction To Probability and Statistics: Sayantan Banerjee Sessions 16 - 17
Introduction To Probability and Statistics: Sayantan Banerjee Sessions 16 - 17
Introduction To Probability and Statistics: Sayantan Banerjee Sessions 16 - 17
Sayantan Banerjee
Sessions 16 – 17
Testing of Hypothesis
Sayantan Banerjee 1
Testing of Hypothesis
• What is a hypothesis?
• What do we mean by ‘testing’?
• Why do we need ‘testing’?
Sayantan Banerjee 2
The first step in hypothesis testing is to formalize it by specifying
the null and alternative hypothesis.
• Null hypothesis
I An assertion about the value of a population parameter.
I It is an assertion that we hold as true unless we have sufficient
statistical evidence to conclude otherwise.
I Generally denoted by H0 .
• Alternative hypothesis
I Negation of the null hypothesis.
I Researcher’s hypothesis.
I Generally denoted as H1 .
Sayantan Banerjee 3
Testing of Hypothesis
H0 : µ ≤ 3 vs. H1 : µ > 3.
• According to Fortune, on February 27, 2007, the average
stock in all U.S. exchanges fell by 3.3%. If a random sample
of 120 stocks reveals a drop of 2.8% on that day and a
standard deviation of 1.7%, are there grounds to reject the
magazine’s claim?
Sayantan Banerjee 4
• Although the idea of a null hypothesis is simple, determining
what the null hypothesis should be in a given condition is
difficult.
• Generally what the analyst aims to prove is the alternative
hypothesis, the null hypothesis standing for the status quo,
do-nothing situation.
Sayantan Banerjee 5
Examples
Sayantan Banerjee 6
Testing of Hypothesis
Sayantan Banerjee 7
Type I and Type II errors
H0 true H0 false
Reject H0 Type I error X
Fail to reject H0 X Type II error
Sayantan Banerjee 8
Type I and Type II errors
Type-I error
• maximum P(Type-I error) is called ‘Type-I error rate’.
• maximum P(Type-I error) is denoted by α.
• α is also known as ‘level of significance’.
• P(Type-I error) is maximised at the boundary of H0 and H1 .
Sayantan Banerjee 9
Type I and Type II errors
Type-II error
• P(Type-II error) always computed at a particular θ in the
region of H1 .
• P(Type-II error) at a fixed θ denoted by β(θ).
• 1 − β(θ) also known as the ‘power’ of a test.
Sayantan Banerjee 10
Testing of Hypothesis
Sayantan Banerjee 11
Testing of Hypothesis
Sayantan Banerjee 12
Testing of Hypothesis
Sayantan Banerjee 12
Testing of Hypothesis
Sayantan Banerjee 12
Testing population mean for Normal population
H0 : µ ≤ µ0 vs. H1 : µ > µ0 .
α = P (Reject H0 | µ = µ0 )
= P (X̄ > C | µ = µ0 ).
Sayantan Banerjee 13
Testing population mean for Normal population
How to find C?
• σ 2 known:
σ
C = µ0 + zα √ .
n
• σ 2 unknown:
S
C = µ0 + tα √ .
n
Sayantan Banerjee 14
What will be the decision rules for the following cases?
•
H0 : µ ≥ µ0 vs. H1 : µ < µ0 .
•
H0 : µ = µ0 vs. H1 : µ 6= µ0 .
Sayantan Banerjee 15
Testing population proportions
H0 : p ≤ p0 vs. H1 : p > p0 .
Sayantan Banerjee 16
Testing population proportions
H0 : p ≤ p0 vs. H1 : p > p0 .
Sayantan Banerjee 16
Testing population proportions
H0 : p ≤ p0 vs. H1 : p > p0 .
C ∗ = zα .
Sayantan Banerjee 17
Testing population proportions
Sayantan Banerjee 18
Hypothesis testing: p-value approach
• p-value appoach
1. Cook up a reasonable test statistic (point estimator for θ)
2. Find its sampling distribution under H0 .
3. Find the p-value: Probability of getting extreme values under
H0 .
4. Reject H0 if p-value is small (p-value < α)
Sayantan Banerjee 19
p-value approach
H0 : p ≤ p0 vs. H1 : p > p0 .
P (X ≥ Xobs | H0 )
Sayantan Banerjee 20
p-value approach
H0 : p ≤ p0 vs. H1 : p > p0 .
P (X ≥ Xobs | H0 )
p − value = P (X ≥ Xobs | p = p0 )
Sayantan Banerjee 20
p-value approach (contd.)
H0 : p ≤ p0 vs. H1 : p > p0 .
Sayantan Banerjee 21
p-value approach
H0 : µ ≤ µ0 vs. H1 : µ > µ0 .
H0 : µ ≥ µ0 vs. H1 : µ < µ0 .
H0 : µ = µ0 vs. H1 : µ 6= µ0 .
Find p-value for the tests based on the test statistic X̄, both for
the cases where σ is known and unknown.
Sayantan Banerjee 22
Problems
Sayantan Banerjee 23
Problems
Sayantan Banerjee 24
Problems
Sayantan Banerjee 25
Problems
Sayantan Banerjee 26