Chapter 13 · Statistics and Probability

13.3 Random Variables and Probability Distributions

A random variable turns each outcome of an experiment into a number. Its probability distribution lists the values and their probabilities; from it come the mean (expected value) $\mu=\sum x_ip_i$ and the variance $\sigma^2=\sum x_i^2p_i-\mu^2$. The number of successes in repeated independent trials — the binomial distribution, with mean $np$ and variance $npq$ — is the example JEE Main uses most.

A stall at a school fair charges ₹10 a game. You throw two dice: a double six wins ₹100, any other double wins ₹20, and anything else wins nothing. Is it a good game to play? On a single throw anything can happen, but the stall-holder is not interested in one throw — she wants to know what happens over hundreds of games. In $36$ games she can expect, on average, one double six and five other doubles, so she pays out about $100+5\times20=\text{₹}200$ while collecting ₹360. Per game, each player wins back about $\tfrac{200}{36}\approx\text{₹}5.56$ of the ₹10 paid, and the stall gains about ₹4.44. That average is the expected value of the player's winnings.

To make such reasoning precise, we attach a number to every outcome of an experiment — the winnings, the number of heads, the larger of two dice — and call it a random variable. Listing its possible values with their probabilities gives its probability distribution, and the mean and variance of Section 13.1 carry over with probabilities in place of relative frequencies. Insurance premiums, the pricing of lotteries and warranties, quality control and the design of fair games all rest on these two numbers. The most important example is the number of successes in repeated independent trials, whose distribution follows from the multiplication theorem of Section 13.2.

Random Variables and Probability Distributions

📘 Definition 13.11 — Random variable

A random variable $X$ is a rule that assigns a real number $X(\omega)$ to every outcome $\omega$ of a random experiment — a real function on the sample space. It is discrete if its possible values can be listed $x_1,x_2,\dots$ (finitely or infinitely many). "$X=x_i$" is the event $\{\omega: X(\omega)=x_i\}$.

📘 Definition 13.12 — Probability distribution

The probability distribution of a discrete random variable $X$ is the list of its values $x_i$ with the probabilities $p_i=P(X=x_i)$. The numbers must satisfy

$$p_i\ge0\ \text{for every } i\qquad\text{and}\qquad \sum_i p_i=1,$$

because the events $X=x_i$ are mutually exclusive and exhaustive. Conversely, any list of values with numbers $p_i$ satisfying both conditions is a valid probability distribution.

For three tosses of a coin, let $X$ be the number of heads. The eight equally likely outcomes give $X=0$ once ($TTT$), $X=1$ three times, $X=2$ three times and $X=3$ once, so the distribution is $P(X=0)=\tfrac18$, $P(X=1)=\tfrac38$, $P(X=2)=\tfrac38$, $P(X=3)=\tfrac18$. Probabilities of ranges of values are sums: $P(X\ge2)=\tfrac38+\tfrac18=\tfrac12$.

✏️ Example 1 — Building and checking distributions
(a) Two fair dice are thrown and $X$ is the larger of the two numbers (either one if they are equal). Find the distribution of $X$. (b) A random variable $X$ has the distribution below, where $k$ is a constant. Find $k$, $P(X\ge2)$ and $P(1\le X\lt4)$.
$x$01234
$P(X=x)$$k$$4k^2$$k$$6k^2$$k$
(a) $X\le r$ means both dice show at most $r$: $P(X\le r)=\tfrac{r^2}{36}$. So $P(X=r)=\tfrac{r^2-(r-1)^2}{36}=\tfrac{2r-1}{36}$ for $r=1,\dots,6$: $\tfrac1{36},\tfrac3{36},\tfrac5{36},\tfrac7{36},\tfrac9{36},\tfrac{11}{36}$.
Check (a) $1+3+5+7+9+11=36$, so the probabilities add to $1$ ✓.
(b) Find $k$ $\sum p_i=3k+10k^2=1$, i.e. $10k^2+3k-1=(5k-1)(2k+1)=0$. Probabilities cannot be negative, so $k=-\tfrac12$ is rejected and $k=\tfrac15$.
(b) Probabilities The distribution is $0.2, 0.16, 0.2, 0.24, 0.2$. $P(X\ge2)=0.2+0.24+0.2=0.64$; $\ P(1\le X\lt4)=0.16+0.2+0.24=0.6$.

Which of these tables (values $0, 1, 2$) is a valid probability distribution?

Mean and Variance of a Random Variable

If an experiment is repeated $N$ times and the value $x_i$ turns up $f_i$ times, the mean of the results is $\sum x_i\tfrac{f_i}{N}$ (Definition 13.1). In the long run the relative frequency $\tfrac{f_i}{N}$ settles near $p_i$, so the long-run average is $\sum x_ip_i$. That is the definition.

