Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 57

HYPOTHESIS TESTING Chap 9

HYPOTHESIS TESTING

H0 assumed to be true
Observed
Theory
Value
Giả thuyết: 30% sinh viên
phải Retake MAS291
EXAMPLE
Dự kiến chọn mẫu cỡ 50

Nếu số sinh viên


Nếu có từ 10 đến 20 Retake nằm ngoài
sinh viên Retake khoảng [10;20] thì
trong mẫu thì đồng ý không đồng ý và đưa
ra giả thuyết thay thế

Sai lầm
Tỷ lệ thực Tỷ lệ thực
tế thấp hơn tế cao hơn

Tỷ lệ thực
tế khác
Hai loại sai lầm???
EXAMPLE
Quan sát X (sinh
Chọn mẫu
H0: p=0,3 n=50
viên phải làm retake
môn MAS291)

50

20

10

0
Giả thuyết: tỷ lệ sinh viên
phải Retake MAS291 là p
EXAMPLE
Dự kiến chọn mẫu cỡ n

Phân phối lý thuyết???

Nếu số sinh viên


Nếu có từ a đến b Retake nằm ngoài
sinh viên Retake khoảng [a;b] thì
trong mẫu thì đồng ý không đồng ý và đưa
ra giả thuyết thay thế

Sai lầm
Tỷ lệ thực Tỷ lệ thực
tế thấp hơn tế cao hơn

Tỷ lệ thực
tế khác
Giả thuyết: tham số
TỔNG có giá trị là 0
QUÁT

Dự kiến chọn mẫu cỡ n

Phân phối lý thuyết???

Không đồng ý và đưa


Đồng ý
ra giả thuyết thay thế

Sai lầm
Thấp hơn Cao hơn

Khác
3 METHODS

 Critical Value
 P_value
 Confident Interval
CRITICAL VALUE: 6 STEPS

1. Define the parameter and the comparing value


2. Two hypothesis: H0 & H1 by context
 H0: equality sign
 H1: never contain equality sign
3. Define Rejected Region  H1 + alpha sampling
distribution
4. Calculate Stat Value  Formula + H0 + Sample
5. Compare and give conclude about H0
6. Conclude about the initial hypothesis
P VALUE: 6 STEPS

1. Define the parameter and the comparing value


2. Two hypothesis: H0 & H1 by context
 H0: equality sign
 H1: never contain equality sign
3. Define Rejected Region  H1 + sampling distribution
4. Calculate p-value  Probability of Rejected Region +
Distribution
5. Compare p_value and alpha; give conclusion about H0
6. Conclude about the initial hypothesis
CONFIDENT INTERVAL

1. Confident level  significant level


2. Parameter + sampling distribution
3. Construct the C.I : 2 sided; lower; upper???
4. Compare with the initial hypothesis
HYPOTHESIS TESTING

H0 assumed to be true
Observed
Theory
Value
ABOUT H0 AND H1
Stated Parameter Opposite case H0 H1
Information notation
ABOUT THEORY
Parameter Context Distribution Shape Critical
of interest Values
Mean

Mean

Proportion

Variance
ABOUT OBSERVED VALUE
Calculate from 3 resources:
 Test Statistics;
 H0 to be true
 Sample
REJECTED RULES
Derived from:
 Neyman Pearson lemma;
 H1
 Practical approximation
Z- TEST
T- TEST
CHI TEST
STEP BY STEP
1. Parameter and
context

2. H0 and H1?

3. Type and
Critical Region?

4. Sample and
Observed Statistic?

5. Decision about
H0

6. Conclusion
STEP BY STEP
1. Parameter and
context

2. H0 and H1?

3. Type and
Critical Region?

4. Sample and
Observed Statistic?

5. Decision about
H0

6. Conclusion
STEP BY STEP
1. Parameter and
context

2. H0 and H1?

3. Type and
Critical Region?

4. Sample and
Observed Statistic?

5. Decision about
H0

6. Conclusion
STEP BY STEP
1. Parameter and
context

2. H0 and H1?

3. Type and
Critical Region?

4. Sample and
Observed Statistic?

5. Decision about
H0

6. Conclusion
STEP BY STEP
1. Parameter and
context

2. H0 and H1?

3. Type and
Critical Region?

4. Sample and
Observed Statistic?

5. Decision about
H0

6. Conclusion
STEP BY STEP
1. Parameter and
context

2. H0 and H1?

3. Type and
Critical Region?

4. Sample and
Observed Statistic?

5. Decision about
H0

6. Conclusion
F-TEST
CÁC BƯỚC KIỂM ĐỊNH
P_VALUE

Evaluate p_value needs:


+ Theory distribution
+ Observed value
+ Rule of rejection
TYPE 2 ERROR Accept the wrong null hypothesis H0

Theory True
distribution by distribution
assuming H0 true

Critical value

Evaluate beta needs:


+ True value of parameter  true theory distribution
+ Critical value
+ Acceptance rule
H 0 :   0
TYPE II ERROR PROCEDURE H1 :    0

Hypothesis Distribution Standardized Accepted area

H 0 :   0
 2  X  0 Z 0  Z / 2 Wrong
