Two-Way Tables
Key Questions
-
If you are given a pmf =
pXY(x,y) and you would like to find the marginal
pY(y) we would use the formula
py(y)=∑ip(xi,y) in other words you would sum over all of
x at the pointy So if we look at this table and want to find the marginal
pY(3) we go:
pY(3)=P(Y=3)
=P(Y=3,X=3)+P(Y=3,X=4)
=0.1+0.2
=0.3 Now to look at the formula for the conditional probability
we can look at the formula for
x giveny which is a conditional probability.pX∣Y(x∣y)=P(X=xi∣Y=yj)=P(X=xi,Y=yj)P(Y=yj) =pXY(xi,yj)pY(yi) now to use an example, we will look back at our table.
let us look for the conditional probability of:
pX∣Y(3∣4)=0.10.4=0.25 Thus, the probability that
X=3 given thatY=4 is0.25 -
A two-way table is a display of data divided into two different categories of subsets.
In the example below, the categories are
age range: with subsets for ages 0-5, 6-10, and 11-15
color preference: with subsets for various color choicesThe entry at D5 (value 8) indicates that 8 children in the age range 6-10 chose yellow as their preferred color.
The sum of values across a line indicates the number of children who chose the color for that line across all age ranges.
The sum of values down a column indicates the number of children surveyed in the corresponding age range.