📘 Definition 13.13 — Mean (expectation) and variance of a random variable

For a discrete random variable with distribution $P(X=x_i)=p_i$, the mean or expected value and the variance are

$$\mu=E(X)=\sum_i x_ip_i,\qquad\qquad \sigma^2=\operatorname{Var}(X)=\sum_i(x_i-\mu)^2p_i,$$

and the standard deviation is $\sigma=\sqrt{\operatorname{Var}(X)}$. More generally $E\big(g(X)\big)=\sum g(x_i)p_i$; for example $E(X^2)=\sum x_i^2p_i$.

📐 Theorem 13.12 — Rules for the mean and variance
  1. $\operatorname{Var}(X)=E(X^2)-\mu^2$ $=\sum x_i^2p_i-\left(\sum x_ip_i\right)^2$.
  2. For constants $a$, $b$: $\ E(aX+b)=a\,E(X)+b$ and $\operatorname{Var}(aX+b)=a^2\operatorname{Var}(X)$, so $\sigma_{aX+b}=|a|\,\sigma_X$.
  3. $\operatorname{Var}(X)\ge0$, with equality only when $X$ takes a single value with probability $1$.

Proof. (1) $\sum(x_i-\mu)^2p_i$ $=\sum x_i^2p_i-2\mu\sum x_ip_i+\mu^2\sum p_i$ $=E(X^2)-2\mu^2+\mu^2$, using $\sum x_ip_i=\mu$ and $\sum p_i=1$. (2) $E(aX+b)=\sum(ax_i+b)p_i=a\mu+b$; then $(ax_i+b)-(a\mu+b)=a(x_i-\mu)$, so every squared deviation is multiplied by $a^2$. (3) A sum of non-negative terms is $0$ only if each is $0$. $\blacksquare$ These are exactly Theorems 13.1 and 13.3 of Section 13.1 with $p_i$ in place of $\tfrac{f_i}{N}$ — which is why the mean of a distribution is drawn as its balance point.

✏️ Example 2 — Computing $\mu$ and $\sigma^2$
Find the mean and variance of (a) the number of heads $X$ in three tosses of a coin; (b) the larger number $X$ when two dice are thrown (Example 1(a)); (c) the variable of Example 1(b).
(a) $\mu=\tfrac{0+3+6+3}{8}=\tfrac32$. $E(X^2)=\tfrac{0+3+12+9}{8}=3$, so $\sigma^2=3-\tfrac94=\tfrac34$.
(b) Mean $\mu=\tfrac{1\cdot1+2\cdot3+3\cdot5+4\cdot7+5\cdot9+6\cdot11}{36}=\tfrac{161}{36}\approx4.47$ — well above $3.5$, because taking the larger number favours high values.
(b) Variance $E(X^2)=\tfrac{1+12+45+112+225+396}{36}=\tfrac{791}{36}$, so $\sigma^2=\tfrac{791}{36}-\left(\tfrac{161}{36}\right)^2=\tfrac{2555}{1296}\approx1.97$.
(c) $\mu=0(0.2)+1(0.16)+2(0.2)+3(0.24)+4(0.2)=2.08$; $E(X^2)=0.16+0.8+2.16+3.2=6.32$; $\sigma^2=6.32-2.08^2=6.32-4.3264=1.9936$.
✏️ Example 3 — Is the fair-ground game fair?
For the stall in the opening paragraph, let $X$ be the player's net gain in rupees (prize minus the ₹10 fee). (a) Find the distribution, mean and standard deviation of $X$. (b) What prize for a double six would make the game fair, that is, $E(X)=0$?
Find $E(X)$ in rupees (a negative number):
Distribution Double six: $X=90$, $p=\tfrac1{36}$. Another double: $X=10$, $p=\tfrac5{36}$. Otherwise $X=-10$, $p=\tfrac{30}{36}$.
Mean $E(X)=\tfrac{90+50-300}{36}=-\tfrac{160}{36}=-\tfrac{40}{9}\approx-\text{₹}4.44$ per game.
Spread $E(X^2)=\tfrac{8100+500+3000}{36}=\tfrac{2900}{9}$, so $\sigma^2=\tfrac{2900}{9}-\tfrac{1600}{81}=\tfrac{24500}{81}$ and $\sigma\approx\text{₹}17.39$. One game is very uncertain; the average over many games is not.
(b) With prize $Q$: $E(X)=\tfrac{(Q-10)+50-300}{36}=0$ gives $Q=\text{₹}260$.
Check Theorem 13.12(2): the gross prize $W=X+10$ has $E(W)=10-\tfrac{40}{9}=\tfrac{50}{9}\approx5.56$, the ₹5.56 of the opening paragraph ✓.

