2022-12-23

Marginal probability distribution

What is a marginal probability distribution

A marginal probability distribution is a probability distribution in which one of the random variables is eliminated from the joint probability distribution. For example, the marginal probability of X is the probability that event X will occur regardless of other events.

For a discrete random variable, the marginal probability distribution is expressed by the following equation:

{\displaystyle P(X)=\sum _{y}P(X,Y)}

For continuous random variables, the marginal probability distribution is expressed by the following equation:

{\displaystyle f_(x)=\int_{y}f(x,y)\,\mathrm {d} y}

As an example of the marginal distribution of a discrete random variable, I will use the following distribution of blood types of boys and girls in one elementary school class.

X\Y Type A Type B Type O Type AB
Boy 0.25 0.10 0.10 0.05
Girl 0.20 0.20 0.05 0.05

The total probability of gender and blood type can then be calculated as follows.

X\Y Type A Type B Type O Type AB Sum
Boy 0.25 0.10 0.10 0.05 0.50
Girl 0.20 0.20 0.05 0.05 0.50
Sum 0.45 0.30 0.15 0.10 1.00

The sum of these values is the marginal probability. Each of these marginal probabilities is shown below.

P(boy)=0.50 \\ P(girl)=0.50 \\ P(type A)=0.45 \\ P(type B)=0.30 \\ P(type O)=0.15 \\ P(type AB)=0.10

Independence of random variables

We can say that X and Y are independent of each other when the random variables X and Y do not affect each other. Independence is determined by whether the joint probabilities can be expressed as a product of the marginal probabilities. The following is an explanation of the discrete and continuous random variable cases, respectively.

Discrete random variable case

We can say that X and Y are independent if the discrete random variables X and Y satisfy the following conditions:

P(X,Y) = P(X)P(Y)

For example, suppose we have the following joint probability distributions for random variables X and Y.

X\Y 1 2 3
0 0.10 0.10 0.20
1 0.20 0 0
2 0.10 0.10 0.20

The marginal probabilities are as follows, respectively.

P(X=0)=0.40 \\ P(X=1)=0.20 \\ P(X=2)=0.40 \\ P(Y=1)=0.40 \\ P(Y=2)=0.20 \\ P(Y=3)=0.40

Therefore, P(X=0, Y=1) = 0.10 and P(X=0)P(Y=1) = 0.16 We know that X and Y are not independent because the product of simultaneous and marginal probabilities do not match.

Continuous random variable case

We can say that X and Y are independent if the probability density functions of continuous random variables X and Y satisfy the following:

f(x,y) = f(x)f(y)

For example, suppose there is a following probability density function for joint probability:

f(x, y) = \left\{ \begin{array}{ll} 4xy & (0 < x < 1, 0 < y < 1) \\ 0 & (otherwise) \end{array} \right.

For 0 < x < 1, f(x) becomes

\begin{aligned} f(x) &= \int^{1}_{0} f(x,y) \mathrm{d} y \\ &= \int^{1}_{0} 4xy \mathrm{d} y \\ &= 2x \end{aligned}

Thus f(x) becomes

f(x) = \left\{ \begin{array}{ll} 2x & (0 < y < 1) \\ 0 & (otherwise) \end{array} \right.

Similarly, f(y) becomes

f(y) = \left\{ \begin{array}{ll} 2y & (0 < y < 1) \\ 0 & (otherwise) \end{array} \right.

Thus, for 0 < x < 1, 0 < y < 1, we can say that x and y are independent since

f(x,y) = f(x)f(y) = 4xy

Next, let us consider the following probability density function for joint probability:

f(x, y) = \left\{ \begin{array}{ll} x+y & (0 < x < 1, 0 < y < 1) \\ 0 & (otherwise) \end{array} \right.

The f(x) and f(y) are as follows, respectively.

f(x) = \left\{ \begin{array}{ll} x + \frac{1}{2} & (0 < y < 1) \\ 0 & (otherwise) \end{array} \right.
f(y) = \left\{ \begin{array}{ll} y + \frac{1}{2} & (0 < y < 1) \\ 0 & (otherwise) \end{array} \right.

For 0 < x < 1, 0 < y < 1, f(x,y) \neq f(x)f(y), so x and y are not independent.

Ryusei Kakujo

researchgatelinkedingithub

Focusing on data science for mobility

Bench Press 100kg!