









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










Chapters 1-4 are a review. I will assume you have read and understood Chapters 1-4. Let us recall some of the key ideas.
A random variable is a map X from a probability space Ω to R. We write
P (X ∈ A) = P ({ω ∈ Ω : X(ω) ∈ A})
and we write X ∼ P to mean that X has distribution P. The cumulative distribution function (cdf ) of X is FX (x) = F (x) = P (X ≤ x).
If X is discrete, its probability mass function (pmf ) is
pX (x) = p(x) = P (X = x).
If X is continuous, then its probability density function function (pdf ) satisfies
A
pX (x)dx =
A
p(x)dx
and pX (x) = p(x) = F ′(x). The following are all equivalent:
X ∼ P, X ∼ F, X ∼ p.
Suppose that X ∼ P and Y ∼ Q. We say that X and Y have the same distribution if
P (X ∈ A) = Q(Y ∈ A)
for all A. In other words, P = Q. In that case we say that X and Y are equal in
distribution and we write X d = Y. It can be shown that X d = Y if and only if FX (t) = FY (t) for all t.
The mean or expected value of g(X) is
E (g(X)) =
g(x)dF (x) =
g(x)dP (x) =
∑−∞^ g(x)p(x)dx^ if^ X^ is continuous j g(xj^ )p(xj^ )^ if^ X^ is discrete.
Recall that:
∑k j=1 cj^ gj^ (X)) =^
∑k j=1 cj^ E(gj^ (X)).
( (^) n ∏
i=
Xi
i
E (Xi).
Var
( (^) n ∑
i=
aiXi
i
a^2 i Var (Xi).
Cov(X, Y ) = E((X − μx)(Y − μy)) = E(XY ) − μX μY
and the correlation is ρ(X, Y ) = Cov(X, Y )/σxσy. Recall that − 1 ≤ ρ(X, Y ) ≤ 1.
The conditional expectation of Y given X is the random variable E(Y |X) whose value, when X = x is
E(Y |X = x) =
y p(y|x)dy
where p(y|x) = p(x, y)/p(x). The Law of Total Expectation or Law of Iterated Expectation:
E(Y |X = x)pX (x)dx.
The Law of Total Variance is
Var(Y ) = Var
Var(Y |X)
The nth^ moment is E (Xn) and the nth^ central moment is E ((X − μ)n). The moment generating function (mgf ) is MX (t) = E
etX^
Then, M (^) X(n )(t)|t=0 = E (Xn).
If MX (t) = MY (t) for all t in an interval around 0 then X d = Y.
Example 3 Let pX (x) = e−x^ for x > 0. Hence FX (x) = 1 − e−x. Let Y = g(X) = log X. Then
FY (y) = P (Y ≤ y) = P (log(X) ≤ y) = P (X ≤ ey) = FX (ey) = 1 − e−e y
and pY (y) = eye−e y for y ∈ R.
Example 4 Practice problem. Let X be uniform on (− 1 , 2) and let Y = X^2. Find the density of Y.
Let Z = g(X, Y ). For exampe, Z = X + Y or Z = X/Y. Then we find the pdf of Z as follows:
FZ (z) = P (Z ≤ z) = P (g(X, Y ) ≤ z) = P ({(x, y) : g(x, y) ≤ z}) =
Az
pX,Y (x, y)dxdy.
Example 5 Practice problem. Let (X, Y ) be uniform on the unit square. Let Z = X/Y. Find the density of Z.
Recall that X and Y are independent if and only if
P(X ∈ A, Y ∈ B) = P(X ∈ A)P(Y ∈ B)
for all A and B.
Theorem 6 Let (X, Y ) be a bivariate random vector with pX,Y (x, y). X and Y are inde- pendent iff pX,Y (x, y) = pX (x)pY (y).
X 1 ,... , Xn are independent if and only if
P(X 1 ∈ A 1 ,... , Xn ∈ An) =
∏^ n
i=
P(Xi ∈ Ai).
Thus, pX 1 ,...,Xn (x 1 ,... , xn) =
∏n i=1 pXi^ (xi). If X 1 ,... , Xn are independent and identically distributed we say they are iid (or that they are a random sample) and we write
X 1 ,... , Xn ∼ P or X 1 ,... , Xn ∼ F or X 1 ,... , Xn ∼ p.
X ∼ N (μ, σ^2 ) if
p(x) =
σ
2 π
e−(x−μ)
(^2) /(2σ (^2) ) .
If X ∈ Rd^ then X ∼ N (μ, Σ) if
p(x) =
(2π)d/^2 |Σ|
exp
(x − μ)T^ Σ−^1 (x − μ)
X ∼ χ^2 p if X =
∑p j=1 Z
2 j where^ Z^1 ,... , Zp^ ∼^ N^ (0,^ 1).
X ∼ Bernoulli(θ) if P(X = 1) = θ and P(X = 0) = 1 − θ and hence
p(x) = θx(1 − θ)^1 −x^ x = 0, 1.
X ∼ Binomial(θ) if
p(x) = P(X = x) =
n x
θx(1 − θ)n−x^ x ∈ { 0 ,... , n}.
X ∼ Uniform(0, θ) if p(x) = I(0 ≤ x ≤ θ)/θ.
The sample mean is
X =
n
i
Xi,
and the sample variance is
S^2 =
n − 1
i
(Xi − X)^2.
Let X 1 ,... , Xn be iid with μ = E(Xi) = μ and σ^2 = Var(Xi) = σ^2. Then
E(X) = μ, Var(X) =
σ^2 n
, E(S^2 ) = σ^2.
Theorem 7 If X 1 ,... , Xn ∼ N (μ, σ^2 ) then
(a) X ∼ N (μ, σ 2 n )
(b) (n−1)S
2 σ^2 ∼^ χ
2 n− 1
(c) X and S^2 are independent
Uniform
x xP^ (X^ =^ x) =^
x x^
1 N =^
1 N
N (N +1) 2 =^
(N +1) 2
x x
(^2) P (X = x) = ∑ x x
2 1 N =^
1 N
N (N +1)(2N +1) 6
Binomial
(n x
px(1 − p)n−x
Hypergeometric
M x )( N −M K−x ) (NK)
Geometric
x x(1^ −^ p)
x− (^1) = p ∑ x
d dp (−(1^ −^ p)
x) = p p p^2 =^
1 p.
Poisson
x=0 e
tx e−λλx x! =^ e
−λ ∑∞ x=
(λet)x x! =^ e
−λeλet = eλ(et−1).
Normal
Proof.
MX (t) = E
etX^
et(μ+σZ)
= etμE
etσZ^
= etμMZ (tσ) = etμe(tσ)
(^2) / 2 = etμ+t
(^2) σ (^2) / 2
which is the mgf of a N (μ, σ^2 ). Alternative proof:
FX (x) = P (X ≤ x) = P (μ + σZ ≤ x) = P
x − μ σ
x − μ σ
pX (x) = F (^) X′ (x) = pZ
x − μ σ
σ
=
2 π
exp
x − μ σ
σ
2 πσ
exp
x − μ σ
which is the pdf of a N (μ, σ^2 ).
Model the natural parameters as linear functions of the the covariates. Example: Logistic Regression.
P (Y = 1|X = x) =
eβ T (^) x
1 + eβT^ x^
In other words, Y |X = x ∼ Bin(n, p(x)) and
η(x) = βT^ x
where
η(x) = log
p(x) 1 − p(x)
Logistic Regression consists of modelling the natural parameter, which is called the log odds ratio, as a linear function of covariates.
Let p(x) be a pdf.
Location family : {p(x|μ) = p(x − μ) : μ ∈ R}
Scale family :
p(x|σ) =
σ
f
( (^) x σ
: σ > 0
Location − Scale family :
p(x|μ, σ) =
σ
f
x − μ σ
: μ ∈ R, σ > 0
(1) Location family. Shifts the pdf.
e.g., Uniform with p(x) = 1 on (0, 1) and p(x − θ) = 1 on (θ, θ + 1). e.g., Normal with standard pdf the density of a N (0, 1) and location family pdf N (θ, 1). (2) Scale family. Stretches the pdf.
e.g., Normal with standard pdf the density of a N (0, 1) and scale family pdf N (0, σ^2 ). (3) Location-Scale family. Stretches and shifts the pdf.
e.g., Normal with standard pdf the density of a N (0, 1) and location-scale family pdf N (θ, σ^2 ), i.e., (^1) σ p(x−σ μ).
The multivariate version of a Binomial is called a Multinomial. Consider drawing a ball from an urn with has balls with k different colors labeled “color 1, color 2,... , color k.” Let p = (p 1 , p 2 ,... , pk) where
j pj^ = 1 and^ pj^ is the probability of drawing color^ j. Draw n balls from the urn (independently and with replacement) and let X = (X 1 , X 2 ,... , Xk) be the count of the number of balls of each color drawn. We say that X has a Multinomial (n, p) distribution. The pdf is
p(x) =
n x 1 ,... , xk
px 1 1... px k k.
We now define the multivariate normal distribution and derive its basic properties. We want to allow the possibility of multivariate normal distributions whose covariance matrix is not necessarily positive definite. Therefore, we cannot define the distribution by its density function. Instead we define the distribution by its moment generating function. (The reader may wonder how a random vector can have a moment generating function if it has no density function. However, the moment generating function can be defined using more general types of integration. In this book, we assume that such a definition is possible but find the moment generating function by elementary means.) We find the density function for the case of positive definite covariance matrix in Theorem 5.
Lemma 8 (a). Let X = AY + b Then
MX (t) = exp (b′t)MY (A′t).
(b). Let c be a constant. Let Z = cY. Then
MZ (t) = MY (ct).
(c). Let Y =
, t =
t 1 t 2
Then
MY 1 (t 1 ) = MY
t 1 0
(d). Y 1 and Y 2 are independent if and only if
t 1 t 2
t 1 0
t 2
Theorem 10 Suppose that Y ∼ Nn(μ, Σ). Let
, μ =
μ 1 μ 2
where Y 1 and μ 1 are p × 1 , and Σ 11 is p × p. (a). Y 1 ∼ Np(μ 1 , Σ 11 ), Y 2 ∼ Nn−p(μ 2 , Σ 22 ). (b). Y 1 and Y 2 are independent if and only if Σ 12 = 0. (c). If Σ 22 > 0 , then the condition distribution of Y 1 given Y 2 is
Y 1 |Y 2 ∼ Np(μ 1 + Σ 12 Σ− 221 (Y 2 − μ 2 ), Σ 11 − Σ 12 Σ− 221 Σ 21 ).
Proof. (a). Let t′^ = (t′ 1 , t′ 2 ) where t 1 is p × 1. The joint moment generating function of Y 1 and Y 2 is
MY(t) = exp(μ′ 1 t 1 + μ′ 2 t 2 +
(t′ 1 Σ 11 t 1 + t′ 1 Σ 12 t 2 + t′ 2 Σ 21 t 1 + t′ 2 Σ 22 t 2 )).
Therefore,
t 1 0
= exp(μ′ 1 t 1 +
t′ 1 Σ 11 t 1 ), MY
t 2
= exp(μ′ 2 t 2 +
t′ 2 Σ 22 t 2 ).
By Lemma 1c, we see that Y 1 ∼ Np(μ 1 , Σ 11 ), Y 2 ∼ Nn−p(μ 2 , Σ 22 ). (b). We note that MY(t) = MY
t 1 0
t 2
if and only if t′ 1 Σ 12 t 2 + t′ 2 Σ 21 t 1 = 0.
Since Σ is symmetric and t′ 2 Σ 21 t 1 is a scalar, we see that t′ 2 Σ 21 t 1 = t′ 1 Σ 12 t 2. Finally, t′Σ 12 t 2 = 0 for all t 1 ∈ Rp, t 2 ∈ Rn−p^ if and only if Σ 12 = 0, and the result follows from Lemma 1d. (c). We first find the joint distribution of
X = Y 1 − Σ 12 Σ− 221 Y 2 and Y 2. ( X Y 2
Therefore, by Theorem 2c, the joint distribution of X and Y 2 is ( X Y 2
∼ Nn
μ 1 − Σ 12 Σ− 221 μ 2 μ 2
and hence X and Y 2 are independent. Therefore, the conditional distribution of X given Y 2 is the same as the marginal distribution of X,
X|Y 2 ∼ Np(μ 1 − Σ 12 Σ− 221 μ 2 , Σ 11 − Σ 12 Σ− 221 Σ 21 ).
Since Y 2 is just a constant in the conditional distribution of X given Y 2 we have, by Theorem 2c, that the conditional distribution of Y 1 = X + Σ 12 Σ− 221 Y 2 given Y 2 is
Y 1 |Y 2 ∼ Np(μ 1 − Σ 12 Σ− 221 μ 2 + Σ 12 Σ− 221 Y 2 , Σ 11 − Σ 12 Σ− 221 Σ 21 )
Note that we need Σ 22 > 0 in part c so that Σ− 221 exists.
Lemma 11 Let Y ∼ Nn(μ, σ^2 I), where Y′^ = (Y 1 ,... , Yn), μ′^ = (μ 1 ,... , μn) and σ^2 > 0 is a scalar. Then the Yi are independent, Yi ∼ N 1 (μ, σ^2 ) and
||Y||^2 σ^2
σ^2
∼ χ^2 n
μ′μ σ^2
Proof. Let Yi be independent, Yi ∼ N 1 (μi, σ^2 ). The joint moment generating function of the Yi is
MY(t) =
∏^ n
i=
(exp(μiti +
σ^2 t^2 i )) = exp(μ′t +
σ^2 t′t)
which is the moment generating function of a random vector that is normally distributed with mean vector μ and covariance matrix σ^2 I. Finally, Y′Y = ΣY (^) i^2 , μ′μ = Σμ^2 i and Yi/σ ∼ N 1 (μi/σ, 1). Therefore Y′Y/σ^2 ∼ χ^2 n(μ′μ/σ^2 ) by the definition of the noncentral χ^2 distribution. We are now ready to derive the nonsingular normal density function.
Theorem 12 Let Y ∼ Nn(μ, Σ), with Σ > 0. Then Y has density function
pY(y) =
(2π)n/^2 |Σ|^1 /^2
exp
(y − μ)′Σ−^1 (y − μ)
Proof. We could derive this by finding the moment generating function of this density and showing that it satisfied (3). We would also have to show that this function is a density function. We can avoid all that by starting with a random vector whose distribution we know. Let Z ∼ Nn(0, I). Z = (Z 1 ,... , Zn)′.
Then the Zi are independent and Zi ∼ N 1 (0, 1), by Lemma 4. Therefore, the joint density of the Zi is
pZ(z) =
∏^ n
i=
(2π)^1 /^2
exp
z i^2
(2π)n/^2
exp
z′z
Let Y = Σ^1 /^2 Z + μ. By Theorem 2c, Y ∼ Nn(μ, Σ). Also Z = Σ−^1 /^2 (Y − μ), and the transformation from Z to Y is therefore invertible. Furthermore, the Jacobian of this inverse transformation is just |Σ−^1 /^2 | = |Σ|−^1 /^2. Hence the density of Y is
pY(y) = pZ (Σ−^1 /^2 (y − μ))
|Σ|^1 /^2 (2π)n/^2
exp
(y − μ)′Σ−^1 (y − μ)