For a single throw of a fair die, $\mu=3.5$. What is the variance?

Choose the preset fair die. The table gives $\sum x^2p=\tfrac{91}{6}\approx15.17$, so the lab reads $\mu=3.5$, $E(X^2)=15.17$ and $\sigma^2=15.17-12.25\approx2.92$ ($=\tfrac{35}{12}$), $\sigma\approx1.71$. $15.17$ is $E(X^2)$ before subtracting $\mu^2$, and $1.71$ is the standard deviation. Now try two-point: all the probability at the ends $1$ and $6$ makes the variance as large as it can be for values in $1$–$6$ ($6.25$).
Interactive 1 — Distribution Builder: Mean and Variance

The values are $x=0,1,\dots,6$. Drag the top of a bar to set its height in units of $k$; the lab finds $k=\tfrac1{\sum(\text{heights})}$ so that the probabilities add to $1$, and prints each $p$ above its bar. The purple pivot is $\mu=\sum xp$, the balance point, and the band is $\mu\pm\sigma$. The table below the graph builds $\sum xp$ and $\sum x^2p$ column by column. Press Play to cycle through the presets.

$k$—
$\mu=E(X)$—
$E(X^2)$—
$\sigma^2$—
$\sigma$—

$E(X)=2$ and $E(X^2)=7$. Then $\operatorname{Var}(3X-4)$ is

Repeated Independent Trials: the Binomial Distribution

Many experiments consist of the same trial repeated: a coin tossed $n$ times, $n$ items checked for defects, $n$ guesses on a multiple-choice paper. We count the "successes".

📘 Definition 13.14 — Bernoulli trials

Trials are Bernoulli trials if (i) there are finitely many of them, $n$; (ii) they are independent; (iii) each has exactly two outcomes, success and failure; and (iv) the probability of success, $p$, is the same in every trial. We write $q=1-p$ for the probability of failure.

📐 Theorem 13.13 — Number of successes in $n$ Bernoulli trials

If $X$ is the number of successes in $n$ Bernoulli trials with success probability $p$, then

$$P(X=r)={}^nC_r\,p^r\,q^{\,n-r},\qquad r=0,1,\dots,n.$$

This is the binomial distribution with parameters $n$ and $p$, written $X\sim B(n,p)$.

Proof. A particular sequence with $r$ successes and $n-r$ failures, such as $SS\!F\!S\!F\dots$, has probability $p^rq^{n-r}$ by the multiplication theorem for independent events (Theorem 13.8 and Definition 13.10). The successes can occupy any $r$ of the $n$ places, which can be chosen in ${}^nC_r$ ways (Section 4.2), and different sequences are mutually exclusive; add. $\blacksquare$ The probabilities are the terms of the binomial expansion $(q+p)^n=\sum{}^nC_rq^{n-r}p^r$ (Chapter 5), which is why they add up to $(q+p)^n=1$ — and why the distribution has this name. The NTA list names probability distributions in general; this is the one that appears whenever a JEE Main question repeats an experiment independently.

📐 Theorem 13.14 — Mean and variance of $B(n,p)$
$$\mu=np,\qquad \sigma^2=npq,\qquad \sigma=\sqrt{npq}.$$

Proof. Use $r\,{}^nC_r=n\,{}^{n-1}C_{r-1}$ (a committee of $r$ with a chair: choose the chair first). Then

$$\mu=\sum_{r=1}^{n}r\,{}^nC_rp^rq^{n-r}=np\sum_{r=1}^{n}{}^{n-1}C_{r-1}p^{r-1}q^{n-r}=np\,(q+p)^{n-1}=np.$$

Applying the same identity twice gives $E\big(X(X-1)\big)=n(n-1)p^2$, so $E(X^2)=n(n-1)p^2+np$ and $\sigma^2=E(X^2)-\mu^2=np-np^2=npq$ by Theorem 13.12. $\blacksquare$ Two consequences used in JEE Main: $\tfrac{\sigma^2}{\mu}=q$, so the variance of a binomial variable is always less than its mean; and for fixed $n$ the variance $np(1-p)$ is largest, $\tfrac n4$, at $p=\tfrac12$.

