Lecture-3_-Testing-hypothesis
Lecture-3_-Testing-hypothesis
Hypothesis Test
1
Testing hypothesis in Statistics - Revise
H0: µ = 7.5
H1: µ ≠ 7.5
In which
• µ: the average GPA in the population
• H0 : null hypothesis
• H1 : alternative hypothesis
2
Statistical decision
Do not reject
Reject H0
H0
True state of the null hypothesis
3
• α : significance level
Highest probability accepted to get mistake type I
4
Testing hypothesis about the regression parameter
• 3 kinds of hypothesis test
- 2-sided: H 0 : j = *j
H
1 j : *
j
- right-sided: H 0 : j *j
H1 : j j
*
H 0 : j *j
- left-sided:
H1 : j j
*
5
Sampling distributions of the OLS
estimators
Assumption 7: The population error u is independent of
the explanatory variables X and normally distributed:
𝑢~𝑁(0, 2 )
𝑗 ~N(𝑗 , var
𝑗 )
6
Sampling distributions of the OLS
estimators
7
3 methods to test hypothesis
Critical value (t test)
p- value
Confidence interval
Necessary statistics
• T statistics/ T ratio
• Significance level
• Confidence interval (1 − )
• Critical value: tα, n-k-1
8
1. Critical value method (t test)
ˆ j − * j
• Step 1: Calculate ts =
se( ˆ j )
9
Rules of rejection
* *
Right - sided j j j j
ts > tα, n-k-1
* *
10
2. Confidence Interval Method
(
𝑗 − 𝑡α/2,𝑛−𝑘−1 𝑠𝑒(
𝑗 );
𝑗 + 𝑡α/2,𝑛−𝑘−1 𝑠𝑒(
𝑗 ))
11
right-side confidence interval
𝑗 − 𝑡α,𝑛−𝑘−1 𝑠𝑒(
( 𝑗 ),+∞)
12
Rejection rules for hypothesis H0
• 2-sided test: if does not lie within this interval, we
*
j
reject H0.
(
𝑗 − 𝑡α/2,𝑛−𝑘−1 𝑠𝑒(
𝑗 );
𝑗 + 𝑡α/2,𝑛−𝑘−1 𝑠𝑒(
𝑗 ))
*
• Right-sided test: if j does not lie within this interval,
we reject H0.
𝑗 − 𝑡α,𝑛−𝑘−1 𝑠𝑒(
( 𝑗 ),+∞)
*
• Left-sided test: if j does not lie within this interval,
we reject H0.
(-∞,
𝑗 + 𝑡α,𝑛−𝑘−1 𝑠𝑒(
𝑗 ))
13
3. p-value method
• Step 1: Calculate ˆ j − *j
t0 =
se( ˆ j )
• Step 2: Calculate p-value = P(| ts | t0 ) of which T is
a random variable that has t-student distribution
with (n-k-1) degree of freedom. t0 is a specific
value of ts
• Step 3: with a given significance level α, rule of
rejection is:
• 2-sided test: p-value < α ➔ reject H0
• one-sided test: p-value/2 < α ➔ reject H0
14
4. Testing Multiple Linear Restrictions
H0 : βk-q+1 =…= βk = 0
H1 : at least one βj ≠ 0
15
Steps
• Step 1 : Calculate SSRUR, the sum of squared residuals
from the unrestricted model
• Step 2 : Calculate SSRR, the sum of squared residuals
from the restricted model
• Step 3 : F-statistic or F ratio :
Fs =
(𝑆𝑆𝑅𝑟 −𝑆𝑆𝑅𝑢𝑟 )/𝑞
𝑆𝑆𝑅𝑢𝑟 /(𝑛−𝑘−1)
~F(q, n-k-1)
2 −𝑅 2 )/𝑞
Fs = (𝑅𝑢𝑟 𝑟
2 )/(𝑛−𝑘−1) ~ F(q, n-k-1)
(1−𝑅𝑢𝑟
16
Check for the critical value F(q, n-k-1)
If Fs F ( q, n − k − 1) ➔ reject H0
17
5. Testing overall significance of a regression
H0 : β1 = β2 …= βk = 0
H1 : at least βj ≠ 0
H0 : R2 = 0 ↔ H0 : β1 = β2 =…= βk = 0
H1 : R2 ≠ 0 ↔ H1 : at least one βj ≠ 0
R2 / k
Fs = F (k , n − k − 1)
(1 − R 2 ) / ( n − k − 1)
If Fs F ( k , n − k − 1) ➔ reject H0.
18
6. Testing for the fitness of the model
H0 : R2 = 0 ↔ H0 : β1 = β2 =…= βk = 0
H1 : R2 ≠ 0 ↔ H1 : has at least one βj ≠ 0