Week 6
Sep 22, 2025
In today’s class we will:
Textbook Reference: JA 8; SDG 3.1
A random variable \(X\) is a function that maps each outcome of the sample space \(S\) to a number.
And specifically, a discrete random variables is a random variable with a finite or countable set of possible value.
We denote the possible outcome as \(x_1^*,\ldots,x_k^*\).
This definition is somehow related to how we can write down the outcome of an experiment:
Example:
The p.m.f. of a discrete random variable \(X\) , denoted as \(p_X(\cdot)\) gives the probability of each possible value of \(X\):
\[p_X(x_k^*)=P(X=x_k^*).\]
Using the previous examples:
A box contains 6 red balls and 4 blue balls. If you pick 3 balls at random , \(X\) is the total number of red balls you get from these 3 picks. Find the p.f. of \(X\).
Plot the p.f.
The c.d.f. of a discrete random variable \(X\) , denoted as \(F_X(\cdot)\) gives the probability that \(X\) is less than or equal to any argument \(x_0\) of \(F_X(\cdot)\):
\[F_X(x_0)=P(X\leq x_0)=\sum_{x_k^*\leq x_0}p_X(x_k^*).\]
Find the associated c.d.f. of \(X\).
\(X\) is the number shown, find the p.f. of \(X\)
\(X\) is the number shown, find the c.d.f. of \(X\)
Let say we’re interested in knowing \(P(a< X\leq b)\) where \(a\leq b\), we can use the c.d.f or p.f. to compute this probability:
Recall the sample mean formula
\[ \overline{x}=\frac{x_1+x_2+\ldots+x_n}{n}=\frac{1}{n}\sum_{i=1}^n x_i. \]
where \(x_i\) here is the observed sample (e.g. age of individuals). If we observe all possible value \(x_k^*\) (it would be all possible age of individuals) and the associated observed sample proportion \(p_k\), then the above sample mean can be rewritten as
\[ \overline{x}=\sum_{k} x_k^* p_k. \] Note that these mean is a function of the observed sample of individuals. By the law of large numbers, as the sample size increase, these sample proportion \(p_k\) gets closer to the probability \(p_X(x_k^*)\).
The population mean or expected value of a discrete random variable \(X\), denoted \(\mu_X\) or \(E(X)\) is
\[\mu_X=E(X)=\sum_{k} x_k^* p_X(x_k^*).\]
A box contains 6 red balls and 4 blue balls. If you pick 3 balls at random , \(X\) is the total number of red balls you get from these 3 picks. Find the expected value of \(X\).
\(X\) is the number shown when you roll a fair six-sided dice, find the expected value of \(X\)
Similarly, the population variance of a discrete random variable \(X\), denoted \(\sigma_X^2\) or \(Var(X)\) is
\[\sigma_X^2=Var(X)=E[(X-\mu_X)^2]=\sum_{k} (x_k^* -\mu_X)^2\ p_X(x_k^*).\] And, the the population standard deviation of a discrete random variable \(X\), denoted \(\sigma_X\) or \(sd(X)\) is
\[\sigma_X=sd(X)=\sqrt{\sigma_X^2}=\sqrt{\sum_{k} (x_k^* -\mu_X)^2\ p_X(x_k^*)}.\]
A box contains 6 red balls and 4 blue balls. If you pick 3 balls at random , \(X\) is the total number of red balls you get from these 3 picks. Find the population variance and standard deviation of \(X\).
\(X\) is the number shown when you roll a fair six-sided dice, find the population variance and standard deviation of \(X\)
We can extend the concept of p.f. and c.d.f. to the case where there are two or more random variables.
The joint p.f. of two discrete random variables \(X\) and \(Y\), denoted as \(p_{XY}(\cdot,\cdot)\), gives the joint probability
\[p_{XY}(x_k^*,y_l^*)=P(X=x_k^*\cap Y=y_l^*)=P(X=x_k^*, Y=y_l^*).\]
And, the joint c.d.f. of two discrete random variables \(X\) and \(Y\), denoted as \(F_{XY}(\cdot,\cdot)\), gives the probability that both \(X\) and \(Y\) are less than or equal to their corresponding argument:
\[F_{XY}(x_0,y_0)=P(X\leq x_0\cap Y=y _0)=P(X\leq x_0, Y\leq y_0).\]
Suppose a random individual drawn from a population \(S\) of individuals is surveyed to determine the number of phones and computers they own. The joint p.f. is given by the following probability table:
| Y | (# of | comp | uters) | |
| 0 | 1 | 2 | ||
| 0 | 0.06 | 0.03 | 0.01 | |
| X (# of phones) | 1 | 0.22 | 0.48 | 0.05 |
| 2 | 0.02 | 0.04 | 0.09 |
Using the given probability table, find \(F_{XY}(2,1)\), \(F_{XY}(0,1)\), \(F_{XY}(1,2)\).
The marginal p.f. of \(X\) and \(Y\) are respectively
\[p_X(x_k^*)=\sum_l p_{XY}(x_k^*,y_l^*),\quad \text{ and }\quad p_Y(y_l^*)=\sum_k p_{XY}(x_k^*,y_l^*).\]
| Y | (# of | comp | uters) | |
| 0 | 1 | 2 | ||
| 0 | 0.06 | 0.03 | 0.01 | |
| X (# of phones) | 1 | 0.22 | 0.48 | 0.05 |
| 2 | 0.02 | 0.04 | 0.09 |
The conditional p.f. of \(X\) given \(Y\) is
\[p_{X|Y}(x_k^*|y_l^*)=P(X=x_k^*|Y=y_l^*)=\frac{p_{XY}(x_k^*,y_l^*)}{p_Y(y_l^*)},\] and similarly the conditional p.f. of \(Y\) given \(X\) is
\[p_{Y|X}(y_l^*|x_k^*)=P(Y=y_l^*|X=x_k^*)=\frac{p_{XY}(x_k^*,y_l^*)}{p_X(x_k^*)}.\]
Find \(p_{X|Y}(0|1)\), \(p_{X|Y}(1|1)\) and \(p_{X|Y}(2|1)\).
| Y | (# of | comp | uters) | |
| 0 | 1 | 2 | ||
| 0 | 0.06 | 0.03 | 0.01 | |
| X (# of phones) | 1 | 0.22 | 0.48 | 0.05 |
| 2 | 0.02 | 0.04 | 0.09 |
The conditional c.d.f. of \(X\) given \(Y\) is
\[F_{X|Y}(x_0|y_l^*)=P(X\leq x_0|Y=y_l^*)=\sum_{x_k^*\leq x_0} p_{X|Y}(x_k^*|y_l^*),\] and similarly the conditional c.d.f. of \(Y\) given \(X\) is
\[F_{Y|X}(y_0|x_k^*)=P(Y\leq y_0|X=x_k^*)=\sum_{y_l^*\leq y_0} p_{Y|X}(y_l^*|x_k^*).\]
Find \(F_{X|Y}(1|1)\).
| Y | (# of | comp | uters) | |
| 0 | 1 | 2 | ||
| 0 | 0.06 | 0.03 | 0.01 | |
| X (# of phones) | 1 | 0.22 | 0.48 | 0.05 |
| 2 | 0.02 | 0.04 | 0.09 |
Similar to the unconditional one, using the conditional probability we have to compute these statistics.
The population conditional mean or conditional expectation of \(X\) given \(Y=y_l^*\) is
\[\mu_{X|Y=y_l^*}=E(X|Y=y_l^*)=\sum_{k} x_k^* p_{X|Y}(x_k^*|y_l^*).\]
The **population conditional variance* of \(X\) given \(Y=y_l^*\) is
\[\sigma_{X|Y=y_l^*}^2=Var(X|Y=y_l^*)=\sum_{k} (x_k^*-\mu_{X|Y=y_l^*})^2 p_{X|Y}(x_k^*|y_l^*),\] and the population conditional standard deviation is the square root of \(\sigma_{X|Y=y_l^*}^2\).
Find \(\mu_{X|Y=1}\) and \(\sigma_{X|Y=1}^2\).
| Y | (# of | comp | uters) | |
| 0 | 1 | 2 | ||
| 0 | 0.06 | 0.03 | 0.01 | |
| X (# of phones) | 1 | 0.22 | 0.48 | 0.05 |
| 2 | 0.02 | 0.04 | 0.09 |
ECON2250 Statistics for Economics - Fall 2025 - Maghfira Ramadhani