Docsity

Quick Review Of Basic Probability, Lecture Notes - Mathematics, Study notes of Probability and Statistics

Toggle sidebar
bg1
Lecture Notes 1
Quick Review of Basic Probability
(Casella and Berger Chapters 1-4)
1 Probability Review
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.
1.1 Random Variables
Arandom variable is a map Xfrom a probability space Ω to R. We write
P(X∈A) = P({ω∈Ω : X(ω)∈A})
and we write X∼Pto mean that Xhas distribution P. The cumulative distribution
function (cdf) of Xis
FX(x) = F(x) = P(X≤x).
If Xis discrete, its probability mass function (pmf) is
pX(x) = p(x) = P(X=x).
If Xis continuous, then its probability density function function (pdf) satisfies
P(X∈A) = ZA
pX(x)dx =ZA
p(x)dx
and pX(x) = p(x) = F0(x). The following are all equivalent:
X∼P, X ∼F, X ∼p.
Suppose that X∼Pand Y∼Q. We say that Xand Yhave the same distribution if
P(X∈A) = Q(Y∈A)
for all A. In other words, P=Q.In that case we say that Xand Yare equal in
distribution and we write Xd
=Y. It can be shown that Xd
=Yif and only if
FX(t) = FY(t)for all t.
1.2 Expected Values
The mean or expected value of g(X) is
E(g(X)) = Zg(x)dF (x) = Zg(x)dP (x) = (R∞
−∞ g(x)p(x)dx if Xis continuous
Pjg(xj)p(xj) if Xis discrete.
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
Discount

On special offer

Partial preview of the text

Download Quick Review Of Basic Probability, Lecture Notes - Mathematics and more Study notes Probability and Statistics in PDF only on Docsity!

Lecture Notes 1

Quick Review of Basic Probability

(Casella and Berger Chapters 1-4)

1 Probability Review

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.

1.1 Random Variables

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

P (X ∈ A) =

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.

1.2 Expected Values

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:

  1. E(

∑k j=1 cj^ gj^ (X)) =^

∑k j=1 cj^ E(gj^ (X)).

  1. If X 1 ,... , Xn are independent then

E

( (^) n ∏

i=

Xi

i

E (Xi).

  1. We often write μ = E(X).
  2. σ^2 = Var (X) = E ((X − μ)^2 ) is the Variance.
  3. Var (X) = E (X^2 ) − μ^2.
  4. If X 1 ,... , Xn are independent then

Var

( (^) n ∑

i=

aiXi

i

a^2 i Var (Xi).

  1. The covariance is

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 ) = E

[

E(Y |X)

]

E(Y |X = x)pX (x)dx.

The Law of Total Variance is

Var(Y ) = Var

[

E(Y |X)

]

+ E

[

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:

  1. For each z, find the set Az = {(x, y) : g(x, y) ≤ z}.
  2. Find the CDF

FZ (z) = P (Z ≤ z) = P (g(X, Y ) ≤ z) = P ({(x, y) : g(x, y) ≤ z}) =

Az

pX,Y (x, y)dxdy.

  1. The pdf is pZ (z) = F (^) Z′ (z).

Example 5 Practice problem. Let (X, Y ) be uniform on the unit square. Let Z = X/Y. Find the density of Z.

1.5 Independence

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.

1.6 Important Distributions

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 ≤ θ)/θ.

1.7 Sample Mean and Variance

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

Common Distributions

Discrete

Uniform

  • X ∼ U (1,... , N )
  • X takes values x = 1, 2 ,... , N
  • P (X = x) = 1/N
  • E (X) =

x xP^ (X^ =^ x) =^

x x^

1 N =^

1 N

N (N +1) 2 =^

(N +1) 2

  • E (X^2 ) =

x x

(^2) P (X = x) = ∑ x x

2 1 N =^

1 N

N (N +1)(2N +1) 6

Binomial

  • X ∼ Bin(n, p)
  • X takes values x = 0, 1 ,... , n
  • P (X = x) =

(n x

px(1 − p)n−x

Hypergeometric

  • X ∼ Hypergeometric(N, M, K)
  • P (X = x) = (

M x )( N −M K−x ) (NK)

Geometric

  • X ∼ Geom(p)
  • P (X = x) = (1 − p)x−^1 p, x = 1, 2 ,...
  • E (X) =

x x(1^ −^ p)

x− (^1) = p ∑ x

d dp (−(1^ −^ p)

x) = p p p^2 =^

1 p.

Poisson

  • X ∼ Poisson(λ)
  • P (X = x) = e −λλx x! x^ = 0,^1 ,^2 ,...
  • E (X) = Var (X) = λ
  • MX (t) =

x=0 e

tx e−λλx x! =^ e

−λ ∑∞ x=

(λet)x x! =^ e

−λeλet = eλ(et−1).

  • E (X) = λeteλ(e t−1) |t=0 = λ.
  • Use mgf to show: if X 1 ∼ Poisson(λ 1 ), X 2 ∼ Poisson(λ 2 ), independent then Y = X 1 + X 2 ∼ Poisson(λ 1 + λ 2 ).

Continuous Distributions

Normal

  • X ∼ N (μ, σ^2 )
  • p(x) = √ 21 πσ exp{ 2 −σ^12 (x − μ)^2 }, x ∈ R
  • mgf MX (t) = exp{μt + σ^2 t^2 / 2 }.
  • E (X) = μ
  • Var (X) = σ^2.
  • e.g., If Z ∼ N (0, 1) and X = μ + σZ, then X ∼ N (μ, σ^2 ). Show this...

Proof.

MX (t) = E

etX^

= E

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

Z ≤

x − μ σ

= FZ

x − μ σ

pX (x) = F (^) X′ (x) = pZ

x − μ σ

σ

=

2 π

exp

x − μ σ

σ

2 πσ

exp

x − μ σ

which is the pdf of a N (μ, σ^2 ). 

Generalized Linear Model

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.

Location and Scale Families, CB 3.

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−σ μ).

Multinomial Distribution

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.

Multivariate Normal Distribution

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 =

Y 1

Y 2

, 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

MY

t 1 t 2

= MY

t 1 0

MY

t 2

Theorem 10 Suppose that Y ∼ Nn(μ, Σ). Let

Y =

Y 1

Y 2

, μ =

μ 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,

MY

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

MY

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

I − Σ 12 Σ− 221

0 I

Y 1

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

Y′Y

σ^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

|Σ|^1 /^2 (2π)n/^2

exp

(y − μ)′Σ−^1 (y − μ)