Upload
clio
View
36
Download
0
Embed Size (px)
DESCRIPTION
Ch. 22 2 - test. Introduction to 2 - test Structure of 2 – test Testing Stochastic Independence. 3. 1. 2. Introduction to 2 - test. Structure of 2 – test. INDEX. Testing Stochastic Independence. 1. Introduction to 2 - test. Usage of - test. - PowerPoint PPT Presentation
Citation preview
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
Statistics for EconomistStatistics for Economist
Ch. 22 Ch. 22 2 2 - test- test
1.1. Introduction to Introduction to 22 - test - test
2.2. Structure of Structure of 22 – test – test
3.3. Testing Stochastic Testing Stochastic IndependenceIndependence
2/20
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
STATISTISTATISTICSCS
INDEX
3Testing Stochastic Independence
1Introduction to 2 -
test
2 Structure of 2 – test
3/20
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
STATISTISTATISTICSCS
1. Introduction to 2 - test
Usage of - test
Usage of - test
2
Predicting whether Stock price index would be up or down:
There are only 2 categories z – testSign test
Predicting level of Stock price index by intervals:
There are categories more than 2 2– test
4/20
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
STATISTISTATISTICSCS
If Average of cards in Box being only matter…
z – testt - test
If the number of several kinds of cards in box being matter…
– test2
1. Introduction to 2 - test
Usage of - test
Usage of - test
2
5/20
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
STATISTISTATISTICSCS
- test
Testing the Null : aver. of box is 3.5 z – testt - test
Testing the Null : the prob. one card drawn out is 1/6 each
Drawing out Cards having numbers from 1 to 6 on each other from a box with replacement
2
2 -test indicates whether we can consider observed sample as from random sampling when we know about composition of contents in box
z-test or t-test indicate whether we can consider observed sample as from random sampling when we only know average of box
2 -test indicates whether we can consider observed sample as from random sampling when we know about composition of contents in box
z-test or t-test indicate whether we can consider observed sample as from random sampling when we only know average of box
1. Introduction to 2 - test
Usage of - test
Usage of - test
2
6/20
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
STATISTISTATISTICSCS
Does a Gambler use a unfair die?
4 3 3 1 2 3 4 6 5 6
2 4 1 3 3 5 3 4 3 4
3 3 4 5 4 5 6 4 5 1
6 4 4 2 3 3 2 4 4 5
6 3 6 2 4 6 4 6 3 2
5 4 6 3 3 3 5 3 1 4
Result from 60 times casting
Number Observed Expect
1 4 10
2 6 10
3 17 10
4 16 10
5 8 10
6 9 10
합 60 60
Result from 60 times drawing out cards having numbers from 1 to 6 on each with replacement from a box
The Observed is much larger than the Expect.
1. Introduction to 2 - test
An Ex. of - test
An Ex. of - test
2
7/20
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
STATISTISTATISTICSCS
- statistic - statistic2
Only one or two ridiculous columns can not determine whether whole data’s ridiculousness.
There needs certain indicators presenting overall difference between the observed and the expect getting all information together.
= = (observed-expect)2
expect
2The bigger -statistic means there is big difference between Observed values and Expect values.
2
2.1410
)109(
10
)108(
10
)1016(
10
)1017(
10
)106(
10
)104( 2222222
1. Introduction to 2 - test
8/20
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
STATISTISTATISTICSCS
The earned value, 14.2 is too big to think the model is true.
It may be possible to earn such a large number when casting a fair die in 60 times, but the size of possibility matters.
Earn 1,000 of 2- statistics by 1,000 times repetition of casting a fair die 60 times and then calculating the 2- statistic.
When applying 2- statistics to a histogram (in fact, a Empirical Histogram of 2-distribution), the Area of histogram right to the value 14.2.
The ratio of 1,000 개의 2-statistics to 1,000 statistics more than 14.2
The 2- statistics more than 14.2 are strong evidences against the model.
How big the probability would be that One stochastic model produce such a strong contrary evidence against itself ? Meaning of p-value
The 2- statistics more than 14.2 are strong evidences against the model.
How big the probability would be that One stochastic model produce such a strong contrary evidence against itself ? Meaning of p-value
1. Introduction to 2 - test
Usage of - test
Usage of - test
2
9/20
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
STATISTISTATISTICSCS
Degree of freedom of - test
Degree of freedom of - test
2
0
10
20
0 5 10 15 20 25 30
%
5자유도
10자유도
2 –distribution curve responding to D.F.(5) and D.F.(10)
That distribution curves are right-tailed.
As D.F. get larger, Shape of curve get more symmetric as moving to right.
That distribution curves are right-tailed.
As D.F. get larger, Shape of curve get more symmetric as moving to right.
As Model is designed in the concrete, It is meaningless to infer the population parameter : D.F. = the number of terms used in calculating 2 -statistic - 1
As Model is designed in the concrete, It is meaningless to infer the population parameter : D.F. = the number of terms used in calculating 2 -statistic - 1
D.F.
= 6-1 = 5
1. Introduction to 2 - test
10/20
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
STATISTISTATISTICSCS
- distribution curve
- distribution curve
2
-statistics table : a section
2
자유도 50% 10% 5% 1%
3 2.37 6.25 7.8211.34
4 3.36 7.78 9.4913.28
5 4.35 9.2411.07
15.09
6 5.3510.65
12.59
16.80
7 6.3512.02
14.07
18.48
The size of area right to 14.2 is the value between 5% and 1%
2-distribution curve in D.F.(5)
Read the probability area in the first column of table.
14.2
p-value =
면적과 자유도가 만나는 위치에 놓인 수치를 읽는다 .
11.075% critical
value
15.091% critical
value
1. Introduction to 2 - test
11/20
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
STATISTISTATISTICSCS
INDEX
3Testing on Stochastic Independence
1Introduction to 2 -
test
2 Structure of 2 – test
12/20
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
STATISTISTATISTICSCS
2. Structure of 2 – test
StructureStructure
In general, Size of sample is represented as
nEx) n=60
Box ModelEx.) a Die Model:A box containing
Cards having numbers 1~6 on each
Random Sampling with replacement from
a composition Announced box
Basic Data Stochastic Model
Recording frequencies of each observation
And making the result as a kind of table
A Frequency Table
11
13/20
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
STATISTISTATISTICSCS
StructureStructure
In the case of no need to infer the population
parameter, D.F. is as below
the number of terms used in calculating 2-statistic - 1
Ex) 6-1=5
2-statistics Degree of Freedom
The p-value is the size of area right to
2- statistic under the 2-distribution curve of
corresponding D.F.
Ex) p-value=1.4%
Observed Significance level (p-value)
(observed-expect)2expect
00
2. Structure of 2 – test
14/20
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
STATISTISTATISTICSCS
INDEX
3Testing Stochastic Independence
1Introduction to 2 -
test
2 Structure of 2 – test
15/20
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
STATISTISTATISTICSCS
3.Testing Stochastic Independence
Test for Stochastic Independence among variables
Test for Stochastic Independence among variables
Is it stochastic independent? : Left-handedness and Gender?
Male Female
Right 934 1,070
Left 113 92
Ambidexter 20 8
M(100%) F(100%)
Right 87.5% 91.4%
Left 10.6% 7.9%
Ambidexter 1.9% 0.7%
Gender and a Preferred hand (frequency)
Gender and a Preferred hand (ratio)
[Physiology] As Women’s left brain is more activated than Men’s, More Right-handedness.[Sociology] Women got forced more to use Right hand than men.
The Ratio of preferred hand is Identical to both Men and Women, Difference above is just by chance
It is by ChanceIt is by Real
16/20
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
STATISTISTATISTICSCS
3.Testing Stochastic Independence
Designing a box model
Designing a box model
? Right-handed Male ?Right-handed Female
? Left-handed Male ? Left-handed Female
? Ambidexter Male ? Ambidexter Female
Make a Box model under the assumption that 2,237 people of sample are randomly drawn out from population.
2,237 times of Random Sampling without replacement
Male Female
Right 934 1,070
Left 113 92
Ambidexter 20 8
17/20
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
STATISTISTATISTICSCS
3.Testing Stochastic Independence
Null vs AlternativeNull vs Alternative
Observed Frequency Expected Frequency
Male Female Male Female
Right 934 1,070 956 1.048
Left 113 92 98 107
Ambidexter 20 8 13 15
Gender and a Preferred hand
Difference in ratio between Gender and a
Preferred hand
Null Mutually IndependentJust a coincidence
occurred during sampling process
Alternative
A practical relation exists
Reflects practical difference of population
Calculate Expect values under the Null.
Observed and Expect per each category (Calculation of Expect will be following)
18/20
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
STATISTISTATISTICSCS
3.Testing Stochastic Independence
2 - test2 - test
1215
)158(
13
)1320(
107
)10792(
98
)98113(
048,1
)048,1070,1(
956
)956934( 2222222
-statistic2
Degree of Freedom
Male Female Sum
Right -22 22 0
Left 15 -15 0
Ambidexter 7 -7 0
Sum 0 0 0
Difference between Observed and Expect per each category As two values are given, the
rests will be determined automatically :
Only two deviations are free among 6
D.F. = (3-1)(2-1) = 2
When testing stochastic independence on a m n table, If there is no probabilityrestriction except stochastic independence, the D.F. will be (m-1) (n-1).
When testing stochastic independence on a m n table, If there is no probabilityrestriction except stochastic independence, the D.F. will be (m-1) (n-1).
19/20
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
STATISTISTATISTICSCS
3.Testing Stochastic Independence
2
p-value
2-distribution curve of D.F.(2)
12
0.2%
p-value
자유도 2 인 In 2-distribution curve of D.F.(2), Size of the area right to 12 is 0.2%. So. Reject the Null.
We can tell Gender and a preferred hand : mutually dependent.
2 - test2 - test
20/20
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
STATISTISTATISTICSCS
3.Testing Stochastic Independence
Expected Frequencies
Expected Frequencies
Observed FrequenciesRatio
Expected Frequencies
Male Female Male Female
Right 934 1,070 89.6% 956 1,048
Left 113 92 9.1% 98 107
Ambidexter 20 8 1.3% 13 15
Sum 1,067 1,170 100% 1,067 1,170
(934+1,070)/2,237 89.6% :
If gender and a preferred hand were mutually independent, Number of right-handed male is expected to be 956 (89.6% of the 1,067 male) Getting the Expect using both Sample data and Null hypothesis. As Getting the expect by inference, this results in reduction of D.F.