Solveeit Logo

Question

Question: How do you calculate marginal, joint, and conditional probabilities from a two-way table?...

How do you calculate marginal, joint, and conditional probabilities from a two-way table?

Explanation

Solution

Probabilities represent the chances of an event x occurring. A probability is measured by the number of times event x occurs divided by the total number of trials. There are three types of probabilities:
1. Joint probabilities
2. Marginal probabilities
3. Conditional probabilities

Complete step by step solution:
Here we have to write the formulas to calculate marginal, joint and conditional probabilities.
Joint probability is the probability of two different events occurring at the same time. Joint probability is calculated by taking the proportion of times that occurs divided by total number of frequencies.
Marginal probability is the probability of a single event irrespective of any other event. For example, the probability of a coin flip giving head is considered a marginal probability because here we are not considering any other events.
Conditional probability is the probability of an event x occurring when a secondary event y is true. Mathematically, it is represented as P(XY)P\left( X|Y \right)
Now we have to calculate these probabilities by using a two-way table.
If you are given a pmf=pXY(x,y)pmf={{p}_{XY}}\left( x,y \right), and we will calculate the marginal probabilitypY(y){{p}_{Y}}\left( y \right).
To calculate the marginal probability we will use the formula py(y)=ip(xi,y){{p}_{y}}\left( y \right)=\sum\limits_{i}{p\left( {{x}_{i}},y \right)} .
Let's draw a table to calculate these probabilities.

p(x,y)p\left( x,y \right)X=3X=3X=4X=4
Y=2Y=20.20.20.10.1
Y=3Y=30.10.10.20.2
Y=4Y=40.10.10.30.3

Now if we wish to calculate the marginal pY(3){{p}_{Y}}\left( 3 \right)
Now by using the formula of marginal py(y)=ip(xi,y){{p}_{y}}\left( y \right)=\sum\limits_{i}{p\left( {{x}_{i}},y \right)} at Y=3Y=3
pY(3)=P(Y=3) pY(3)=P(Y=3,X=3)+P(Y=3,Y=4) \begin{aligned} & \Rightarrow {{p}_{Y}}\left( 3 \right)=P\left( Y=3 \right) \\\ & \Rightarrow {{p}_{Y}}\left( 3 \right)=P\left( Y=3,X=3 \right)+P\left( Y=3,Y=4 \right) \\\ \end{aligned}
Now from table if we look the values as mentioned in the above expression then we get
pY(3)=0.1+0.2 pY(3)=0.3 \begin{aligned} & \Rightarrow {{p}_{Y}}\left( 3 \right)=0.1+0.2 \\\ & \Rightarrow {{p}_{Y}}\left( 3 \right)=0.3 \\\ \end{aligned}
Here we get the marginal probability of the taken example.
Now to calculate the conditional probability we will use formula which is:

& \Rightarrow {{p}_{X|Y}}\left( x|y \right)=P\left( X={{x}_{i}}|Y={{y}_{i}} \right) \\\ & \Rightarrow {{p}_{X|Y}}\left( x|y \right)=\dfrac{P\left( X={{x}_{i}},Y={{y}_{i}} \right)}{P\left( Y={{y}_{i}} \right)} \\\ & \Rightarrow {{p}_{X|Y}}\left( x|y \right)=\dfrac{{{p}_{XY}}\left( {{x}_{i}},{{y}_{i}} \right)}{{{p}_{Y}}\left( {{y}_{i}} \right)} \\\ \end{aligned}$$ Now we are wishing the conditional probability of $${{p}_{X|Y}}\left( 3|4 \right)$$ , the by using formula we get $\begin{aligned} & \Rightarrow {{p}_{X|Y}}\left( 3|4 \right)=\dfrac{{{p}_{XY}}\left( 3,4 \right)}{{{p}_{Y}}\left( 4 \right)} \\\ & \Rightarrow {{p}_{X|Y}}\left( 3|4 \right)=\dfrac{0.1}{0.4}=0.25 \\\ \end{aligned}$ **Hence by using the two way table we calculated the values of given probabilities.** **Note:** Sometimes students may get confused in these three probabilities. Actually the basic difference between them is that the joint probability is the probability of two events occurring simultaneously, and in the marginal probability is the probability of an event irrespective of the outcome of another variable, and conditional probability is the probability of one event occurring in the presence of a second event.