14
Lectures prepared by: Elchanan Mossel Yelena Shvets Berkeley Stat 134 FAll 2005 Introduction to probability Follows Jim Pitman’s book: Probability Sections 6.3

Lectures prepared by: Elchanan Mossel Yelena Shvetsmossel/teach/134f06...Lectures prepared by: Elchanan Mossel Yelena Shvets Berkeley Stat 134 FAll2005 Introduction to probability

  • Upload
    others

  • View
    10

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Lectures prepared by: Elchanan Mossel Yelena Shvetsmossel/teach/134f06...Lectures prepared by: Elchanan Mossel Yelena Shvets Berkeley Stat 134 FAll2005 Introduction to probability

Lectures prepared by:Elchanan MosselYelena Shvets

Berkeley

Stat 134 FAll 2005

Introduction to probability

Follows Jim Pitman’s book:

Probability

Sections 6.3

Page 2: Lectures prepared by: Elchanan Mossel Yelena Shvetsmossel/teach/134f06...Lectures prepared by: Elchanan Mossel Yelena Shvets Berkeley Stat 134 FAll2005 Introduction to probability

Conditional density

Example: (X,Y) uniform in the unit disk centered at 0.

P(X > 0.1 | Y > 0.1) = ? Question:P(X > 0.1 & Y > 0.1)

P(X > 0.1 | Y > 0.1) = P(Y > 0.1)

Answer:

P(X > 0.1 | Y = 0.1) = ? Question:

Try: P(X > 0.1 & Y = 0.1) 0P(X > 0.1 | Y = 0.1) = =

P(Y = 0.1) 0!

Page 3: Lectures prepared by: Elchanan Mossel Yelena Shvetsmossel/teach/134f06...Lectures prepared by: Elchanan Mossel Yelena Shvets Berkeley Stat 134 FAll2005 Introduction to probability

Infinitesimal Conditioning Formula

(A & X ∈ dx)

(A)

(X∈dx)

x x+dx

Solution: Replace by infinitesimal ratio:

Page 4: Lectures prepared by: Elchanan Mossel Yelena Shvetsmossel/teach/134f06...Lectures prepared by: Elchanan Mossel Yelena Shvets Berkeley Stat 134 FAll2005 Introduction to probability

Infinitesimal Conditioning Formula

(A) (A)

1X x∈ ∆

1A X x& ( )∈ ∆ 2A X x& ( )∈ ∆

1x x x+ ∆

2X x∈ ∆

2x x x+ ∆

x 0

x 0

P A X x P A X x

P A X x

P X x

( | ) lim ( | )

( & )lim

( )

∆ →

∆ →

= = ∈ ∆∈ ∆=

∈ ∆

Page 5: Lectures prepared by: Elchanan Mossel Yelena Shvetsmossel/teach/134f06...Lectures prepared by: Elchanan Mossel Yelena Shvets Berkeley Stat 134 FAll2005 Introduction to probability

Conditional DensityClaim: Suppose (X,Y) have a joint density f(x,y),and x is such that fX(x) > 0, the conditional density of Y given X=x is a probability density defined by

YX

f x yf y X x

f x

( , )( | )

( )= =

“Proof”:

P(a � Y � b | X = x) =

lim P(a � Y � b| X ∈ (x, x+dx)) =

lim P(a � Y � b, X ∈ (x, x+ dx))/ fX(x) dx =

lim∫ab f(x,y) dy dx / fX(x) dx = ∫ab fY(y | X = x) dy

Page 6: Lectures prepared by: Elchanan Mossel Yelena Shvetsmossel/teach/134f06...Lectures prepared by: Elchanan Mossel Yelena Shvets Berkeley Stat 134 FAll2005 Introduction to probability

Conditional Density

x

x

x

y

y

y

Joint density of (X,Y): f(x,y);

Slices through density for fixed y’s.

Area of slice at y

Renormalized slice for given y =

height of marginal distribution at y.

conditional density P[X | Y=y],The area is of each slice is 1.

=

Page 7: Lectures prepared by: Elchanan Mossel Yelena Shvetsmossel/teach/134f06...Lectures prepared by: Elchanan Mossel Yelena Shvets Berkeley Stat 134 FAll2005 Introduction to probability

Conditioning FormulaeDiscrete Continuous

•Multiplication Rule:

•Division Rule:

•Bayes’ Rule:

