Random variables
A random variable is a real-valued function that assigns each outcome in a sample space \(S\) to a real number:
\[X:S\to\mathbb R\]
Notation
Upper-case letters such as \(X,Y,Z\) denote random variables.
\(X=x\) denotes the event that \(X\) takes the value \(x\).
Lower-case letters such as \(x,y,z\) denote values that random variables can take.
\(P(X=x)\) is the probability that \(X\) takes the value \(x\).
Classification
A discrete random variable takes finitely many or countably infinitely many values. A continuous random variable takes uncountably many values.
Probability distributions
The probability distribution of \(X\) completely describes the probabilities assigned to the values that \(X\) can take.
| Discrete random variable | Continuous random variable | |
|---|---|---|
| Probability distribution functions | Probability distribution function (PDF), or probability mass function (PMF), \(P(X=x)\). The CDF is \(F(x)=P(X\le x)\). | Probability density function (PDF), \(f(x)\). The CDF is \(F(x)=\int_{-\infty}^{x}f(t)\,\mathrm dt\). |
| Special types of distribution | Binomial distribution (in syllabus); Poisson distribution; hypergeometric distribution; and others. | Normal distribution (in syllabus); Student's t-distribution; chi-square distribution; and others. |
| Real-world examples | Number of tails in five coin tosses; number of red cars passing a road junction in ten minutes; average number of birds on the trees in one afternoon. | Height of a chosen student; time taken to travel to school; weight of a loaf of bread produced in a factory. |
Distribution of a discrete random variable
If \(X\) takes values \(x_1,x_2,\ldots,x_i,\ldots\) with probabilities \(a_1,a_2,\ldots,a_i,\ldots\), then \(P(X=x_i)=a_i\).
| \(x\) | \(x_1\) | \(x_2\) | \(\cdots\) | \(x_i\) | \(\cdots\) |
|---|---|---|---|---|---|
| \(P(X=x)\) | \(a_1\) | \(a_2\) | \(\cdots\) | \(a_i\) | \(\cdots\) |
\[0\le P(X=x)\le1\text{ for all}\hspace{0.5em}x,\qquad \sum_{\text{all}\hspace{0.5em}x}P(X=x)=1\]
Discrete uniform distribution
\(X\) follows a discrete uniform distribution with finite parameter \(n\) when it has \(n\) outcomes of equal probability.
\[P(X=x_1)=P(X=x_2)=\cdots=P(X=x_n)=\frac1n\]
Cumulative distribution function
\[F(a)=P(X\le a)=\sum_{x_i\le a}P(X=x_i)\]
For a fair die, \(X\in\{1,2,3,4,5,6\}\) and every value has probability \(\frac16\).
| \(x\) | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|
| \(P(X=x)\) | \(\frac16\) | \(\frac16\) | \(\frac16\) | \(\frac16\) | \(\frac16\) | \(\frac16\) |
| \(P(X\le x)\) | \(\frac16\) | \(\frac26=\frac13\) | \(\frac36=\frac12\) | \(\frac46=\frac23\) | \(\frac56\) | \(\frac66=1\) |
Need help? Join our JC Math tuition classes.
Learn more