Professional Documents
Culture Documents
2.3 Histograms.
2.5 Lineplots.
3 Measures of Location.
3.1 The mean.
Sample mean x
.
Sample moments mk =
i=1
i=1
1X k
1X
xi , m k =
(xi x
)k .
n
n
3 Conditional probability.
3.1 Independent events.
P{A|B} =
P{A B}
.
P{B}
P{A} =
n
X
j=1
P{Ei |A} =
P{A Ej }.
P{A|Ei } P{Ei }
.
n
X
P{A|Ej } P{Ej }
j=1
a
3 Expected values.
3.1 Mean.
E[aX + b] = a + b. V[aX + b] = a2 2 .
Y = u(X).
dx
Y = u(X) so X = w(Y ). fY (y) = fX (x) .
dy
P{X = x} =
1
k
for x = 1, 2, . . . , k.
Bernoulli trial.
x e
for x = 0, 1, 2, . . . .
x!
If X uniform(, ), fX (x) =
x1 ex
for x > 0. E[X] = , V[X] = 2 .
()
fX (x) =
x1 (1 x)1
for 0 <
B(, )
()()
.
( + )
. Variance is =
.
+
( + )2 ( + + 1)
1
N(, 2 ),
(x )2
2 2
exp
3.4 Normal distribution. If X
fX (x) =
2 2
.
X
If Z =
, then Z N(0, 1). Values P{Z < z} = (z) are tabulated.
3.6 t-distribution.
3.7 F-distribution.
X/
t .
X/n1
Fn1 ,n2 .
Y /n2
X
X
p k tk .
(k = 0, 1, 2, . . .), then GX (t) = E[t ] =
k=0
GX (1) = 1, GX (0) = p0 .
GX (t)
GX (t) =
X
k=2
kpk t
k1
so
GX (1)
k=1
X
k=2
kpk = E[X].
k=1
gamma(, ). N(, 2 ).
x1
as in 1.3!
f (x, y)dy.
y
P{A B}
.
P{B}
fX,Y (x, y)
pX,Y (x, y)
. Continuous case fX|Y =y (x|y) =
.
Discrete case P{X = x|Y = y} =
pY (y)
fY (y)
1.3 Conditional probability (density) functions.
Recall P{A|B} =
2.1 Expectations.
2.2 Expectations of sums and products. E[ag(X) + bh(Y )] = aE[g(X)] + bE[h(Y )].
If X and Y are independent, E[g(X)h(Y )] = E[g(X)]E[h(Y )].
3 Convolutions. Suppose
XZ =X +Y.
Discrete case P{Z = z} =
P{X = x, Y = z x}.
x Z
Continuous case fZ (Z = z) = fX,Y (x, y = z x)dx.
x
i=1
1i<jn
10
ind
n
X
i=1
Xi Poisson(n). For
n
X
i=1
Xi gamma(n, ).
2
3 The continuity
correction.
) If X Poisson() and is large, X N(, = ).
(
x + 12
, where Z N(0, 1).
P{X x} P Z
11
3 The random variable V[Y |X] and the E[V] + V[E] result.
V[Y |X = x] = E[{Y g(x)}2 |x] = E[Y 2 |X = x] g(x)2 .
V[Y |X] = E[{Y g(X)}2 |X] = E[Y 2 |X] g(X)2 .
E[V[Y |X]] = E[E[Y 2 |X]] E[g(X)2 ] = E[Y 2 ] E[g(X)2 ] so E[Y 2 ] = E[V[Y |X]] + E[g(X)2 ].
V[Y ] = E[Y 2 ] {E[Y ]}2 = E[V[Y |X]] + E[g(X)2 ] {E[g(X)]}2 = E[V[Y |X]] + V[g(X)] so that
V[Y ] = E[V[Y |X]] + V[E[Y |X]].
5 Compound distributions. S = X1 + X2 + + XN .
2 .
E[S|N = n] = nX , V[S|N = n] = nX
E[S] = E[E[S|N = n]] = E[N X ] = E[N ]X .
2 ] + V[N ] = 2 + 2 2 .
V[S] = E[V[S|N ]] + V[E[S|N ]] = E[N X
X
N X
N X
tS
tS
Mgf of S: mS (t) = E[e ] = E[E[e |N ]].
E[etS |N = n] = {mX (t)}n .
mS (t) = E[{mX (t)}N ] = GN (mX (t)) in terms of pgf of N .
12
X
sn pn (t).
Define G(s, t) =
n=0
13
2
X
= 1
= , V[X]
= .
X
Xi . E[X]
n
n
i=1
1 X
2= 1
(Xi X)
S =
n1
n1
2
i=1
n
X
Xi2
i=1
nX
If Xi N(, 2 ), then Z =
In general Z =
X
N(0, 1) for large n.
/ n
X
N(0, 1) for all n.
/ n
(n 1)S 2
ind
If Xi N(, 2 ), then
2n1 .
2
U = 2k tabulated values k () satisfy P U > 2k () = .
3.2 The sample variance.
14
Xi N(, 2 ) case.
. E[S 2 ] = 2 .
4 The t distribution.
15
16
Likelihood L() =
n
Y
f (xi ; ).
i=1
2.1.1 Example.
2.2 The two-parameter case.
5 Asymptotic distribution of MLE.
"
For large n, N(, v) where v =
nE
2 # .
log f (X; )
17
n
o
Want values 1 and 2 such that P 1 < < 2 = 0.95.
1.96 .
The interval X 1.96 , X + 1.96
can be written as X
n
n
n
2.3 Sample size.
3 Confidence intervals for the normal distribution.
3.1 The mean.
X
tn1 (2.5%) S .
tn1 so 95% confidence interval for is X
Recall t =
S/ n
n
3.2 The variance.
(n 1)S 2
(n 1)S 2
(n 1)S 2
< 2 < 2
.
Recall
2n1 so 95% confidence interval for 2 is 2
2
n1 (2.5%)
n1 (97.5%)
18
2
2
1 X
2 N 1 2 , 1 + 2 so
Confidence interval with known variances based on fact that X
n1 n2
X1 X2 (1 2 )
r
N(0, 1).
22
12
n1 + n2
S12 /S22
S12 /12
F
so
Fn1 1,n2 1 .
n1 1,n2 1
S22 /22
12 /22
Also,
> F1 ,2 ()} = , then
if F F1 ,2 with P{F
2
2
S /S
P Fn1 1,n2 1 (0.975) < 12 22 < Fn1 1,n2 1 (0.025) = 0.95 re-arranges to give
1 /2
2
S1
1
S2
1
2
1
< 12 < 12
where
= Fn2 1,n1 1 (0.025).
2
Fn1 1,n2 1 (0.975)
S2 Fn1 1,n2 1 (0.025)
2
S2 Fn1 1,n2 1 (0.975)
Recall
(1
)
1 (1 1 ) 2 (1 2 )
X
i
i
i
N i ,
+
for i = 1, 2 and so 1 2 N 1 2 ,
.
Thus i =
ni
ni
n1
n2
!
1 (1 1 ) 2 (1 2 )
+
so can obtain confidence inIn practice we assume 1 2 N 1 2 ,
n1
n2
terval for 1 2 by assuming the variance is known.
6 Paired data.
D
D
tn1 .
SD / n
19
Then
P = P{A value occurs as or more extreme than the one observed|H0 true}.
Testing H0 : 2 = 02 .
N(0,
1)
or
T
=
tn1 +n2 2 if H0 true.
1
22
1
1
S
+
p
n1
n2
n1 + n2
4.2 Testing the value of the ratio of two population variances.
S2
Test based on 12 Fn1 1,n2 1 if H0 true.
S2
Testing H0 : 12 = 22 .
4.3 Testing the value of the difference between two population proportions.
Testing H0 : 1 = 2 (= ).
1 2
Test based on q
if H0 true.
(1
)
(1
)
+
n1
n2
20
X (fi ei )2
21
Sample correlation r = p
1.2 (CT3)
The normal model and inference.
r n2
tn2 .
If = 0,
1 r2
1+r
1+
1
1
1
If W = 2 log
, then W N 2 log
,
.
1r
1 n 3
Can re-write this as W = tanh
r, so that W N tanh
Sxy
.
Sxx Syy
1
.
,
n3
and minimise q =
n
X
i=1
e2i
n
X
i=1
Sxy
i where
Fitted line is y =
+ x
= y x
and =
.
Sxx
(yi xi )2 . Least squares derivation.
n
2
1 X
= , V[]
= .
2 =
(yi yi )2 .
E[]
Sxx
n2
i=1
2.3
the
X (CT3) Partitioning
X
Xvariability of the responses.
(yi y)2 =
(yi yi )2 +
(
yi y)2 . SST OT = SSRES + SSREG.
i
2
Sxy
SST OT = Syy . SSREG =
.
Sxx
2
E[SST OT ] = (n 1) , E[SSREG] = 2 + 2 Sxx , E[SSRES] = (n 2) 2 .
SSREG
.
Coefficient of determination R2 =
SST OT
Cases where line closely fits the data and where line a poor fit to the data.
22
(n 2)
Assumptions. N ,
2n2 .
, independently of
Sxx
2
2.5 (CT3)p
Inferences on the slope parameter .
( )/ 2 /Sxx
p
=s
tn2 .
((n 2)
2 / 2 )/(n 2)
2
Sxx
0
p0
tn2 .
V[
0 ]
0.
Estimate individual response y0 = + x0 + e0 , estimated by y0 =
+ x
y
0
0
Since E[y0 y0 ] = 0, V[y0 y0 ] = 2 + V[
0 ], so s
tn2 .
2
1
(x
)
0
2 1 + +
n
Sxx
2.7 (CT3) Checking the model.
2.8 (CT3) Extending the scope of the linear model. (NOT needed for the exam.)
Transformations to give linearity.
3 (CT3) The multiple linear regression model. (NOT needed for the exam.)
+ 1 xi1 + k xik + ei , i = 1, 2, . . . , n.
23
Yi =
k
X
ni .
i=1
ind
ni
k X
X
(Yij i )2 to give
1.2 (CT3) Estimation of the parameters. Minimise q =
i=1 j=1
ni
1 X
(ni 1)Si2 ind 2
k
1 X
(n k)
2
2
Hence
=
(ni 1)Si2 satisfies
2nk .
nk
2
i=1
ni
ni
k
k X
k X
X
X
X
ni (Yi Y)2 ,
(Yij Yi)2 +
(Yij Y)2 =
i=1 j=1
i=1 j=1
i=1
i.e., SST = SSR + SSB where SST is total sum of squares, SSR is residual sum of squares (withintreatments sum of squares), SSB is between-treatments sum of squares.
SSB
M SB
is mean squares
Fk1,nk , where M SB =
If H0 : 1 = 2 = = k = 0 is true, then
M SR
k1
SSR
between treatments and M SR =
is residual mean square.
nk
1.4 (CT3) Example.
1.5 (CT3) Checking the model.
1
1
+ .
ni nj
i=1
SSREG
F1,n2 .
If H0 : b = 0 is true,
SSR /(n 2)
i=1
24
m
X
k=1
k2 2m .
ind
5.3 Moving average processes. MA(q) is Yt = +Ut +1 Ut1 + +q Utq with Ut (0, 2 ).
Backshift operator L (Most textbooks would use B!) satisfies LYt = Yt1 .
Thus Yt = + (L)Ut with (L) = 1 + 1 L + + q Lq .
V[Yt ] = 0 = (1 + 12 + + q2 ) 2 , s = (s + s+1 1 + + q qs ) 2 for s = 1, 2, . . . , q.
Example 5.2.
5.4 Autoregressive processes. AR(p) is Yt = + 1 Yt1 + 2 Yt2 + + p Ytp + Ut .
Can write as (L)Yt = + Ut with (L) = 1 1 L p Lp .
5.4.1 The stationarity condition. AR(p) process stationary if roots of (z) = 0 lie outside
unit circle. Can then write AR(p) process as MA() Yt = 1 (L)Ut .
Example 5.3.
5.4.2 Wolds decomposition theorem. (NOT needed for the exam.)
All we really need here is that (1 1 2 p )E[Yt ] = and the autocorrelation function
satisfies the Yule-Walker equations r = 1r 1 + 2r 2 + + pr p for r = 1, 2, . . . , p with
s = s .
Example 5.4.
5.5 The partial autocorrelation function. The pacf kk can be found from fitting the model
Yt = + k,1 Yt1 + k,k1 Ytk+1 + kk Ytk + Ut .
5.5.1 The invertibility condition. MA(q) process is invertible if roots of (z) = 0 lie outside
the unit circle. The process Yt = (L)Ut can then be written as an AR() process 1 (L)Yt = Ut .
25
drawn at 1.96/ n to indicate significant k ; pacf plot also has lines drawn at 1.96/ n.
5.7 Building ARMA models: the Box-Jenkins approach. Determine model order; estimate parameters; check model validity. Parsimonious models best!
5.7.1 Information criteria for ARIMA model selection.
5.7.3 ARIMA modelling.
5.8 Constructing ARMA models in EViews. (NOT needed for the exam.) We use R.
5.11.4 Forecasting with time series versus structural models. (NOT needed for the
exam.) Conditional expectation is E[Yt+1 |t ] = E[Yt+1 |Y1 , Y2 , . . . , Yt ].
5.11.5 Forecasting with ARMA models. (NOT needed for the exam.) ARMA(p, q)
q
p
q
p
X
X
X
X
t+sj
bj U
ai Yt+si +
bj Utj . Forecast at time t + s is Yt+s =
ai Yti +
model Yt =
i=1
i=1
j=1
j=1
k = 0 for k t, U
k = 0 for k > t. IEF uses notation ft,s Yt+s .
where Yk = Yk for k t, U
5.11.6 Forecasting the future value of an MA(q) process. (NOT needed for the
exam.)
MA(3) process Yt = + Ut + 1 Ut1 + 2 Ut2 + 3 Ut3 .
eg, Yt+2 = + Ut+2 + 1 Ut+1 + 2 Ut + 3 Ut1 . Thus E[Yt+2 |t ] = + 2 Ut + 3 Ut1 .
5.11.7 Forecasting the future value of an AR(p) process. (NOT needed for the
exam.)
AR(2) process Yt = + 1 Yt1 + 2 Yt2 + Ut .
eg, Yt+2 = + 1 Yt+1 + 2 Yt + Ut+2 . Thus E[Yt+2 |t ] = + 1 Yt+1 + 2 Yt .
26
6.1 Motivations.
Structural equations. Reduced form equations.
6.2 Simultaneous equations bias.
6.3 So how can simultaneous equations models be validly estimated?
6.4 Can the original coefficients be retrieved from the s ?
6.4.1 What determines whether an equation is identified or not?
6.8 Estimation procedures for simultaneous equations systems.
6.8.1 Indirect least squares (ILS). (NOT needed for the exam.)
6.8.2 Estimation of just identified and overidentified systems using 2SLS. (NOT
needed for the exam.)
Using R systemfit command.
27
28
29
30
31