Kronecker Product and Probability Basics
Kronecker Product and Probability Basics
8 Kronecker Product
Let A be an m n matrix and B be a p q matrix. Then
0 1
a11 B a12 B a1n B
B .. C
A B=@ . A mp nq
am1 B am2 B amn B
B Statistical Review
B.1 Random Variables and Probability Distribution
Objective of Empirical Economist
The goal is to learn from a subset of observations (sample) about the whole pop-
ulation.
We assume there is an unknown process that generates the data (sample) we have
96
F (1) = Pr(X < 1) = 1
F ( 1) = 0
If x > y then F (x) F (y)
0 F (x) 1
F (x)
Graphically this implies that the probability that the random variable
takes values between a and b is the highlighted area under the p.d.f.
y = f (x)
97
Joint Density Function
@ n F (x1 ; x2 ; : : : ; xn )
f (x1 ; x2 ; : : : ; xn ) =
@x1 @x2 : : : @xn
The Marginal Density Function of the random variable X1 from the joint pdf
f (x1 ; :::; xn ; ) is given by
Z 1 Z 1
f1 (x1 ; ) = ::: f (x1 ; :::; xn ; )dx2 :::dxn
1 1
f (x; y) f (x; y)
f (yjx) = and f (xjy) = (Bayes’Theorem)
fX (x) fY (y)
B.1.3 Independence
f (x; y) = f (yjx)fX (x) and/or f (x; y) = f (xjy)fY (y)
A sample we use to learn something about the whole population should be repre-
sentative of the population.
98
One way to do so is to use random sampling, whereby each member of the popu-
lation has an equal chance of being included in the sample
independence
– f (x1 ; :::; xn ; ) = f1 (x1 ; )f2 (x2 ; ) : : : fn (xn ; )
identical Q
– = f (x1 ; )f (x2 ; ):::f (xn ; ) = ni=1 f (xi ; )
B.3 Estimators
Objective of Empirical Economist
Call a statistic that is intended to serve as a basis for learning about an unknown
quantity (parameter) an estimator . Denote by b:
– It can be computed from the data in a sample, and does not involve any
unknown quantities
99
Table 1: Parameters of Interest and Estimators
Population moments: Possible Estimator:
(sample moments)
P
N
Mean: X = N1 Xi
i=1
X = E(Xi ) = Sample average
2 1
P
N
Variance: SX = N 1
(Xi X)2
i=1
2 2
X = E((Xi X) ) = SampleV ar(Xi )
1
P
N
Covariance SXY = N 1
(Xi X)(Yi Y)
i=1
XY = E((Xi X )(Yi Y )) = SampleCov(Xi ; Yi )
Sampling Distribution
100
– mean=1st moment about zero; variance=2nd moment about the mean
E((X a)r )
It is a linear operator.
The Covariance Matrix is a multivariate 2nd order moment about the mean.
2
– Diagonal of covariance matrix contains the variances ii = i
101
The Correlation Matrix is a matrix closely related to the covariance matrix:
Cov(Xi ; Xj ) ij ij
ij = =p =
StdDev(Xi )StdDev(Xj ) ii jj i j
So Cov(X; Y ) = E(X)E(Y ) X Y =0
BUT
102
" #
1
P
n P
n
= n2
E [(Yi )2 ] + E [(Yi )(Yj )]
i=1 i6=j
1
P
n
= n2
Var(Yi ) + 0 by Independence
i=1
1
Pn
2
2
= n2
=
i=1 n
2
Y1 ; :::; Yn i.i.d. N ( ; )
– 2 parameters and 2
continuous, symmetric, unimodal
positive everywhere (bell-shaped)
103
2
– Width: :
Multivariate: W s N ( ; );
W; : n dimensional vector, : n dimensional covariance matrix
n 1 1
f (w) = (2 ) 2 (det ) 2 exp( (w )0 1
(w )):
2
2
– When W s N (0; I) this simpli…es to (oft used joint density)
1 X
n
2 n=2
f (w) = (2 ) exp( 2
wi2 )
2 i=1
2
= f (w1 )::f (wn ), where Wi i.i.d. N (0; )
2 X
If X s N ( ; ) then Z = s N (0; 1)
x x
Pr(X x) = Pr(Z )= ( )
is the CDF of the standard normal which is tabulated (see table A.2).
104
B.6.2 Chi-Squared Distribution
If Zi , i = 1; ::p; are independent N (0; 1) random variables, then
p
X
W = Zi2 2
p
i=1
2 2
– df( )red/solid < df( )blue/dashed
2
– If W p; E(W ) = p; Var(W ) = 2p
– The tp density function has a single parameter p; the degrees of freedom (df).
Symmetric about zero; unimodal; positive everywhere; leptokurtic (i.e. there
is more area in the tails relative to a normal).
– We can use the tables for the normal distribution if p is large: t N (0; 1)
when p ! 1:
105
B.6.4 F-Distribution
If X is a 2m random variable and Y is a 2k random variable, then provided X and
Y are independent
X=m
F = s Fm;k
Y =k
– The Fm;k distribution has 2 parameters m and k. It is positive and skewed to
the right.
B.6.5 Examples
2
Let X1 ; X2 ; :::Xn be a random sample of size n from N ( ; ) then
p
n(X )
s tn 1
SX
– Note p
p n(X )
n(X )
=p
SX 2 (n 2
1)SX =(n 1)
p
n(X )
N (0; 1);
2 2 2
(n 1)SX n 1; and
p
n(X ) 2 2
and (n 1)SX two independent random variables.
2
Let SX and SY2 be the sample variances from mutually independent samples of
sizes m and n respectively drawn from normal distributions. Let X and Y have
population variance 2X and 2Y respectively:
2 2
Y SX
2 2
s Fm 1 ;n 1
X SY
106
– Note
2 2 2 2
Y SX X (m 1)SX =(m 1)
2 2
= 2
X SY Y (n 1)SY2 =(n 1)
2 2 2
X (m 1)SX m 1,
2 2 2
Y (n 1)SY n 1 , and
2
X (m 1)SX and Y 2 (n 1)SY2 are two independent random variables.
2
– The relevant issue is NOT the closeness of our estimates to the unknown
parameters for a particular realized sample
– BUT the closeness of our estimates on average over repeated samples.
Unbiased: Eb =
107
– p.d.f. of b
Bias(b) = Eb
Let X1 ; :::; Xn be a random sample from a population with mean
– Example: X is an unbiased estimator of : E(X) =
2 2
– Example: X is a biased estimator of 2 : E(X ) 6= 2
2 Pn P
n
E(X ) = E ( n1 Xi )2 = n 2 E ( Xi )2
i=1 i=1
2
P
n PP
=n E(Xi2 ) + n 2 E(Xi Xj )
i=1 i6=j
Making use of
2
Var(Xi ) = E(Xi2 ) 2
2
E(Xi Xj ) = E(Xi )E(Xj ) = by independence
2
= n 1( 2
+ 2 ) + n 2 n(n 1) 2 = 2 + n 6= 2
2 2
Bias(X ) = n
(asymptotically, though, bias is zero)
E¢ ciency
Unbiasedness is a desirable property but is rarely used by itself as an estimation
criterion.
– Reason: 9 many unbiased estimators that are obviously poor uses of the data.
In judging two unbiased estimators choose estimator with lower variance.
108
Var(^red/dashed ) <Var(^blue/solid )
n 1P r
Example: Let r = ; and take X r = Xi as an estimator of :
2 r i=1
So Var(X r ) = 2Var(X):
There may be biased estimators that have smaller variances than the unbiased
ones. A criterion that recognizes a possible trade-o¤ between bias and variance is
the Mean Squared Error.
Sampling Distribution
As discussed above:
2
– Say Y1 ; :::; Yn i.i.d. N ( ; )
109
Estimator Y for (population mean) has the sampling distribution:
2
Y N( ; =n):
In this case, the idea is to work with results that come about as n ! 1 and treat
the n ! 1 results as approximations.
Consistency
Su¢ cient condition for consistency (not necessary)
110
– Example: X is a consistent estimator of the population mean,
2
E(X) = and Var(X) = =n ! 0 as n ! 1
2 2
– Example: X is a consistent estimator of
By Slutsky Theorem a direct consequence of the consistency of X (later).
2
Nevertheless, X is a biased estimator of 2 :
plim(x) = g (plim x)
– Use the sample data to construct an interval, such that we can expect this
interval to
contain the true parameter in some speci…ed proportion of samples, or
equivalently,
contain the true parameter with some desired level of con…dence.
111
– The interval boundaries (like the estimates themselves) di¤er depending on
the sample we use.
Pr(lower(b) upper(b)) = 1
Example:
2
XP1 ; X2 :::Xn random sample from N ( ; ); assume 2 is known. ConsiderpX =
1 n
n i=1pXi as an estimator of : A 95% con…dence interval for is [X 1:96 = n; X+
1:96 = n].
2 p X
– X s N( ; n
) sampling distribution ) n s N (0; 1)
p
n(X )
– Pr( 1:96 1:96) = 0:95 (from table A.2)
1:96 1:96
– Pr(X p
n
X+ p
n
) = 0:95
– In the above example was set at 5%; yielding a 95% con…dence interval.
Example:
2
XP1 ; X2 :::Xn random sample from N ( ; ); assume 2 is known. ConsiderpX =
1 n
n i=1pXi as an estimator of : A 95% con…dence interval for is [X 1:96 = n; X+
1:96 = n].
2
XP1 ; X2 :::Xn random sample from N ( ; ); 2 unknown, n = [Link] X =
1
n
Xi again as a point estimate of : A 95% con…dence interval for is [X
p p
2:086SX = n; X + 2:086SX = n]
112
p p
– To de…ne the con…dence interval use n XSX instead of n X ! Its distrib-
ution is tn 1 , which has fatter tails than N (0; 1) (Accounts for the fact that
we have to estimate ).
p
n(X )
Pr( 2:086 SX
2:086) = 0:95 (from table A.4, n = 21)
2:086S 2:086S
Pr(X p X
n
X+ p X)
n
= 0:95
– Typically slightly wider!
2
Let X1 ; X2 ; :::Xn be a random sample of size n from N ( ; ) then
p
n(X )
s tn 1
SX
Note p
p n(X )
n(X )
=p
SX 2 (n 2
1)SX =(n 1)
p
n(X )
– N (0; 1);
2 2 2
– (n 1)SX n 1; and
p
n(X ) 2 2
– and (n 1)SX two independent random variables.
– two sided: HA : 6= 0
113
The test procedure is a rule, stated in terms of the data, that dictates whether the
null hypothesis should be rejected or not.
– If the observed data (i.e., the test statistic) fall in the rejection region then
we reject H0 ;
– If the test statistic falls in the acceptance region,
then do not reject H0 .
– The acceptance/rejection region is de…ned by our willingness to commit a
type I error (signi…cance level)!
Since the sample is random, the test statistic is also random. The same test can
lead to di¤erent conclusions in di¤erent samples. As such, there are two ways a
procedure can be in error:
– Type I error: The procedure can lead to the rejection of the null when it is
true.
– Type II error: The procedure can fail to reject the null when it is false.
Type I error: The procedure can lead to the rejection of the null when it is true.
Type II error: The procedure can fail to reject the null when it is false.
114
B.10.1 One sided test
2 2
X1 ; X2 ; :::; Xn random sample from N ( ; ); known
Test: H0 : = 0 against HA : > 0
– Consider X as an estimator of
X
– Test statistic Z = p 0
2 =n
s N (0; 1) under H0
The p-value
Given n; and x, we could have asked the question: Which levels of signi…cance
( ) would lead us to reject H0 ?
115
B.10.2 Two sided test
2 2
X1 ; X2 ; :::; Xn random sample from X N( ; ); unknown
Test: H0 : = 0 against H1 : 6= 0
X 0
p
2
SX =n
– Test statistic T = pX 0
2 =n
s tN 1 under H0
SX
x
– Acceptance/Rejection Rule: We reject H0 if p 0
>c =2 .
s2x =n
–
– Choose critical value c =2 such that Pr(jT j > c =2 ) =
The associated p-value (the lowest level of signi…cance at which we would reject
the null is given by
x x
Pr(jT j > p 0
) = 2 Pr T > p 0
s2x =n s2x =n
116
B.10.3 Power of a Test
For a given signi…cance level (size) we would like to be as small as possible.
– Equivalently, for a given sign…cance level we want the power of our test (our
ability to reject the null when it is false) to be large!
– If, for a given signi…cance level, the type II error is large: we say that our
test has little power.
Making use of ine¢ cient estimators when performing an hypothesis test
will result in a loss of power of the test.
With ine¢ cient estimators it is more di¢ cult to reject the null, even when
the null is false!
– To compute the power: specify the alternative!
– Power will be stronger for alternatives that are far away from the null (hope-
fully, even getting close to 1!)
Example
= Pr(Z > c j = 1)
–
= Pr(Z < c j = 2)
Power function
Power function for a test, expresses the probability of rejection of H0 given a
particular alternative
Pr(Reject H0 jH1 )
117
Let X1 ; X2 :::Xn s N ( ; 1)
H0 : = 0
H1 : 6 = 0
X
– The decision rule is to reject H0 is to reject if p 0
>c =2 :
1=n
– In order to compute this probability need to realize that given the alternative
X X
p 0
is NOT N (0; 1); but instead p is.
1=n 1=n
Graphically
– (ii) The test is more powerful the further the true mean is from 0
Example
H0 : =1
H1 : >1
X 1
– H0 : p N (0; 1);
1=n
X 1
Acc/Rej rule: reject H0 if p > 1:645; = 5%
1=n
Say H1 : =2
= Pr(Not reject H0 jH0 is false as = 2)
118
X 1 X 1
= Pr( p < 1:645j = 2); note p N (0; 1)
1=n 1=n
X 1 p1 X
p1 j = 2); note p 2
Pr( p < 1:645 N (0; 1)
1=n 1=n 1=n 1=n
X 2 p1 j = 2)
= Pr( p < 1:645
1=n 1=n
– We reject H0 : = 0 if
b 0
SE(b)
>C =2
[b C =2 SE(b); b + C =2 SE(b)]
– If a hypothesized value of the parameter does not fall in this range of plausible
values, then the data are not consistent with the hypothesis, and it should be
rejected.
– We reject H0 if 0 62 [b C =2 SE(b); b + C =2 SE(b)]
2 2
– Use (X; SX ) as estimators of ( ; ).
X
– Construct statistic T = p 2 0 tn 1 under H0 (see above).
SX =n
119
– Choose signi…cance level and construct acceptance region [ c =2 ; c =2 ], where
Pr(jT j > c =2 ) = (use table A.4).
Identical
p to reject Hp 0 if 0 2= [x c =2 SE(X); x +c =2 SE(X)] [x
2 2
c =2 sX =n; x + c =2 sX =n]
Chi-Squared test
2
X1 ; :::; Xn random sample from N ( ; )
H0 : 2 = 2
0
H1 : 2 6= 2
0
2 2
– Use SX as estimators of .
2 2 2
– Construct statistic C = 0 (n 1)SX n 1 under H0 (see above).
F-test
Use two independent samples of sizes m and n from normal populations X1 ; :::; Xm ; Y1 ; :::; Yn .
Construct a test for
H0 : 2X = 2Y
H1 : 2X 6= 2Y
2
– Use (SX ; SY2 ) as estimators of ( 2X ; 2Y ).
S2
– Construct statistic F = X2 Fm 1 ;n 1 under H0 (see above).
SY
– Choose signi…cance level and construct acceptance region [c1 ; c2 ], where
Pr(F < c1 ) = =2 and Pr(F > c2 ) = =2. Compute the statistic for your
sample (f ), and reject H0 if f 2 = [c1 ; c2 ]:
– In order to obtain c1 you need to realize that Pr(F < c1 ) = Pr(1=F > 1=c1 )
where the distribution of 1=F under the null if Fn 1 ;m 1 (reverse the degrees
of freedom) (use Table A.6)
120