Back to homeMathematics · 4th ESO A · Change subject
Start for free
ESO Y4A · Mathematics
statistics · Bivariate statistics

Conditional distributions

The marginal mean of the Physics marks tells you how "the class as a whole" is doing. But you might be interested in something more specific: how is the group that got a $6$ in Maths doing in Physics? That question, restricted to a subgroup, is a conditional distribution.

Before you start, make sure you know: Statistical parameters (3rd ESO)
Before you start, make sure you know: Frequency tables (3rd ESO)

What a conditional distribution is

Diagram of a two-way table highlighting the row X = 15 years to illustrate the subgroup of the conditional distribution. row X = 15 years: only this subgroup Y|X=15: the distribution of Y within that subgroup, nothing else
Practice★☆☆Not started
Given the following two-way table relating the variables $X$ and $Y$: | $X \setminus Y$ | $1$ | $2$ | $3$ | | :---: | :---: | :---: | :---: | | $10$ | $2$ | $5$ | $1$ |…

Given the following two-way table relating the variables $X$ and $Y$:

$X \setminus Y$ $1$ $2$ $3$
$10$ $2$ $5$ $1$
$20$ $0$ $4$ $3$
$30$ $4$ $1$ $0$

Write down the frequency table of the distribution of the variable $Y$ conditional on $X = 10$ and calculate the size of this subpopulation.

Solve
Practice★☆☆Not started
In a study on two variables $X$ and $Y$, the distribution of $Y$ conditional on a specific value $x_i$ has been isolated, obtaining the following absolute frequencies: |…

In a study on two variables $X$ and $Y$, the distribution of $Y$ conditional on a specific value $x_i$ has been isolated, obtaining the following absolute frequencies:

$Y | X = x_i$ Absolute frequency ($f_{j|i}$)
$100$ $4$
$200$ $12$
$300$ $4$

Calculate the conditional relative frequencies $h_{j|i}$ for each value of $Y$ and check that they add up to $1$.

Solve

Conditional mean and variance

Within that subgroup, the mean and variance are calculated exactly as usual, but using only the frequencies of that row (or column).

Diagram of the calculation of the conditional mean and variance from the data and frequencies of the subgroup in one row. X = 3º X = 4º 0123 ȳ|x=3 = 1,2 ȳ|x=4 = 0,7 two different conditional means, two subgroups
Practice★☆☆Not started
The number of spelling mistakes ($Y$) in a dictation exercise is analysed according to the year group ($X$). The two conditional distributions for $X=3$ and $X=4$ are…

The number of spelling mistakes ($Y$) in a dictation exercise is analysed according to the year group ($X$). The two conditional distributions for $X=3$ and $X=4$ are extracted:

Distribution $Y | X=3$:

Values $y_j$: $0, 1, 2, 3$

Frequencies: $2, 5, 2, 1$

Distribution $Y | X=4$:

Values $y_j$: $0, 1, 2, 3$

Frequencies: $5, 3, 2, 0$

Calculate the mean number of mistakes in each year group ($\bar{y}_{|x=3}$ and $\bar{y}_{|x=4}$) and indicate in which year group, on average, fewer mistakes are made.

Solve
Practice★★☆Not started
In a nutrition study, the carbohydrate content in grams ($X$) and protein content in grams ($Y$) of several energy bars are related. The results are grouped in the…

In a nutrition study, the carbohydrate content in grams ($X$) and protein content in grams ($Y$) of several energy bars are related. The results are grouped in the following table:

$X \setminus Y$ $5$ $10$ $15$
$20$ $8$ $12$ $0$
$30$ $2$ $15$ $5$
$40$ $0$ $4$ $14$

Calculate the mean and standard deviation of the protein content for those bars that have exactly $30\text{ g}$ of carbohydrates (distribution $Y|X=30$).

Solve

Statistical independence

Visual comparison of two conditional distributions with identical relative frequencies showing statistical independence. Y|X=10,5 · 0,33 · 0,17 = Y|X=20,5 · 0,33 · 0,17
Practice★★☆Not started
A survey is carried out in a school asking about gender ($X$: $1=\text{Chico}$, $2=\text{Chica}$) and preferred social network ($Y$: $1=\text{TikTok}$,…

A survey is carried out in a school asking about gender ($X$: $1=\text{Chico}$, $2=\text{Chica}$) and preferred social network ($Y$: $1=\text{TikTok}$, $2=\text{Instagram}$, $3=\text{BeReal}$).

$X \setminus Y$ $1$ $2$ $3$
$1$ $30$ $20$ $10$
$2$ $45$ $30$ $15$

Calculate the conditional relative frequency distributions $Y|X=1$ and $Y|X=2$. In light of the results, are gender and preferred social network independent in this sample?

Solve
Practice★★★Not started
Demonstrate numerically a fundamental property of statistical independence. Given the following table where $X$ and $Y$ are independent (their joint relative frequencies…

Demonstrate numerically a fundamental property of statistical independence. Given the following table where $X$ and $Y$ are independent (their joint relative frequencies are the product of the marginal ones):

$X \setminus Y$ $2$ $4$ Total
$1$ $10$ $30$ $40$
$2$ $15$ $45$ $60$
Total $25$ $75$ $100$

Calculate the marginal mean $\bar{y}$ and the conditional means $\bar{y}_{|x=1}$ and $\bar{y}_{|x=2}$. Check that, since they are independent, the equality $\bar{y} = \bar{y}_{|x=1} = \bar{y}_{|x=2}$ holds.

Solve

Be careful: what is true for groups may not be true overall

This is the first serious hint of something you will see in more detail in the next section: a statistical relationship between two variables does not guarantee that one is the cause of the other, nor that comparing whole groups tells the full story.

Graphical illustration of Simpson's paradox showing how combining unequal subgroups reverses the overall result. by groups:New does not win overall:Does New win? ≠ the uneven distribution of patients between groups reverses the conclusion
Practice★★★Not started
In a hospital, a new treatment is being tested. Variable $X$ indicates the treatment ($0=\text{Estándar}$, $1=\text{Nuevo}$) and variable $Y$ indicates the outcome…

In a hospital, a new treatment is being tested. Variable $X$ indicates the treatment ($0=\text{Estándar}$, $1=\text{Nuevo}$) and variable $Y$ indicates the outcome ($0=\text{No curado}$, $1=\text{Curado}$). The patients are divided into two risk groups, forming two conditional distributions:

Low Risk Group:

Standard Treatment: $10$ cured out of $50$ patients.

New Treatment: $2$ cured out of $10$ patients.

High Risk Group:

Standard Treatment: $6$ cured out of $10$ patients.

New Treatment: $25$ cured out of $50$ patients.

Calculate the recovery rate (which is equivalent to the mean $\bar{y}$) for each treatment within each risk group. Then, combine all patients and calculate the overall recovery rate for each treatment. Which treatment seems better in the separate groups and which seems better overall? (This phenomenon is known as Simpson's Paradox).

Solve

Back to the start: To find out how the group that got a $6$ in Maths is doing in Physics, you take only the row $X=6$ of the table and calculate its conditional mean $\bar{y}_{|X=6}$ by dividing by the number of students in that row.

Summary

See all the exercises in this section