✏️ Example 4 — Sixes in five throws
A fair die is thrown $5$ times and $X$ is the number of sixes. Find (a) $P(X=2)$, (b) $P(X\ge1)$, (c) the mean and variance of $X$.
Set-up Five independent throws, success = six: $X\sim B\left(5,\tfrac16\right)$, $q=\tfrac56$.
(a) $P(X=2)={}^5C_2\left(\tfrac16\right)^2\left(\tfrac56\right)^3=10\cdot\tfrac{125}{7776}=\tfrac{625}{3888}\approx0.161$.
(b) $P(X\ge1)=1-P(X=0)=1-\left(\tfrac56\right)^5=1-\tfrac{3125}{7776}=\tfrac{4651}{7776}\approx0.598$.
(c) $\mu=np=\tfrac56$, $\ \sigma^2=npq=5\cdot\tfrac16\cdot\tfrac56=\tfrac{25}{36}$.
✏️ Example 5 — From mean and variance back to $n$ and $p$
(a) A binomial random variable has mean $4$ and variance $3$. Find $n$, $p$ and $P(X=0)$. (b) Find the least number of times a fair coin must be tossed so that the probability of getting at least two heads is at least $0.96$.
Find $n$ in (a):
(a) $q=\tfrac{npq}{np}=\tfrac34$, so $p=\tfrac14$ and $n=\tfrac{4}{1/4}=16$. Then $P(X=0)=q^{16}=\left(\tfrac34\right)^{16}\approx0.010$.
(b) Complement $P(X\ge2)=1-P(X=0)-P(X=1)=1-\tfrac{1}{2^n}-\tfrac{n}{2^n}=1-\tfrac{n+1}{2^n}$.
(b) Solve We need $\tfrac{n+1}{2^n}\le0.04$. $n=7$: $\tfrac8{128}=0.0625$ — too big; $n=8$: $\tfrac9{256}\approx0.035$ ✓. Least $n=8$.
Check In (a), the variance $3$ is less than the mean $4$, as it must be for a binomial variable; "mean $4$, variance $5$" would be impossible ($q\gt1$).

A fair coin is tossed $10$ times. The single most likely number of heads is $5$. About how likely is exactly $5$ heads?

Set $n=10$, $p=0.5$ and click the bar $r=5$. The readout shows $P(X=5)={}^{10}C_5/2^{10}=\tfrac{252}{1024}\approx0.2461$ — the tallest bar, yet three times out of four you will not get exactly five heads. $P(X\ge5)\approx0.623$. Press Play: the simulated frequencies settle onto the bars, and the simulated mean and variance approach $np=5$ and $npq=2.5$.
Interactive 2 — Binomial Lab: Theory against Simulation

The bars are $P(X=r)={}^nC_rp^rq^{n-r}$. Click a bar to select $r$. Press Play to run the experiment ($n$ trials, count the successes) again and again: the red dots are the relative frequencies so far, and the simulated mean and variance approach $np$ and $npq$. The purple pivot marks $\mu=np$ and the band is $\mu\pm\sigma$.

100.50
$\mu=np$—
$\sigma^2=npq$—
$P(X=r)$—
$P(X\ge r)$—
simulated mean, variance—
✏️ Example 6 — Hard example: drawing without replacement, and waiting for a six
(a) Two cards are drawn without replacement from a pack of $52$, and $X$ is the number of kings. Find the distribution, mean and variance of $X$. (b) A fair die is thrown until a six appears, and $X$ is the number of throws needed. Find $P(X=k)$, check that the probabilities add to $1$, and find $E(X)$.
Find $\operatorname{Var}(X)$ in (a) to 3 decimal places:
(a) Distribution ${}^{52}C_2=1326$. $P(X=0)=\tfrac{1128}{1326}=\tfrac{188}{221}$, $\ P(X=1)=\tfrac{4\cdot48}{1326}=\tfrac{32}{221}$, $\ P(X=2)=\tfrac{6}{1326}=\tfrac1{221}$. (Not binomial: without replacement the draws are not independent.)
(a) Mean, variance $\mu=\tfrac{32+2}{221}=\tfrac{2}{13}$; $E(X^2)=\tfrac{32+4}{221}=\tfrac{36}{221}$; $\sigma^2=\tfrac{36}{221}-\tfrac{4}{169}=\tfrac{400}{2873}\approx0.139$.
(b) Distribution $X=k$ means $k-1$ non-sixes and then a six: $P(X=k)=\left(\tfrac56\right)^{k-1}\tfrac16$, $k=1,2,3,\dots$ — infinitely many values. $\sum_{k\ge1}\tfrac16\left(\tfrac56\right)^{k-1}=\tfrac{1/6}{1-5/6}=1$ ✓.
(b) Mean $E(X)=\tfrac16S$ with $S=1+2q+3q^2+\dots$, $q=\tfrac56$. Then $S-qS=1+q+q^2+\dots=\tfrac1{1-q}$, so $S=\tfrac1{(1-q)^2}=36$ and $E(X)=6$.
Check (a) The mean $\tfrac2{13}=2\cdot\tfrac4{52}$ is the same as with replacement — each draw is a king with probability $\tfrac1{13}$. (b) "On average you wait $\tfrac1p$ trials for a success" — $6$ throws for a six.
⚠️ JEE Main traps

