Docsity

Variance, Inequalities, and Weak Law of Large Numbers, Study Guides, Projects, Research of Law

Partial preview of the text

Download Variance, Inequalities, and Weak Law of Large Numbers and more Study Guides, Projects, Research Law in PDF only on Docsity!

CS70: Lecture 21.

Variance; Inequalities; WLLN

  1. Review: Distributions
  2. Review: Independence
  3. Variance
  4. Inequalities I (^) Markov I (^) Chebyshev
  5. Weak Law of Large Numbers

Review: Distributions

I (^) U[ 1 ,... , n] : Pr [X = m] = (^1) n , m = 1 ,... , n; E[X ] = n+ 2 1 ;

I (^) B(n, p) : Pr [X = m] = (n m

pm( 1 − p)n−m, m = 0 ,... , n; E[X ] = np;

I (^) G(p) : Pr [X = n] = ( 1 − p)n−^1 p, n = 1 , 2 ,... ; E[X ] = (^1) p ;

I (^) P(λ ) : Pr [X = n] = λ n^ n! e−λ^ , n ≥ 0; E[X ] = λ.

Review: Mutual Independence

Definition X , Y , Z ,... are mutually independent ⇔ Pr [X = x, Y = y, Z = z,.. .] = Pr [X = x]Pr [Y = y]Pr [Z = z] · · · , ∀x, y, z,... ⇔ Pr [X ∈ A, Y ∈ B, Z ∈ C,.. .] = Pr [X ∈ A]Pr [Y ∈ B]Pr [Z ∈ C] · · · , ∀A, B, C,... Theorem X , Y , Z , V , W , U... are mutually independent ⇒ f (X , Y ), g(Z , V , W ), h(U,.. .),... are mutually independent ⇒ E[XYZ · · · ] = E[X ]E[Y ]E[Z ] · · ·

Variance

The variance measures the deviation from the mean value. Definition: The variance of X is

σ 2 (X ) := var [X ] = E[(X − E[X ])^2 ].

σ (X ) is called the standard deviation of X.

A simple example

This example illustrates the term ‘standard deviation.’

Consider the random variable X such that

X =

μ − σ , w.p. 1/ 2 μ + σ , w.p. 1/ 2.

Then, E[X ] = μ and (X − E[X ])^2 = σ 2. Hence,

var (X ) = σ 2 and σ (X ) = σ.

Example

Consider X with

X =

− 1 , w. p. 0. 99 99 , w. p. 0. 01.

Then

E[X ] = − 1 × 0. 99 + 99 × 0. 01 = 0. E[X 2 ] = 1 × 0. 99 + ( 99 )^2 × 0. 01 ≈ 100. Var (X ) ≈ 100 =⇒ σ (X ) ≈ 10.

Also, E(|X |) = 1 × 0. 99 + 99 × 0. 01 = 1. 98. Thus, σ (X ) 6 = E[|X − E[X ]|]! Exercise: How big can you make (^) E[|Xσ −^ (XE^ )[X ]|]?

Variance of geometric distribution.

X is a geometrically distributed RV with parameter p. Thus, Pr [X = n] = ( 1 − p)n−^1 p for n ≥ 1. Recall E[X ] = 1 /p.

E[X 2 ] = p + 4 p( 1 − p) + 9 p( 1 − p)^2 + ... −( 1 − p)E[X 2 ] = −[p( 1 − p) + 4 p( 1 − p)^2 + ...] pE[X 2 ] = p + 3 p( 1 − p) + 5 p( 1 − p)^2 + ... = 2 (p + 2 p( 1 − p) + 3 p( 1 − p)^2 + ..) E[X ]! −(p + p( 1 − p) + p( 1 − p)^2 + ...) Distribution. pE[X 2 ] = 2 E[X ] − 1 = 2 (

p

2 − p p

=⇒ E[X 2 ] = ( 2 − p)/p^2 and var [X ] = E[X 2 ] − E[X ]^2 = (^2) p− 2 p − (^) p^12 = (^1) p− 2 p.

σ (X ) =

1 −p p ≈^ E[X^ ]^ when^ p^ is small(ish).

Fixed points.

Number of fixed points in a random permutation of n items. “Number of student that get homework back.” X = X 1 + X 2 · · · + Xn where Xi is indicator variable for ith student getting hw back.

E(X 2 ) = ∑

i

E(X i^2 ) + ∑

i 6 =j

E(Xi Xj ).

= n ×

n

  • (n)(n − 1 ) ×

n(n − 1 ) = 1 + 1 = 2.

E(X (^) i^2 ) = 1 × Pr [Xi = 1 ] + 0 × Pr [Xi = 0 ] = (^1) n E(Xi Xj ) = 1 × Pr [Xi = 1 ∩ Xj = 1 ] + 0 × Pr [“anything else’′] = 1 ×^1 × n(!n −^2 )!= (^) n(n^1 − 1 ) Var (X ) = E(X 2 ) − (E(X ))^2 = 2 − 1 = 1.

Properties of variance.

  1. Var (cX ) = c^2 Var (X ), where c is a constant. Scales by c^2.
  2. Var (X + c) = Var (X ), where c is a constant. Shifts center. Proof:

Var (cX ) = E((cX )^2 ) − (E(cX ))^2 = c^2 E(X 2 ) − c^2 (E(X ))^2 = c^2 (E(X 2 ) − E(X )^2 ) = c^2 Var (X ) Var (X + c) = E((X + c − E(X + c))^2 ) = E((X + c − E(X ) − c)^2 ) = E((X − E(X ))^2 ) = Var (X )

Variance of sum of two independent random variables

Theorem: If X and Y are independent, then

Var (X + Y ) = Var (X ) + Var (Y ). Proof: Since shifting the random variables does not change their variance, let us subtract their means. That is, we assume that E(X ) = 0 and E(Y ) = 0. Then, by independence,

E(XY ) = E(X )E(Y ) = 0.

Hence,

var (X + Y ) = E((X + Y )^2 ) = E(X 2 + 2 XY + Y 2 ) = E(X 2 ) + 2 E(XY ) + E(Y 2 ) = E(X 2 ) + E(Y 2 ) = var (X ) + var (Y ).

Variance of Binomial Distribution.

Flip coin with heads probability p. X - how many heads?

Xi =

1 if ith flip is heads 0 otherwise

E(X (^) i^2 ) = 12 × p + 02 × ( 1 − p) = p. Var (Xi ) = p − (E(X ))^2 = p − p^2 = p( 1 − p). p = 0 =⇒ Var (Xi ) = 0 p = 1 =⇒ Var (Xi ) = 0 X = X 1 + X 2 +... Xn. Xi and Xj are independent: Pr [Xi = 1 |Xj = 1 ] = Pr [Xi = 1 ].

Var (X ) = Var (X 1 + · · · Xn) = np( 1 − p).

Inequalities: An Overview

n

pn

μ

P r[|X μ| > ✏]

✏ ✏

Chebyshev

n

pn

pn

Distribution

n

pn

P r[X > a]

a

Markov

μ

Markov’s inequality

The inequality is named after Andrey Markov, although it appeared earlier in the work of Pafnuty Chebyshev. It should be (and is sometimes) called Chebyshev’s first inequality. Theorem Markov’s Inequality Assume f : ℜ → [ 0 , ∞) is nondecreasing. Then,

Pr [X ≥ a] ≤ E[f (X )] f (a) , for all a such that f (a) > 0. Proof: Observe that 1 {X ≥ a} ≤ f (X ) f (a). Indeed, if X < a, the inequality reads 0 ≤ f (X )/f (a), which holds since f (·) ≥ 0. Also, if X ≥ a, it reads 1 ≤ f (X )/f (a), which holds since f (·) is nondecreasing. Taking the expectation yields the inequality, because expectation is monotone.

A picture