# The data for the joint probability mass function of X and Y (two different measu

The data for the joint probability mass function of X and Y (two different measurement systems) are given in the table below.
a) Calculate the marginal distributions of X and Y and plot them.
b) Select one of the Y values from the table and find the conditional probability mass function of X for that Y value you have selected and plot it.
c) Show whether X and Y are independent or not.
d) Calculate the covariance of (X,Y) i.e. Cov(X,Y).
\begin{array}{|c|c|}\hline f(x,y) & 1 & 2 & 3 & 4 \\ \hline 10 & 0.05 & 0 & 0.1 & 0 \\ \hline 20 & 0.1 & 0.1 & 0.05 & 0.05 \\ \hline 30 & 0.05 & 0 & 0.15 & 0 \\ \hline 40 & 0.1 & 0.15 & 0.05 & 0.05 \\ \hline \end{array}

• Questions are typically answered in as fast as 30 minutes

### Plainmath recommends

• Get a detailed answer even on the hardest topics.
• Ask an expert for a step-by-step guidance to learn to do it yourself.

Liek1993
Step 1
Given,
The data for the joint probability mass function of X and Y (two different measurement systems) are given in the table below.
\begin{array}{|c|c|}\hline f(x,y) & 1 & 2 & 3 & 4 \\ \hline 10 & 0.05 & 0 & 0.1 & 0 \\ \hline 20 & 0.1 & 0.1 & 0.05 & 0.05 \\ \hline 30 & 0.05 & 0 & 0.15 & 0 \\ \hline 40 & 0.1 & 0.15 & 0.05 & 0.05 \\ \hline \end{array}
Step 2
a) Calculate the marginal distributions of X and Y and plot them.
\begin{array}{|c|c|}\hline f(x,y) & 1 & 2 & 3 & 4 & \text{Total} \\ \hline 10 & 0.05 & 0 & 0.1 & 0 & 0.15 \\ \hline 20 & 0.1 & 0.1 & 0.05 & 0.05 & 0.3 \\ \hline 30 & 0.05 & 0 & 0.15 & 0 & 0.2 \\ \hline 40 & 0.1 & 0.15 & 0.05 & 0.05 & 0.35 \\ \hline \text{Total} & 0.3 & 0.25 & 0.35 & 0.1 & 1\\ \hline \end{array}
The marginal distribution of X:
$$\displaystyle{P}{\left({X}={x}\right)}=\sum_{{{y}}}{\left({x}={x},{y}={y}\right)}$$
\begin{array}{|c|c|}\hline X & 10 & 20 & 30 & 40 \\ \hline P(X=x) & 0.15 & 0.3 & 0.2 & 0.35 \\ \hline \end{array}
The marginal distribution of Y:
$$\displaystyle{P}{\left({Y}={y}\right)}=\sum_{{{x}}}{P}{\left({x}={x},{y}={y}\right)}$$
\begin{array}{|c|c|}\hline Y & 1 & 2 & 3 & 4 \\ \hline P(Y=y) & 0.3 & 0.25 & 0.35 & 0.1 \\ \hline \end{array}
Step 3
b) To calculate the conditional probability of X with the value of $$\displaystyle{\left({Y}={1}\right)}$$
$$\displaystyle{P}{\left({X}={x}{\mid}{Y}={y}\right)}={\frac{{{P}{\left({X}={x},{Y}={y}\right)}}}{{{P}{\left({Y}={y}\right)}}}}$$
\begin{array}{|c|c|}\hline X & 10 & 20 & 30 & 40 \\ \hline P(X=x|Y=1) & 0.167 & 0 & 0.286 & 0 \\ \hline \end{array}
The conditional distribution is plotted:

Step 4
c) Show whether X and Y are independent or not.
If the variable X and Y are independent that satisfies,
$$\displaystyle{P}{\left({X}={x}{\mid}{Y}={y}\right)}={P}{\left({X}={x}\right)}$$
or
$$\displaystyle{P}{\left({X}={x}{\mid}{Y}={y}\right)}={P}{\left({Y}={y}\right)}$$
Let take $$\displaystyle{\left({X}={1}\right)}$$
$$\displaystyle{P}{\left({X}={10}\right)}={P}{\left({10},\ {1}\right)}+{P}{\left({10},\ {2}\right)}+{P}{\left({10},\ {3}\right)}+{P}{\left({10},\ {4}\right)}$$
$$\displaystyle={0.05}+{0}+{0.1}+{0}$$
$$\displaystyle={0.15}$$
$$\displaystyle\ne{P}{\left({X}={10}{\mid}{Y}={y}\right)}$$
Hence X and Y are not independent random variables
Step 5
d) Calculate the covariance of (X,Y) i.e. Cov(X,Y).
$$\displaystyle{C}{o}{v}{\left({x},{y}\right)}={E}{\left({x}{y}\right)}-{E}{\left({x}\right)}{E}{\left({y}\right)}$$
Where,
$$\displaystyle{E}{\left({x}{y}\right)}=\sum\sum{x}_{{{1}}}{y}_{{{i}}}{p}_{{{i}{j}}}$$
$$\displaystyle{E}{\left({x}\right)}=\sum{x}_{{{i}}}{p}_{{{i}{j}}}$$
$$\displaystyle{E}{\left({y}\right)}=\sum{y}_{{{i}}}{p}_{{{i}{j}}}$$
$$\displaystyle{E}{\left({x}\right)}={\left({10}\cdot{0.15}\right)}+{\left({20}\cdot{0.3}\right)}+{\left({30}\cdot{0.2}\right)}+{\left({40}\cdot{0.35}\right)}$$
$$\displaystyle={27.5}$$
$$\displaystyle{E}{\left({y}\right)}={\left({1}\cdot{0.3}\right)}+{\left({2}\cdot{0.25}\right)}+{\left({3}\cdot{0.35}\right)}+{\left({4}\cdot{0.1}\right)}$$
$$\displaystyle={2.25}$$
$$\displaystyle{E}{\left({x}{y}\right)}={\left[{\left({10}\cdot{1}\cdot{0.05}\right)}+{\left({10}\cdot{2}\cdot{0}\right)}+{\left({10}\cdot{3}\cdot{0.1}\right)}+{\left({10}\cdot{4}\cdot{0}\right)}\right.}$$
$$\displaystyle+{\left({20}\cdot{1}\cdot{0.1}\right)}+{\left({20}\cdot{2}\cdot{0.1}\right)}+{\left({20}\cdot{3}\cdot{0.05}\right)}+{\left({20}\cdot{4}\cdot{0.05}\right)}$$
$$\displaystyle+{\left({30}\cdot{1}\cdot{0.05}\right)}+{\left({30}\cdot{2}\cdot{0}\right)}+{\left({30}\cdot{3}\cdot{0.15}\right)}+{\left({30}\cdot{4}\cdot{0.35}\right)}$$
$$\displaystyle+{\left({40}\cdot{1}\cdot{0.1}\right)}+{\left({40}\cdot{2}\cdot{0.15}\right)}+{\left({40}\cdot{3}\cdot{0.05}\right)}+{\left({40}\cdot{4}\cdot{0.05}\right)}{]}$$
$$\displaystyle={\left[{0.5}+{0}+{3}+{0}+{2}+{4}+{3}+{4}+{1.5}+{0}+{13.5}+{0}+{4}+{12}+{6}+{8}\right]}$$
$$\displaystyle={61.5}$$
$$\displaystyle{C}{o}{v}{\left({x},{y}\right)}={61.5}-{27.5}\cdot{2.25}$$
$$\displaystyle=-{0.375}$$