Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 14: Multivariate Distributions Probability Theory and Applications Fall 2005 October 25.

Similar presentations


Presentation on theme: "Lecture 14: Multivariate Distributions Probability Theory and Applications Fall 2005 October 25."— Presentation transcript:

1 Lecture 14: Multivariate Distributions Probability Theory and Applications Fall 2005 October 25

2 Multivariate Distributions Distributions may have more than one R.V. Example: S=size of house - real RV P=price of house - real RV A=Age of house - real RV C= condition of house Excellent, Very Good, Good, Poor - discrete RV Since variables are not-independent need a multivariate distribution to describe them: f(S,P,A,C)

3 Bivariate Random Variables Given R.V. X and Y Cases 1.X,Y both discrete number of blue and red jelly beans picked from jar 2. X,Y both continuous height and weight 3. X discrete and Y continuous date and stock price

4 Both Discrete The joint distribution of (X,Y) is specified by The value set of (X,Y) The joint probability function f(x,y)=P(X=x,Y=y) Note: f(x,y)≥0 for any (x,y)

5 Discrete Example Box contains jewels H=high quality M=medium quality D=defective You pick two jewels w/o replacement X=# of H Y =#of M 3 H 2 M 2 D

6 Joint Probability Function X\Y012 01/214/211/216/21 1 0/2112/21 23/210/21 3/21 10/21 1/21

7 Joint Probability Function X\Y012 01/214/211/21 16/21 0/21 23/210/21

8 Marginal Probability Functions X\Y012 01/214/211/216/21 1 0/2112/21 23/210/21 3/21 10/21 1/211

9 Definitions The marginal distribution of X is Note this is exactly the same as pdf of X The joint cumulative density function of X,Y is

10 Questions P(You get one high quality and one medium jewel)? P(You pick at least one high quality jewel)?

11 Conditional Distributions The conditional distribution of Y given X is In our example:

12 Conditional Probability Functions X\Y012 01/214/211/216/21 1 0/2112/21 23/210/21 3/21 10/21 1/211 Y012 f(y|X=1)

13 Conditional Probability Functions X\Y012 01/214/211/216/21 1 0/2112/21 23/210/21 3/21 10/21 1/211 X012 f(x|Y=1)4/106/100 Find distribution of X given Y=1

14 Question Given that exactly one jewel picked is medium quality, what is the probability that the other is high quality? 6/10 Given that at least one jewel picked is medium quality, what is the probability that the other is high quality? 6/11

15 X,Y both Continuous The joint pdf, f(x,y) defined over R 2 has properties: f(x,y)≥0 To calculate probabilities, integrate joint pdf over X,Y over the area Or more generally if we want P((x,y)  A)

16 X,Y both Continuous More generally if we want P((x,y)  A) The c.d.f.

17 Marginals and Conditionals The marginal pdf of X The marginal pdf of Y The conditional pdf of X given Y=y

18 Examples The joint pdf of (x,y) is Find c

19 continued Find pdf of X Find pdf of Y

20 continued Find marginal of X given Y=1 Note this is the same as marginal of X! X and Y are independent!

21 continued Find P(X>Y) 0 X 1 2 Y

22 Mixed Continuous and Discrete Let L a be R.V. that is 1 if candy corn manufactured from Line 1 and 0 if line 0 Let X=weight of candy corn The joint pdf is What is the marginal distribution of X – the weight of the candy corn?

23 Mixed Continuous and Discrete The joint pdf is Sum over L to find the marginal of X

24 Conditional Distribution What is the marginal of L? What is the conditional X given L? L is Bernoulli R.V. p=0.25 If candy corn is from Line 1, weight is normal with mean 7.05 and s.d. = 1. If candy corn is from Line 0, weight is normal with mean 10.1 and s.d. = 1.2.

25 Mixture Model X is a mixture of two different normals

26 Example 5 Harry Potter plays flips a magical coin 10 times and records the number of heads. The coin is magical because each day the probability of getting heads changes. Let Y, the probability of getting heads on a given day, be uniform [0,1] Let X be the number of heads of 10 gotten on a given day with the magic coin. What is the pdf of X?

27 Example 5 continued Y is uniform [0,1] so X|Y is binomial n=10 p=Y So f(X,Y) X is discrete uniform All values equally likely

28 Fact You can compute the joint from a marginal and a conditional. Be careful how you compute the value sets!

29 Example 2 – Two Continuous The joint pdf of X and Y is Find marginal of X O X 1 Y 1

30 Example 2 Still need c You check:

31 continued Find P(Y<2X) O X 1 Y 1 O X 1 Y 1 P(Y≥2X)

32 Conditional distribution Find conditional pdf of Y and X=1/2 O X 1 Y 1

33 Conditional distribution Find conditional pdf of Y and X=x 0<x<1 O X 1 Y 1

34 Independence R.V. X and Y are independent if and only any of the following hold 1.F(x,y)=F X (x)F Y (y) P(X≤x,Y≤y)= P(X≤x)P(Y≤y) 2.f(x,y)=f X (x)f Y (y) 3. f(y|x)=f Y (y)

35 Example 3 Given the joint pdf of X,Y Use the marginal of X and the conditional pdf of Y given X=x to determine if X and Y are independent?

36 Answer Find marginal of X Find conditional of Y given X O Y 1

37 Answer continued Are they independent? No

38 Note P(Y≤3/4|x=1/2) and P(Y≤3/4|x ≤1/2) are very different things! Let’s calculate each one

39 P(Y≤3/4|X=1/2) The pdf of Y given X=1/2 is so

40 P(Y≤3/4|X ≤ 1/2) The probability Y given X ≤ 1/2 is where

41 P(Y≤3/4|X ≤ 1/2) The probability P(Y≤3/4,X ≤ 1/2) The probability O 1

42 Example 4 Suppose X has the Gamma distribution with parameters with K=2 and theta=1 and the conditional distribution of Y given X. (X>0) is Find P( X<4| Y=2)

43 Example 4 We know f(x,y)=f(x|y)f x (x) so the joint is The marginal of Y is Thus conditional of X given Y is

44 Example 4 continued So Thus Exercise try: P(X>4|Y>2)

45 Example 5 – Two Discretes You write a paper with an average rate of 10 errors per paper. Assume the number of errors per papers follows a Poisson distribution. You roommate proofreads it for you, and he/she has.8 percent of correcting each error. What is the joint distributions of the number of errors and the number of corrections? What is the distribution of the number of errors after you roommate reads the paper?

46 answer Let X be the number of errors Y be the number of errors after correction Clearly Y depends on X. Given What is pdf of Y|X? binomial(n=X,p=.2)

47 answer Let X be the number of errors Y be the number of errors after correction Extra Credit: if you can figure out marginal of Y.


Download ppt "Lecture 14: Multivariate Distributions Probability Theory and Applications Fall 2005 October 25."

Similar presentations


Ads by Google