Probability • Topic 3 of 3

Random Variables & Probability Distributions

A random variable $X$ assigns a number to each outcome of an experiment (e.g. the number of heads in two tosses). A probability distribution lists each value $x_i$ with its probability $p_i=P(X=x_i)$.

A valid distribution

Every $p_i\ge0$ and $\displaystyle\sum_i p_i=1$. This normalisation condition is the first check (and a frequent "find $k$" question).

Mean (expectation)

The mean or expected value is the probability-weighted average:

$$E(X)=\mu=\sum_i x_i\,p_i.$$

Variance

The variance measures spread:

$$\operatorname{Var}(X)=\sum_i x_i^2 p_i-\mu^2,\qquad \text{SD}=\sqrt{\operatorname{Var}(X)}.$$

1
Worked Example
If $P(X=x)=kx$ for $x=1,2,3$, find $k$.
Solution

$\sum p_i=k(1+2+3)=6k=1\Rightarrow k=\dfrac16.$

2
Worked Example
Find $E(X)$ for the distribution $X:1,2,3$ with $p:\tfrac16,\tfrac26,\tfrac36$.
Solution

$E(X)=1\cdot\tfrac16+2\cdot\tfrac26+3\cdot\tfrac36=\tfrac{1+4+9}{6}=\dfrac{14}{6}=\dfrac{7}{3}.$

3
Worked Example
Two coins are tossed; $X$ = number of heads. Write the distribution.
Solution

$P(X=0)=\tfrac14,\ P(X=1)=\tfrac12,\ P(X=2)=\tfrac14$ (since outcomes are HH, HT, TH, TT).

4
Worked Example
For the two-coin $X$, find $E(X)$.
Solution

$E(X)=0\cdot\tfrac14+1\cdot\tfrac12+2\cdot\tfrac14=\tfrac12+\tfrac12=1.$

Key Points

  • A distribution lists $x_i$ with $p_i\ge0$ and $\sum p_i=1$.
  • Mean $E(X)=\sum x_i p_i$.
  • Variance $=\sum x_i^2 p_i-\mu^2$; SD $=\sqrt{\text{Var}}$.
  • Use $\sum p_i=1$ to find unknown constants.
Tap an option to check your answer0 / 4
Q1.For a valid distribution, $\sum p_i=$
Explanation: Probabilities sum to $1$.
Q2.If $P(X=x)=kx$ for $x=1,2,3$, then $k=$
Explanation: $6k=1$.
Q3.$E(X)$ is defined as:
Explanation: Probability-weighted average.
Q4.Two coins tossed, $X=$ heads; $E(X)=$
Explanation: $0(\tfrac14)+1(\tfrac12)+2(\tfrac14)=1$.