1. Both conditions on a distribution. When a table contains $k$ and $k^2$, solve $\sum p_i=1$ and then reject any root that makes some $p_i$ negative or greater than $1$.

2. $\operatorname{Var}(X)=E(X^2)-\mu^2$. Not $E(X^2)-\mu$, and not $\left(E(X)\right)^2$. Compute $E(X^2)=\sum x_i^2p_i$ as its own column.

3. Linear changes. $E(aX+b)=aE(X)+b$, but $\operatorname{Var}(aX+b)=a^2\operatorname{Var}(X)$: the $b$ disappears and $a$ is squared.

4. Is it really binomial? Only for independent trials with the same $p$ — draws with replacement, repeated throws, independent items. Draws without replacement are not binomial (Example 6(a)); work from the table instead.

5. Recovering $n$ and $p$. $q=\tfrac{\sigma^2}{\mu}$ must lie strictly between $0$ and $1$, and $n=\tfrac{\mu}{p}$ must be a positive integer; if not, no binomial variable has those values.

$X\sim B(n,p)$ has mean $6$ and variance $4$. Then $n$ is

Exercises

Coins and dice are fair unless stated otherwise. Give probabilities as fractions or as decimals to $4$ places.

I
Random variables and their distributions.
  • 1 Two coins are tossed and $X$ is the number of tails. Write the distribution of $X$.
  • 2 A die is thrown twice and $X$ is the number of sixes. Write the distribution of $X$.
  • 3 $P(X=x)=kx$ for $x=1,2,3,4$. Find $k$ and $P(X\ge3)$.
  • 4 $P(X=x)=\tfrac kx$ for $x=1,2,3,6$. Find $k$ and $P(X\le2)$.
  • 5 Is the table "$x$: $0,1,2$; $p$: $0.6, -0.1, 0.5$" a probability distribution? Give a reason.
  • 6 Two balls are drawn without replacement from a bag with $4$ red and $2$ white balls; $X$ is the number of white balls drawn. Find the distribution of $X$.
  • 7 Two dice are thrown and $X$ is the smaller of the two numbers. Show that $P(X=r)=\tfrac{13-2r}{36}$ and find $P(X=1)$.
  • 8 $P(X=k)=c\left(\tfrac13\right)^k$ for $k=1,2,3,\dots$. Find $c$.
1 $P(0)=\tfrac14$, $P(1)=\tfrac12$, $P(2)=\tfrac14$.
2 $P(0)=\left(\tfrac56\right)^2=\tfrac{25}{36}$, $P(1)=2\cdot\tfrac16\cdot\tfrac56=\tfrac{10}{36}$, $P(2)=\tfrac1{36}$.
3 $k(1+2+3+4)=1$: $k=\tfrac1{10}$. $P(X\ge3)=\tfrac{3+4}{10}=0.7$.
4 $k\left(1+\tfrac12+\tfrac13+\tfrac16\right)=2k=1$: $k=\tfrac12$. $P(X\le2)=\tfrac12+\tfrac14=\tfrac34$.
5 No: although the numbers add to $1$, $P(X=1)=-0.1\lt0$.
6 ${}^6C_2=15$: $P(0)=\tfrac{{}^4C_2}{15}=\tfrac25$, $P(1)=\tfrac{4\cdot2}{15}=\tfrac8{15}$, $P(2)=\tfrac1{15}$.
7 $X\ge r$ means both dice show at least $r$: $P(X\ge r)=\tfrac{(7-r)^2}{36}$. Then $P(X=r)=\tfrac{(7-r)^2-(6-r)^2}{36}=\tfrac{13-2r}{36}$; $P(X=1)=\tfrac{11}{36}\approx0.3056$.
8 $\sum_{k\ge1}\left(\tfrac13\right)^k=\tfrac{1/3}{1-1/3}=\tfrac12$, so $\tfrac c2=1$ and $c=2$.
II
Mean, variance and expected value.
  • 1 Find the mean and variance of the number shown by a fair die.
  • 2 Find the mean and variance of $X$ in Exercise I.6.
  • 3 $E(X)=2$ and $\operatorname{Var}(X)=3$. Find $E(3X-1)$, $\operatorname{Var}(3X-1)$ and $E(X^2)$.
  • 4 $X$ takes the values $-1, 0, 2$ with probabilities $0.3, 0.5, 0.2$. Find its mean and variance.
  • 5 Find the mean and variance of $X$ in Exercise I.3.
  • 6 A card is drawn. An ace wins ₹50, a face card wins ₹20, and any other card loses ₹5. Find the expected gain.
  • 7 $X$ takes the values $1, 2, 3$, has mean $2.3$, and $P(X=1)=0.2$. Find $P(X=2)$, $P(X=3)$ and $\operatorname{Var}(X)$.
  • 8 Modelling. An insurer charges ₹2000 a year for a policy. With probability $0.02$ it pays a claim of ₹50 000, with probability $0.05$ a claim of ₹10 000, and otherwise nothing. Find the insurer's expected profit per policy.
1 $\mu=\tfrac{21}{6}=3.5$; $E(X^2)=\tfrac{91}6$; $\sigma^2=\tfrac{91}6-\tfrac{49}4=\tfrac{35}{12}\approx2.9167$.
2 $\mu=\tfrac{8+2}{15}=\tfrac23$; $E(X^2)=\tfrac{8+4}{15}=\tfrac45$; $\sigma^2=\tfrac45-\tfrac49=\tfrac{16}{45}\approx0.3556$.
3 $E(3X-1)=5$; $\operatorname{Var}(3X-1)=9\cdot3=27$; $E(X^2)=\operatorname{Var}(X)+\mu^2=3+4=7$.
4 $\mu=-0.3+0+0.4=0.1$; $E(X^2)=0.3+0.8=1.1$; $\sigma^2=1.1-0.01=1.09$.
5 $\mu=\sum x\cdot\tfrac x{10}=\tfrac{1+4+9+16}{10}=3$; $E(X^2)=\tfrac{1+8+27+64}{10}=10$; $\sigma^2=10-9=1$.
6 $\tfrac{50\cdot4+20\cdot12-5\cdot36}{52}=\tfrac{260}{52}=\text{₹}5$.
7 $p_2+p_3=0.8$ and $0.2+2p_2+3p_3=2.3$, so $2p_2+3p_3=2.1$ and $p_3=2.1-1.6=0.5$, $p_2=0.3$. $E(X^2)=0.2+1.2+4.5=5.9$; $\sigma^2=5.9-5.29=0.61$.
8 Expected payout $=50000(0.02)+10000(0.05)=1000+500=\text{₹}1500$; expected profit $=2000-1500=\text{₹}500$ per policy.
III
Repeated independent trials.
  • 1 A coin is tossed $6$ times. Find the probability of exactly $4$ heads.
  • 2 In part 1, find the probability of at least $5$ heads.
  • 3 A die is thrown $4$ times. Find the probability of at least one six.
  • 4 $10\%$ of the bulbs from a factory are defective. Five are chosen at random (independently). Find the probability that none is defective, and that at most one is.
  • 5 A die is thrown $30$ times. Find the mean and variance of the number of sixes.
  • 6 A binomial variable has mean $6$ and variance $4$. Find $n$ and $p$.
  • 7 Can a binomial variable have mean $5$ and variance $6$? Explain.
  • 8 A student guesses all $5$ questions of a test, each with $4$ options. Find the probability of at least $4$ correct answers.
  • 9 Find the least $n$ for which the probability of at least one six in $n$ throws of a die exceeds $0.9$.
1 ${}^6C_4\left(\tfrac12\right)^6=\tfrac{15}{64}\approx0.2344$.
2 $\tfrac{{}^6C_5+{}^6C_6}{64}=\tfrac7{64}$.
3 $1-\left(\tfrac56\right)^4=1-\tfrac{625}{1296}=\tfrac{671}{1296}\approx0.5177$.
4 $X\sim B(5,0.1)$: $P(0)=0.9^5=0.59049$; $P(X\le1)=0.59049+5(0.1)(0.9)^4=0.59049+0.32805=0.91854$.
5 $np=30\cdot\tfrac16=5$; $npq=5\cdot\tfrac56=\tfrac{25}6\approx4.1667$.
6 $q=\tfrac46=\tfrac23$, $p=\tfrac13$, $n=\tfrac{6}{1/3}=18$.
7 No: $q=\tfrac{\sigma^2}{\mu}=\tfrac65\gt1$. A binomial variance is always less than its mean.
8 $X\sim B\left(5,\tfrac14\right)$: $5\left(\tfrac14\right)^4\tfrac34+\left(\tfrac14\right)^5=\tfrac{15+1}{1024}=\tfrac1{64}$.
9 $\left(\tfrac56\right)^n\lt0.1\iff n\gt\tfrac{\ln10}{\ln1.2}\approx12.6$: $n=13$.
IV
Harder problems.
  • 1 $P(X=k)=\left(\tfrac12\right)^k$ for $k=1,2,3,\dots$. Find $E(X)$.
  • 2 A bag has $3$ red and $2$ black balls. Balls are drawn one at a time without replacement until a red ball appears; $X$ is the number of draws. Find the distribution, mean and variance of $X$.
  • 3 A coin is tossed $4$ times; $X$ is the number of heads and $Y=2X-3$. Find $E(Y)$ and $\operatorname{Var}(Y)$.
  • 4 For $X\sim B(20,p)$, find the largest possible variance and the value of $p$ that gives it.
  • 5 $X$ takes the values $0,1,2,3$ with $P(X=0)=P(X=3)=a$ and $P(X=1)=P(X=2)=b$. If $\operatorname{Var}(X)=1.05$, find $a$ and $b$.