Page 8: Lectures prepared by: Elchanan Mossel Yelena Shvetsmossel/teach/134f06...Lectures prepared by: Elchanan Mossel Yelena Shvets Berkeley Stat 134 FAll2005 Introduction to probability

Example: Uniform on a triangle.Suppose that a point (X,Y) is chosen uniformly at random from the triangle A: {(x,y): 0 � x, 0 � y, x+ y � 2}.

Question: Find P(Y≥ 1 | X =x).

0 1 2

2

1

x x x+ ∆

(Y≥ 1)

Y=1

X +Y=2

Solution 1: Since Area(A) = 2, for all S, P(S) = Area(S)/2.

So for 0 � x < 1:

P(X∈∆x) = ½∆x (2-x - ½∆x);

P(Y>1,X∈∆x) = ½∆x (1-x - ½∆x);

P(Y≥1|X∈∆x) = P(Y>1,X∈∆x) / P(X∈∆x)

= (1-x - ½∆x)/ (2-x - ½∆x);

→ (1-x)/(2-x) as ∆x→ 0.

So P(Y ≥ 1 | X = x) = (1-x)/(2-x)

And for x ≥ 1: P(Y≥1|X=x) = 0.

A

Page 9: Lectures prepared by: Elchanan Mossel Yelena Shvetsmossel/teach/134f06...Lectures prepared by: Elchanan Mossel Yelena Shvets Berkeley Stat 134 FAll2005 Introduction to probability

Example: Uniform on a triangle.Suppose that a point (X,Y) is chosen uniformly at random from the triangle A: {(x,y): 0 � x, 0 � y, x+ y � 2}.

Question: Find P(Y≥ 1 | X =x).

Solution 2. using the conditional density fY(y|X=x).

For the uniform distribution on a triangle of area 2,

So for 0 � x � 2,

Given, X=x, the distribution of Y is uniform on (0,2-x).

Page 10: Lectures prepared by: Elchanan Mossel Yelena Shvetsmossel/teach/134f06...Lectures prepared by: Elchanan Mossel Yelena Shvets Berkeley Stat 134 FAll2005 Introduction to probability

Example: Gamma and UniformSuppose that X has Gamma(2, λ) distribution, and that given X=x, Y has Uniform(0,x) distribution.

Question: Find the joint density of X and Y

By definition of Gamma(2, λ) distr.,

By definition of Unif(0,x),

By multiplication rule,

Question: Find the marginal density of Y.

So Y ∼ Exp(λ).

Solution:

Solution:

Page 11: Lectures prepared by: Elchanan Mossel Yelena Shvetsmossel/teach/134f06...Lectures prepared by: Elchanan Mossel Yelena Shvets Berkeley Stat 134 FAll2005 Introduction to probability

Condition Distribution & ExpectationsDiscrete Continuous

•Conditional distribution of Y given X=x;

•Expectation of a function g(X):

Page 12: Lectures prepared by: Elchanan Mossel Yelena Shvetsmossel/teach/134f06...Lectures prepared by: Elchanan Mossel Yelena Shvets Berkeley Stat 134 FAll2005 Introduction to probability

Independence

Conditional distribution of Y given X=x does not depend on x:

P(Y∈ B|X=x) = P(Y∈ B).

Conditional distribution of X given Y=y does not depend on y:

P(X∈ A|Y=y) = P(X∈ A).

The multiplication rule reduces to:

f(x,y) = fX(x)fY(y).

Expectation of the product is the product of Expectations:

E(XY) = ∫ ∫ xy fX(x) fY(y) dx dy = E(X) E(Y).

Page 13: Lectures prepared by: Elchanan Mossel Yelena Shvetsmossel/teach/134f06...Lectures prepared by: Elchanan Mossel Yelena Shvets Berkeley Stat 134 FAll2005 Introduction to probability

Example: (X,Y) Uniform on a Unit Circle.

Question: Are X and Y independent?

Solution:

So the conditional distribution of X given Y=y depends on y and hence X and Y cannot be independent. However, note that for all x and y

E(X|Y = y) = E(X) = 0 and E(Y|X=x) = E(Y) = 0

Page 14: Lectures prepared by: Elchanan Mossel Yelena Shvetsmossel/teach/134f06...Lectures prepared by: Elchanan Mossel Yelena Shvets Berkeley Stat 134 FAll2005 Introduction to probability

Average Conditional Probabilities & Expectations

Discrete Continuous

•Average conditional probability:

•Average conditional expectation: