Joint Distribution Notes

Practice Questions for Examination

Practice questions are for practice purposes only, but they cover the syllabus. This session (number 10) continues the discussion on joint distribution, which began in the last class.

Joint Distribution

When dealing with more than one random variable, joint distribution is used. This session covers three main parts:

  1. Joint distribution and marginal distribution

  2. Dependence and independence of random variables

  3. Expectation, mean, and variance

Questions similar to the practice ones might appear in the exam. The session focuses on three parts:

  • Discrete bivariate

  • Continuous bivariate

  • Multivariate

Discrete Bivariate Random Variables

For two discrete random variables xx and yy, the probability that xx takes the value xx and yy takes the value yy is written as: P(X=x,Y=y)P(X = x, Y = y).

This is an intersection, and the joint density function is defined as:

f(x,y)=P(X=x,Y=y)f(x, y) = P(X = x, Y = y)

This is the joint probability mass function or joint probability density function.

Example: Rolling two dice. Let xx be the number on the first die and yy be the number on the second die. Both xx and yy vary from 1 to 6, and their density function is 1/361/36 for all xx and yy.

Joint Probability Table

y=1

y=2

y=3

y=4

y=5

y=6

x=1

1/36

1/36

1/36

1/36

1/36

1/36

x=2

1/36

1/36

1/36

1/36

1/36

1/36

x=3

1/36

1/36

1/36

1/36

1/36

1/36

x=4

1/36

1/36

1/36

1/36

1/36

1/36

x=5

1/36

1/36

1/36

1/36

1/36

1/36

x=6

1/36

1/36

1/36

1/36

1/36

1/36

Each entry represents the joint density function for the corresponding xx and yy values. Also, probabilities are always greater than zero and less than one. The summation for all values should be equal to one:

<em>x</em>yf(x,y)=1\sum<em>{x} \sum</em>{y} f(x, y) = 1

Example: Let xx be the value on the first die and tt be the total on both dice. xx varies from 1 to 6, while tt varies from 2 to 12.

Table for x and t

t=2

t=3

t=4

t=5

t=6

t=7

t=8

t=9

t=10

t=11

t=12

x=1

value

value

value

value

value

value

0

0

0

0

0

x=2

0

value

value

value

value

value

value

0

0

0

0

x=3

0

0

value

value

value

value

value

value

0

0

0

x=4

0

0

0

value

value

value

value

value

value

0

0

x=5

0

0

0

0

value

value

value

value

value

value

0

x=6

0

0

0

0

0

value

value

value

value

value

value

Example: Event B:yx2B: y - x \geq 2. Find the probability. Add their density functions.

Marginal Distribution

Marginal distribution involves taking a projection from two dimensions to one dimension.

For example, given two random variables xx and yy, transform the two-dimensional random variable into one-dimensional random variables, xx alone and yy alone. This allows the application of concepts from previous chapters (3 & 4) to find PDFs, CDFs, means, etc.

Marginal density function for xx is given as:

f<em>X(x)=</em>yf(x,y)f<em>X(x) = \sum</em>{y} f(x, y)

This is a function of xx alone, as the effect of yy is accumulated.

Marginal density function for yy is given as:

f<em>Y(y)=</em>xf(x,y)f<em>Y(y) = \sum</em>{x} f(x, y)

This is a function of yy alone, accumulating the effect of xx on yy.

Notation

  • f(x,y)f(x, y) or fXY(x,y)f_{XY}(x, y): Joint density function

  • fX(x)f_X(x): Marginal density function for xx

  • fY(y)f_Y(y): Marginal density function for yy

Example: Calculating marginal density functions from a joint distribution table. Add row-wise to find f<em>X(x)f<em>X(x) and column-wise to find f</em>Y(y)f</em>Y(y).


f_X(x) = \begin{cases}
1/6, & x = 1, 2, 3, 4, 5, 6 \
0, & \text{otherwise}
\end{cases}


f_Y(y) = \begin{cases}
1/6, & y = 1, 2, 3, 4, 5, 6 \
0, & \text{otherwise}
\end{cases}

Cumulative Distribution Function (CDF)

For xx alone:


F_X(x) = \begin{cases}
0, & x < 1 \
1/6, & 1 \leq x < 2 \
2/6, & 2 \leq x < 3 \
3/6, & 3 \leq x < 4 \
4/6, & 4 \leq x < 5 \
5/6, & 5 \leq x < 6 \
1, & x \geq 6
\end{cases}

Dependence and Independence of Random Variables

Two random variables are independent if the joint density function is equal to the product of the marginal density functions:

f(x,y)=f<em>X(x)f</em>Y(y)f(x, y) = f<em>X(x) \cdot f</em>Y(y)

Otherwise, they are dependent.

Example: Using the dice example, if f(x=3,y=4)=f<em>X(3)f</em>Y(4)f(x=3, y=4) = f<em>X(3) \cdot f</em>Y(4), then they are independent.

If variables are not independent, the concept of conditional probability applies. Recall from chapter 3:

P(AB)=P(A)P(B)P(A \cap B) = P(A) \cdot P(B)

For conditional probability:

P(AB)=P(AB)P(B),provided P(B)0P(A | B) = \frac{P(A \cap B)}{P(B)}, \text{provided } P(B) \neq 0

Conditional Density Function

The conditional density function can be written as:

f(xy)=f(x,y)f<em>Y(y),provided f</em>Y(y)0f(x | y) = \frac{f(x, y)}{f<em>Y(y)}, \text{provided } f</em>Y(y) \neq 0

This is the probability of X=xX = x given that Y=yY = y.

Example: Finding the total value of 4, given the first die is 3. f(t=4x=3)=1/361/6=1/6f(t=4 | x=3) = \frac{1/36}{1/6} = 1/6

Independence and Conditional Probability

If two random variables are independent, the conditional probability becomes the same as the marginal probability:

f(xy)=fX(x)f(x | y) = f_X(x)

Expectation

Expectation involves adding over the entire sample space. With two random variables, it involves adding for all xx and all yy.

The expectation of any function h(x,y)h(x, y) is:

E[h(x,y)]=<em>x</em>yh(x,y)f(x,y)E[h(x, y)] = \sum<em>{x} \sum</em>{y} h(x, y) \cdot f(x, y)

Mean

The mean for x (μx\mu_x) is:

E[x]=<em>x</em>yxf(x,y)=<em>xxf</em>X(x)E[x] = \sum<em>{x} \sum</em>{y} x \cdot f(x, y) = \sum<em>{x} x \cdot f</em>X(x)

The mean for y (μy\mu_y) is:

E[y]=<em>x</em>yyf(x,y)=<em>yyf</em>Y(y)E[y] = \sum<em>{x} \sum</em>{y} y \cdot f(x, y) = \sum<em>{y} y \cdot f</em>Y(y)

Expectation of xy

To find the expected value of xyxy:

E[xy]=<em>x</em>yxyf(x,y)E[xy] = \sum<em>{x} \sum</em>{y} xy \cdot f(x, y)

Marginal density functions cannot be used here.

Covariance

Covariance is defined as:

Cov(x,y)=E[(xμ<em>x)(yμ</em>y)]Cov(x, y) = E[(x - \mu<em>x)(y - \mu</em>y)]

A direct formula is:

Cov(x,y)=E[xy]E[x]E[y]Cov(x, y) = E[xy] - E[x] \cdot E[y]

Variance of x

Instead of xμxx - \mu_x squared, covariance of xx and yy is used.

Tossing two fair coins: Let xx be the number of heads and yy be the number of tails. Find the joint density function, CDF, marginal density function, and check whether xx and yy are independent. If dependent, find Cov(x,y)Cov(x, y).

Covariance and Independence

Covariance measures the joint variability of two random variables. If xx and yy are independent, then Cov(x,y)=0Cov(x, y) = 0. However, if Cov(x,y)=0Cov(x, y) = 0, it does not necessarily mean that xx and yy are independent.

Zero covariance means no linear relationship.

Important

Covariance formula: Cov(x,y)=E[xy]E[x]E[y]Cov(x, y) = E[xy] - E[x] \cdot E[y].

Continuous Joint Distribution

For continuous random variables, the concepts are similar to the discrete case, but summations are replaced with integrations.

For two continuous random variables xx and yy, a function f(x,y)f(x, y) such that f(x,y)0f(x, y) \geq 0 and <em></em>f(x,y)dxdy=1\int<em>{-\infty}^{\infty} \int</em>{-\infty}^{\infty} f(x, y) dx dy = 1 is the joint probability density function.

The CDF is:

F(x,y)=<em>x</em>yf(x,y)dxdyF(x, y) = \int<em>{-\infty}^{x} \int</em>{-\infty}^{y} f(x, y) dx dy

Marginal density functions are:

<br>f<em>X(x)=</em>f(x,y)dy<br><br>f<em>X(x) = \int</em>{-\infty}^{\infty} f(x, y) dy<br>

<br>f<em>Y(y)=</em>f(x,y)dx<br><br>f<em>Y(y) = \int</em>{-\infty}^{\infty} f(x, y) dx<br>

Independence: f(x,y)=f<em>X(x)f</em>Y(y)f(x, y) = f<em>X(x) \cdot f</em>Y(y)

Expectation:

E[h(x,y)]=<em></em>h(x,y)f(x,y)dxdyE[h(x, y)] = \int<em>{-\infty}^{\infty} \int</em>{-\infty}^{\infty} h(x, y) \cdot f(x, y) dx dy

Example

Bank operates drive-up and walk-up. Let xx be the proportion of time the drive-up is in use, and yy be the proportion of time the walk-up is in use. The joint density function is given. Calculate the probability that neither facility is busy more than one quarter of the time. (Limits are 0 to 1/4 for both integrals.)

Also marginal pdf for x gives probability distribution of busy time for drive up facility without reference to the walk up window. The same is true for y.

Conditional PDF

To find the conditional PDF of yy given that x=0.8x = 0.8, use:

f(yx)=f(x,y)fX(x)f(y | x) = \frac{f(x, y)}{f_X(x)}

Important Results on Expectation

<br>E[Ax+B]=AE[x]+B<br><br>E[Ax + B] = A \cdot E[x] + B<br>

Var(Ax+B)=A2Var(x)<br>\operatorname{Var}(A x+B)=A^{2} \operatorname{Var}(x)<br>

<br>E[Ax+By]=AE[x]+BE[y]<br><br>E[Ax + By] = A \cdot E[x] + B \cdot E[y]<br>

If x and y are Independent

E[XY]=E[X]E[Y]E[X \cdot Y] = E[X] \cdot E[Y]