1 This is "wait for the first head": $E(X)=\tfrac1p=2$ (Example 6(b)). Directly: $\sum k\left(\tfrac12\right)^k=\tfrac12\cdot\tfrac1{(1-1/2)^2}=2$.
2 $P(1)=\tfrac35$, $P(2)=\tfrac25\cdot\tfrac34=\tfrac3{10}$, $P(3)=\tfrac25\cdot\tfrac14\cdot1=\tfrac1{10}$. $\mu=0.6+0.6+0.3=1.5$; $E(X^2)=0.6+1.2+0.9=2.7$; $\sigma^2=2.7-2.25=0.45$.
3 $X\sim B\left(4,\tfrac12\right)$: $E(X)=2$, $\operatorname{Var}(X)=1$. $E(Y)=2\cdot2-3=1$, $\operatorname{Var}(Y)=4\cdot1=4$.
4 $\operatorname{Var}=20p(1-p)\le20\cdot\tfrac14=5$, with equality at $p=\tfrac12$ (A.M.–G.M., Section 6.2).
5 $2a+2b=1$; by symmetry $\mu=1.5$. $E(X^2)=b+4b+9a=5b+9a$, so $5b+9a-2.25=1.05$, i.e. $5b+9a=3.3$. With $b=0.5-a$: $2.5+4a=3.3$, $a=0.2$, $b=0.3$.
🎯 Exam corner JEE Main · MCQJEE Main · Numerical

E1. JEE Main · MCQ A random variable $X$ takes the values $1,2,3,4$ with $P(X=x)=kx^2$. Then $E(X)$ equals (A) $\tfrac{10}{3}$ (B) $3$ (C) $\tfrac52$ (D) $\tfrac72$

Find $k$ $k(1+4+9+16)=30k=1$: $k=\tfrac1{30}$.
Mean $E(X)=\sum x\cdot\tfrac{x^2}{30}=\tfrac{1+8+27+64}{30}=\tfrac{100}{30}$.
Answer (A) $\tfrac{10}3$.
⏱ Shortcut $E(X)=\tfrac{\sum x^3}{\sum x^2}=\tfrac{100}{30}$. (C) is the plain average of $1,\dots,4$, which ignores the weights.

E2. JEE Main · Numerical Two different numbers are chosen at random from $\{1,2,3,4,5\}$ and $X$ is the larger of them. Find $\operatorname{Var}(3X+2)$. Give the answer to the nearest integer.

Distribution ${}^5C_2=10$ pairs; the larger is $r$ for the $r-1$ pairs $\{j,r\}$, $j\lt r$: $P(X=r)=\tfrac{r-1}{10}$, $r=2,3,4,5$.
Moments $E(X)=\tfrac{2+6+12+20}{10}=4$; $E(X^2)=\tfrac{4+18+48+100}{10}=17$; $\operatorname{Var}(X)=17-16=1$.
Answer $\operatorname{Var}(3X+2)=9\cdot1=9$.

E3. JEE Main · MCQ The mean and variance of a binomial random variable $X$ are $4$ and $\tfrac83$. Then $P(X=1)$ is (A) $\dfrac{2^{11}}{3^{12}}$ (B) $\dfrac{2^{13}}{3^{11}}$ (C) $\dfrac{2^{12}}{3^{11}}$ (D) $\dfrac{2^{11}}{3^{11}}$

$n$ and $p$ $q=\tfrac{8/3}{4}=\tfrac23$, $p=\tfrac13$, $n=\tfrac{4}{1/3}=12$.
Probability $P(X=1)=12\cdot\tfrac13\cdot\left(\tfrac23\right)^{11}=4\cdot\tfrac{2^{11}}{3^{11}}=\tfrac{2^{13}}{3^{11}}$.
Answer (B).