X ~ N   0 ;  Z0  ~ N 0;1
 n  / n
H1 :    0  2  X  1 1  0
X ~ N  1 ;  Z1  ~ N 0;1 Z1   Z / 2 True
  1  n  / n / n

X   0 X  1 1   0
Z0     Z1   ~ N ;1
/ n / n / n

P Z 0  Z / 2   P Z / 2  Z1    Z / 2 

  P Z / 2    Z1  Z / 2   
TYPE II ERROR

1  0
Z1   Z / 2
/ n

1   0   0
 Z / 2   Z1  Z  / 2  1
/ n / n

Brief: recomputed the accepted


area with new range
TYPE 2 ERROR OF MEAN, SIGMA KNOWN
H1 Beta Size

2 _ sided

 Z / 2 
  
    Z / 2 
 

Z /2  Z  
2
2

 / n  / n 2

upper

 Z 
 

Z  Z    2 2

 / n 2

lower

1    Z 
 

Z  Z    2 2

 / n 2
MEMORY AID Z 0  Z1 
1   0
Z1 ~ N 0,1 / n

Old Z0 Z 0 ~ N 0;1
New Z1
Old distribution Z0 and Z1
Z 0  Z / 2 New distribution
Accepted range

Transform
Beta = Prob accepted
range to Z1
1   0
Z1  Z 0 
/ n
PROPORTION
pˆ  p1
Z0 
pˆ  p0
~ N 0;1 Z1  ~ N 0;1
p0 1  p0  p1 1  p1 
n n

p0 1  p0 
Z0   pˆ  p1    p1  p0 
n
p0 1  p0 
Z0 n  Z1 
 p1  p0 
p1 1  p1  p1 1  p1 
n n
  p1 1  p1  p1 1  p1 
  p1  p0    p1  p0 
Z 0   Z1  n  Z1 n 
 p1 1  p1   p0 1  p0  p0 1  p0  p0 1  p0 
 n  n n n
p1 1  p1 
 p1  p0 
MEMORY AID Z 0  Z1 n 
p0 1  p0  p0 1  p0 
Z1 ~ N 0,1 n n

Old Z0 Z 0 ~ N 0;1
New Z1
Old distribution Z0 and Z1
Z 0  Z / 2 New distribution
Accepted range

 p0 1  p0    p0 1  p0  
  Z / 2
   p1  p0   Z / 2
   p1  p0 
 n  n
 Z1   
p1 1  p1  p1 1  p1  Transform
n n
Beta = Prob accepted
range to Z1
p1 1  p1 
 Z  / 2  Z1 n 
 p1  p0   Z
p0 1  p0  p0 1  p0 
 /2

n n
UNKNOWN SIGMA
X  0 X  1
Z0  ~ t n  1 Z1  ~ t n  1
S/ n S/ n

Z0
S
n
 
 X  1  1   0 

  0 
Z 0  Z1  1
S/ n
p1 1  p1 
 p1  p0 
MEMORY AID Z 0  Z1 n 
p0 1  p0  p0 1  p0 
Z1 ~ t n  1 n n

Old Z0 Z 0 ~ t n  1
New Z1
Old distribution Z0 and Z1
Z 0  t / 2 n  1 New distribution
Accepted range

 p0 1  p0    p0 1  p0  
  Z / 2
   p1  p0   Z / 2
   p1  p0 
 n  n
 Z1   
p1 1  p1  p1 1  p1  Transform
n n
Beta = Prob accepted
range to Z1
p1 1  p1 
 Z  / 2  Z1 n 
 p1  p0   Z
p0 1  p0  p0 1  p0 
 /2

n n
PROPORTION
Z  Z / 2
PROPORTION
 p0 1  p0    p0 1  p0  
  Z / 2
   p1  p0   Z / 2
   p1  p0 
 n  n
 Z1   
p1 1  p1  p1 1  p1 
n n
CALCULATE BETA
H1 Acceptance rule Prob of acceptance Modify

2 sided Between Crit_Val

Greater than Less than Crit_Val

Less than Greater than Crit_val


VARIANCE
Z0 
n  1S 2
~  2
n  1 Z1 
n  1S 2
~  2
n  1
0
2
1 2

Z0 
n  1S 2 n  1S 2  12

 12
 Z1 . 2
 02  12 0
2
0
MEMORY AID  12
Z 0  Z1 2
0
Z1 ~  2 n  1

Old Z0 Z 0 ~  2 n  1
New Z1
Old distribution Z0 and Z1
Z 0   / 2 n  1 New distribution
Accepted range Z 0  1 / 2 n  1

 12
Z1   / 2 n  1.
 02
 12
Z1  1 / 2 n  1. 2
0
Transform
Beta = Prob accepted
range to Z1
 12
Z1   / 2 n  1
 02
 12
Z1 2  1 / 2 n  1
0
SAMPLE SIZE FORMULAS
P Z / 2    Z  Z / 2      Z / 2       Z / 2     

  Z / 2    if   0   Z    Z / 2    if   0

Solve for delta, then for sample size n

 Z   Z / 2  
  Z / 2  Z 

One sided
SUMMARIES
TYPE 2 ERROR
EXERCISES

You might also like