ELEC 321

# Discrete Random Vectors

Updated 2017-11-30

We are interested in joint behavior of multiple random variables. An example of random vector would be rolling two dies and we are looking at the joint behavior of two random variables.

There are continuous and discrete random variables.

## Discrete Random Vectors

### Joint Probability Mass Function

The probability for a realization of all considered random variables.

Example: consider the random vector from above (rolling two dies)

Out of all possibilities, sum of points being 6 has 6 possible outcomes: (1, 5), (2, 4), (3, 3), (4, 2), (1, 6). Thus the probability of $X_1=6$ is $\frac{5}{36}$. Then out of those possibilities, only (3, 3) has the absolute difference 0, so $\mathbb P(X_2=0\vert X_1=6)=\frac{1}{5}$.

Therefore the joint probabilities is $\mathbb P(X_1=6, X_2=0)=\frac{1}{36}$

### Marginal Densities

PMF that only takes interest in a single random variable in a random variable.

For instance if the random vector has 2 elements, then $f(x_1, x_2)$ is the discrete joint PMF function.

Then the marginal densities is the PMF with the other variables (not of interest) summed up.

### Mean of Random Vector

The mean/expected value of a random vector just applies to each individual random variables.

### Covariance

The variance of the random vector can be described as covariance, in a covariance matrix.

Where $\mathbf X-\mu$ the random vector subtracting the mean of the random vector, and $(\mathbf X-\mu)^T$ is the transpose. This results in a matrix multiplication that returns a matrix:

Where for any $i​$,

And for any $i$ and $j$,

The covariance of the two individual random variable is

### Correlation Coefficient

It describes how correlated two random variables are. It is defined as follows.

Where $\rho \in [-1, 1]$.

### Independent Random Variables

The random variables $X_1, X_2, \dotsc, X_m$ are independent from each other if and only if

Consider random variables $X$ and $Y$, if they are independent then,

Covariance is 0 if they are independent.

Note that independence of $X$ and $Y$ $\Rightarrow\sigma_{XY}=0$, but $\sigma_{XY}\nRightarrow$ that $X and$Y are independent.

### Conditional PMF

Consider two random variables $X_1$ and $X_2$. Then the conditional PMF is:

Thus, it’s clear to see that

#### Independence

If $X_1$ and $X_2$ are independent, then

It follows that

and similarly

### Conditional Mean and Variance

Conditional Mean is the expected value of one random variable given the realization of another random variable.

Conditional Variance:

#### Independence

If events $X$ and $Y$ are independent, then:

• Conditional PMF $\equiv$ marginal PMF
• Since $f(y\vert x)=f_Y(y)$ and $f(x\vert y)=f_X(x)$
• Conditional means and variances $\equiv$ marginal means and variances
• $\mathbb E(Y\vert X=x)=\mathbb E(Y)$ and $\text{Var}(Y\vert X=x)=\text{Var}(Y)$
• $\mathbb E(X\vert Y=y)=\mathbb E(X)$ and $\text{Var}(X\vert Y=y)=\text{Var}(X)$
• An example would be $\mathbb E(e^{X+Y}\vert X=x)=e^x\mathbb E(e^Y)$

### Conditional Mean As A Function

Generally the conditional mean is expressed as $\mathbb E(Y\vert X=x)$, which is a function of $x$. Thus, we can express that as:

Since $x$ is only a realization of a random variable, we can consider $h(x)$ as a random function as:

### Two Step Average

We may find the conditional mean of a random variable in two steps.

Where $\mathbb E[Y]=\mathbb E[g(X, Y)]$ and $\mathbb E[\mathbb E[Y\vert X]]=\mathbb E[\mathbb E[g(X, Y)\vert X]]$. It follows that

### Total Variance

Consider the following plot of two random variables $X$ and $Y$. Where the red circles represent $\mathbb E(Y\vert X=x)$ and the red whiskers represents the variance $\text{Var}(Y\vert X=x)$. Then the blue circle is the overall mean $\mathbb E(Y)$ and the blue whisker is the overall variance $\text{Var}(Y)$.

In this case, the Total Variance is given by

In the example above, the unexplained variance is the inner variance (red whiskers). The explained variance is the variance due to the red dots increasing.

The Percentage of Explained Variance is given by:

This gives an idea of how good a prediction is. If the percentage of explained variance is closer to 1, then one could use it for a good prediction. On the other hand, a percentage of near 0 is useless.

For the best prediction, use $g(x)=\mathbb E(Y\vert X=x)$.