E4. JEE Main · Numerical To play a game a player pays ₹$a$ and tosses two fair coins. Two heads win ₹60, exactly one head wins ₹10, and no head wins nothing. Find $a$ if the game is fair (the player's expected net gain is zero). Give the answer to the nearest integer.

Expected prize $60\cdot\tfrac14+10\cdot\tfrac12+0\cdot\tfrac14=15+5=\text{₹}20$.
Fair Net gain $=$ prize $-\,a$, so $E=20-a=0$.
Answer $a=20$.

E5. JEE Main · MCQ For a random variable $X$, $E(X)=3$ and $E(X^2)=13$. Then $\operatorname{Var}(2X-5)$ is (A) $21$ (B) $26$ (C) $52$ (D) $16$

Variance $\operatorname{Var}(X)=13-9=4$.
Transform $\operatorname{Var}(2X-5)=2^2\cdot4$.
Answer (D) $16$.
⏱ Shortcut (A) is $4\cdot4+5$ (keeping the shift), (C) is $4\cdot13$ (forgetting $\mu^2$), (B) is $2\cdot13$.

E6. JEE Main · Numerical A fair coin is tossed until a head appears or until it has been tossed $4$ times, whichever comes first. If $X$ is the number of tosses, find $8\,E(X)$. Give the answer to the nearest integer.

Distribution $P(X=1)=\tfrac12$, $P(X=2)=\tfrac14$, $P(X=3)=\tfrac18$, and $X=4$ whenever the first three tosses are tails: $P(X=4)=\tfrac18$.
Mean $E(X)=\tfrac12+\tfrac24+\tfrac38+\tfrac48=\tfrac{15}8$.
Answer $8E(X)=15$.
Check $\tfrac12+\tfrac14+\tfrac18+\tfrac18=1$ ✓. A common slip is $P(X=4)=\tfrac1{16}$ — but the fourth toss ends the game whether it is a head or a tail.
🔬 Research–Teaching NexusResearch-tutored · optional, about 45 minutes

Research question. How should an airline decide how many tickets to sell for a flight, given that some passengers with tickets do not turn up?

Why it matters. Airlines, railways, hotels and hospital clinics all "overbook": they accept more bookings than they have places because a predictable fraction of customers do not show up. Too little overbooking leaves seats empty; too much means turning away passengers who must then be compensated. The number of passengers who turn up is, to a good approximation, a binomial random variable, and the decision is an expected-value calculation.

What to do.

  1. Model a $100$-seat aircraft. Assume each ticket-holder turns up independently with probability $p=0.92$. If $n$ tickets are sold, the number who turn up is $X\sim B(n,0.92)$.
  2. For $n=100,102,104,106,108$ compute $E(X)$, $\sigma$ and $P(X\gt100)$ (use a spreadsheet's binomial function, or sum the terms of Theorem 13.13).
  3. Suppose each ticket earns ₹6000 and each passenger turned away costs ₹20 000 in compensation. Write the expected profit as a function of $n$ and find the best $n$.
  4. Repeat with $p=0.85$ and $p=0.97$. How sensitive is the best $n$ to the show-up probability?

Tools: A spreadsheet or a short Python script; Interactive 2 for intuition about how the distribution's spread grows with $n$.

Hand in: A table of $n$, $P(X\gt100)$ and expected profit, your recommended $n$, and two sentences on whether the independence assumption is realistic (families and groups travel together).

Going further. If groups of $4$ always show up or fail to show up together, the variance of the number who turn up increases. Explain why, and how that should change the airline's decision.

Instructor note: with $p=0.92$, $E(X)=0.92n$ and $\sigma=\sqrt{0.0736\,n}\approx2.7$ for $n$ near $100$; $P(X\gt100)$ is about $1\%$ at $n=103$, $3\%$ at $n=104$ and $14\%$ at $n=106$. Counting ₹6000 for every ticket sold (no refunds) and ₹20 000 for every passenger turned away, the expected profit is greatest at $n=107$; with $p=0.85$ the best $n$ rises to about $116$, and with $p=0.97$ it falls to $102$. Correlated show-ups (groups) raise the variance and push the optimum down — a natural bridge to why independence matters in Theorem 13.13.

🧪 Self-check quiz

0/5 correct

Q1. $P(X=x)=k(x+1)$ for $x=0,1,2,3$ defines a probability distribution when $k$ equals

Q2. The expected value of the number shown by a fair die is

Q3. $E(X)=2$ and $E(X^2)=5$. The standard deviation of $X$ is

Q4. A coin with $P(\text{head})=0.3$ is tossed $10$ times. The mean and variance of the number of heads are

Q5. $X$ takes the values $0,1,2$ with $P(X=0)=P(X=2)=p$ and $P(X=1)=1-2p$, where $0\lt p\lt\tfrac12$. Then $E(X)$ is