Transcript statistic
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
Statistics for Economist
Ch. 22 2 - test
1. Introduction to 2 - test
2. Structure of 2 – test
3. Testing Stochastic Independence
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
INDEX
STATISTICS
1
Introduction to 2 - test
2
Structure of 2 – test
3
Testing Stochastic Independence
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
2/20
STATISTICS
1. Introduction to 2 - test
Usage of - test
2
Predicting whether Stock price index would
be up or down:
There are only 2 categories
z – test
Sign test
Predicting level of Stock price index by intervals:
There are categories more than 2
2– test
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
3/20
STATISTICS
1. Introduction to 2 - test
Usage of - test
2
If Average of cards in Box being only
matter…
z – test
t - test
If the number of several kinds of cards in
box being matter…
2– test
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
4/20
STATISTICS
1. Introduction to 2 - test
Usage of - test
2
Drawing out Cards having numbers from 1 to 6 on each
other from a box with replacement
z – test
Testing the Null : aver. of box is 3.5
t - test
Testing the Null : the prob. one card drawn out is 1/6 each
2 - test
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
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
5/20
STATISTICS
1. Introduction to 2 - test
2
An Ex. of - test
Does a Gambler use a unfair die?
Result from 60 times casting
Number
Observed
Expect
4331234656
1
4
10
2413353434
2
6
10
3345456451
3
17
10
4
16
10
5
8
10
6
9
10
합
60
60
6442332445
6362464632
5463335314
The Observed is much larger than the Expect.
Result from 60 times drawing out cards having numbers from 1 to 6 on
each with replacement from a box
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
6/20
1. Introduction to 2 - test
STATISTICS
2- statistic
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.
2
=
2-statistic means
The bigger
there is big difference between
Observed values and Expect
values.
(observed-expect)2
expect
(4 10) 2 (6 10) 2 (17 10) 2 (16 10) 2 (8 10) 2 (9 10) 2
14.2
10
10
10
10
10
10
2
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
7/20
STATISTICS
1. Introduction to 2 - test
Usage of - test
2
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
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
8/20
1. Introduction to 2 - test
STATISTICS
Degree of freedom of
2- test
2 –distribution curve responding to D.F.(5) and D.F.(10)
20
That
distribution curves
are right-tailed.
자유도5
자유도10
%
As
D.F. get larger,
Shape of curve get
more symmetric as
moving to right.
10
0
0
5
10
15
20
25
30
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
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
9/20
STATISTICS
1. Introduction to 2 - test
-2 distribution curve
2-distribution curve in D.F.(5)
Read the probability area in the
first column of table.
p-value =
14.2
면적과 자유도가 만
나는 위치에 놓인 수
11.07
15.09
치를 읽는다.
5% critical 1% critical
value
value
The size of area right to 14.2 is
the value between 5% and 1%
2-statistics table : a section
자유도
50%
10%
5%
1%
3
2.37
6.25
7.82
11.34
4
3.36
7.78
9.49
13.28
5
4.35
9.24
11.07
15.09
6
5.35
10.65
12.59
16.80
7
6.35
12.02
14.07
18.48
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
10/20
INDEX
STATISTICS
1
Introduction to 2 - test
2
Structure of 2 – test
3
Testing on Stochastic Independence
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
11/20
STATISTICS
2. Structure of 2 – test
Structure
Basic Data
Stochastic Model
In general,
Size of sample is
represented as
n
Ex) n=60
Box Model
Ex.) a Die Model:
A box containing
Cards having
numbers 1~6 on each
Random Sampling
with replacement from
a composition
Announced box
A Frequency Table
Recording frequencies
of each observation
And making the result
as a kind of table
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
12/20
2. Structure of 2 – test
STATISTICS
Structure
2-statistics
(observed-expect)2
expect
Degree of Freedom
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
Observed
Significance level (p-value)
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%
Ex) 6-1=5
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
13/20
INDEX
STATISTICS
1
Introduction to 2 - test
2
Structure of 2 – test
3
Testing Stochastic Independence
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
14/20
3.Testing Stochastic Independence
STATISTICS
Test for Stochastic Independence among variables
Is it stochastic independent? : Left-handedness and Gender?
Gender and a Preferred hand (frequency)
Male
Female
Right
934
1,070
Left
113
Ambidexter
20
Gender and a Preferred hand (ratio)
M(100%)
F(100%)
Right
87.5%
91.4%
92
Left
10.6%
7.9%
8
Ambidexter
1.9%
0.7%
It is by Real
It is by Chance
[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
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
15/20
3.Testing Stochastic Independence
STATISTICS
Designing a box model
Make a Box model under the assumption that 2,237 people of
sample are randomly drawn out from population.
?
Right-handed Male
?
Right-handed Female
?
Left-handed Male
?
Left-handed Female
?
Ambidexter Male
?
Ambidexter Female
Male
Female
Right
934
1,070
Left
113
92
Ambidexter
20
8
2,237 times of
Random Sampling
without replacement
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
16/20
3.Testing Stochastic Independence
STATISTICS
Null vs Alternative
Gender and a Preferred hand
Difference in ratio between
Gender and a Preferred hand
Null
Mutually Independent
Just a coincidence occurred
during sampling process
Alternative
A practical relation exists
Reflects practical difference of
population
Observed and Expect per each category (Calculation of Expect will be following)
Observed Frequency
Calculate
Expect values
under the Null.
Expected Frequency
Male
Female
Male
Female
Right
934
1,070
956
1.048
Left
113
92
98
107
Ambidexter
20
8
13
15
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
17/20
3.Testing Stochastic Independence
STATISTICS
2 - test
2
-statistic
(934 956) 2 (1,070 1,048) 2 (113 98) 2 (92 107) 2 (20 13) 2 (8 15) 2
12
956
1,048
98
107
13
15
2
Degree of Freedom
Difference between Observed and Expect per each category
As two values are given, the
rests will be determined
automatically :
Male
Female
Sum
Right
-22
22
0
Left
15
-15
0
Ambidexter
7
-7
0
Only two deviations are free
among 6
Sum
0
0
0
D.F. = (3-1)(2-1) = 2
When testing stochastic independence on a mn table, If there is no probability
restriction except stochastic independence, the D.F. will be (m-1)(n-1).
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
18/20
3.Testing Stochastic Independence
STATISTICS
2-2 test
p-value
2-distribution curve of D.F.(2)
p-value 0.2%
12
자유도 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.
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
19/20
3.Testing Stochastic Independence
STATISTICS
Expected Frequencies
Observed Frequencies
Male
Female
Right
934
1,070
Left
113
Ambidexter
Sum
Ratio
Expected Frequencies
Male
Female
89.6%
956
1,048
92
9.1%
98
107
20
8
1.3%
13
15
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.
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics
20/20