Probability · Solutions
Random Variables and Discrete Distributions
Work this sheet on paper, showing every step — the method is what is being tested, and the solutions are written so you can check your route rather than just your answer. Name every result you use (“by linearity of expectation”, “by memorylessness”, “by the BINS checklist”) and say whether it needs independence. No calculator is needed anywhere: leave answers as exact fractions, binomial coefficients and powers of . Full worked solutions are on a separate page; each question also has its own reveal, so you can check one answer without seeing the rest.
- 1.Computation
A random variable has probability mass function
and for every other .
- (a)Find the value of , stating both conditions a pmf must satisfy and showing which one determines .
- (b)Show that for every integer , and hence write down the cumulative distribution function at each integer .
- (c)Compute , , , and . Explain in one sentence why the last two differ, and why .
Solution
(a) The two conditions. A pmf must be non-negative and must sum to over its support. Non-negativity only forces ; the total mass fixes . Split the summand by partial fractions:
The partial sums telescope: . So , and this equals exactly when .
(b) The tail telescopes too. For ,
Taking recovers the total mass , a check on (a). By the complement rule, at each integer ,
(c) Reading probabilities off the tail. .
. Check by adding the three terms directly: ✓.
, because takes no value in , so the running total does not move between and — the cdf is flat between support points.
, whereas . They differ by exactly : for a discrete variable the point itself carries mass, so a strict and a non-strict inequality are different events.
- 2.Sketch
Two fair four-sided dice, with faces , are rolled independently. Let be the larger of the two numbers shown (if they tie, is the common value).
- (a)Explain why for , naming the property of the dice you use. Then obtain the pmf of from the cdf, and check that it sums to .
- (b)Sketch for . Mark the height of every flat piece, and draw each jump with a filled dot and an open dot placed so that the graph shows which value actually takes at the jump.
- (c)Read , and off your sketch, saying for each which heights you are subtracting. Confirm the last one from the pmf.
Solution
(a) Go through the cdf, not the pmf. The event says the larger die is at most , which happens exactly when both dice are at most . Each die shows a value in with probability , and the dice are independent, so the two conditions multiply:
The pmf is the size of each jump of the cdf: , with . Hence
which gives , , , . These sum to ✓. (The counting check: of the equally likely ordered pairs, exactly have maximum — the pair plus the pairs and the pairs with .)
(b) The staircase. The graph is a staircase with four steps and five flat pieces.
For the height is : no value of is below . On the height is ; on it is ; on it is ; and for it is , since can never exceed .
At each of the graph jumps upward by respectively — the jump sizes are the pmf, and they grow because larger maxima are more common. At each jump put the filled dot at the top of the step, on the right-hand piece, and the open dot at the bottom on the left-hand piece: includes the value itself, so at the function already equals , not . That is right-continuity, and the dots are how a sketch records it.
Draw the flat pieces as horizontal segments, the jumps as gaps (not vertical lines), and label the five heights on the -axis.
(c) Reading the sketch. , the height of the piece on , which is . It is not the height at , because the strict inequality excludes the jump at .
: the total height minus the height just to the left of .
. Neither nor is a support point, so read the flat pieces they sit on: and , giving . From the pmf, the only support points in are and , and ✓.
- 3.Computation
Let be the number shown by a single fair six-sided die. Work with exact fractions throughout.
- (a)Compute , and , stating which formula you use for the variance.
- (b)Compute in two ways: directly from the pmf using the law of the unconscious statistician, and by expanding the square and using linearity together with your answers to (a). Compare the result with and comment on the difference.
- (c)Now let and be two independent fair dice. Compare (one die, doubled) with (two dice, added). Find the mean and variance of each, name the theorem each step uses, and say which of those theorems needed independence.
Solution
(a) Mean and variance from the definition. Each value has probability , so
By the computational formula ,
(b) Two routes to the same number. Directly, by the law of the unconscious statistician with , weight each by : the values of for are , so
By expansion, , and linearity of expectation gives
The two agree ✓. Note that exceeds by exactly . That is no accident: the mean squared distance from any point is the variance plus the squared offset of from the mean, so the variance is the smallest mean squared distance, attained only at .
(c) Doubling one die is not rolling two. Means first. By linearity, and . Linearity needs no independence, so the second computation would be valid even if the dice were glued together.
Variances. For use the scale rule , which holds unconditionally:
For use the theorem that variances of independent variables add — and here the independence of the two dice is exactly what licenses it:
So and share a mean but . The reason is visible without any formula: can only be even and is or a sixth of the time each, whereas piles up near because the two dice can offset each other. A second independent source of randomness spreads a total out less than repeating one source twice does. The only step that used independence was the variance of ; every other step was linearity or the scale rule.
- 4.Proof
Let be a discrete random variable with , mean and variance .
- (a)Prove that for every real constant ,
Name each theorem you invoke, and point out where the hypothesis is used. - (b)Deduce that is the unique value of minimising , and deduce also that .
- (c)Verify the identity in (a) numerically for the number of heads in two independent fair coin flips and , computing both sides separately.
Solution
(a) Add and subtract the mean. Write and expand the square:
The hypothesis guarantees that and both exist, so every expectation below is a finite number and linearity may be applied. Taking expectations term by term — this is linearity of expectation, with and treated as the constants they are —
The first term is by the definition of variance. For the middle term, linearity again gives , so the cross term vanishes. What remains is .
(b) Two consequences. The right-hand side is plus a square. A square is and equals only when , so for every , with equality if and only if . That is the uniqueness of the minimiser: the mean is the point about which the mean squared deviation is smallest.
For the inequality, take : , since as the expectation of a non-negative quantity. (Rearranged, this is the computational formula , which the identity therefore contains as the special case .)
(c) A numerical check. Two fair flips give , , , so and , hence .
Right-hand side with : .
Left-hand side, by the law of the unconscious statistician: takes the values with probabilities , so ✓.
- (a)Prove that for every real constant ,
- 5.Computation
A spinner lands in the shaded sector with probability on each spin, independently. It is spun four times and is the number of shaded results, so .
- (a)Write out the complete pmf of as exact fractions over a common denominator, and check that the five values sum to .
- (b)Find and . Write the complement you use out in full before substituting numbers.
- (c)State and from the binomial formulas, and then verify by summing directly from your table in (a).
- (d)Show that for any the consecutive probabilities satisfy
and use this ratio, not the table, to find the most likely value of when , .
Solution
(a) The pmf. With , , and denominator :
Sum: , so the total is ✓ (this is the binomial theorem for written out).
(b) Get the boundary right. “At least ” excludes exactly the values and :
And , the complement, as it must be. Cross-check from the table: ✓.
(c) Moments. and . Directly,
(If you also check the variance: , and ✓.)
(d) The ratio of neighbours. From the pmf,
using . The pmf rises while this ratio exceeds and falls once it drops below , so the mode is the first at which the ratio falls below — unless the ratio equals exactly, in which case two neighbouring values tie.
With and , the ratio is : for it is , so ; for it is , so , and the ratio only shrinks after that. The most likely value is therefore . The table agrees — is the largest entry — and the mode sits just below the mean , as it should for a right-skewed binomial with .
- 6.Critique
A test has multiple-choice questions, each with options and each worth marks. A student who has not studied guesses uniformly at random on every question, independently. Let be the number of correct guesses and the mark. Asked for and the standard deviation of , the student submits the following.
Step 1. Each question is a Bernoulli trial with , so and .
Step 2. Each single question has standard deviation . The questions are independent, so the standard deviations add: .
Step 3. “At least ” is the complement of “at most ”, so
Step 4. Since , .
One of the four steps is entirely correct.
- (a)Identify every flaw. For each one, name the rule that is being misapplied and state what the rule actually says.
- (b)Give the correct and , and a one-line sanity check that exposes the student's values as impossible.
- (c)Give the correct value of as a single exact expression, simplified as far as times a rational number.
Solution
(a) Three flaws; Step 1 is sound. Step 1 checks BINS correctly — binary outcomes, independent questions, fixed in advance, constant — and by linearity of expectation.
Step 2 adds standard deviations. The rule is that for independent variables the variances add, ; standard deviations never do, because . Independence is genuinely available here, but it licenses adding copies of , not copies of .
Step 3 misplaces the boundary. For an integer-valued variable the complement of is , not . The written sum subtracts from both sides of the fence, so the student's expression equals . The correct form is .
Step 4 squares the wrong quantity. The scale rule is , and therefore . The square belongs to the variance; taking the square root undoes it. Multiplying a standard deviation by inflates it by a spurious factor of .
(b) The correct spreads. , so
Sanity check: lives on with mean . The student's would put one standard deviation below the mean at a negative number of correct answers; and is a standard deviation larger than the maximum possible mark of . A spread cannot exceed the range of the variable. The true values, roughly answers and marks, are of the right size.
(c) The correct probability. With the boundary fixed,
The three terms are , and . Pull out the common factor :
Therefore
For scale, is a little over , so is roughly — with correct expected, scoring at least should indeed be very likely, which the student's misplaced boundary would have understated.
- 7.Computation
Orders arrive at a small bakery's website at an average rate of per hour, and the Poisson assumptions (constant rate, independence across disjoint windows, no simultaneous orders) are taken to hold. Leave every answer in terms of powers of .
- (a)Find the probability of exactly orders in a given hour, and the probability of at least orders in that hour.
- (b)Find the probability of no orders at all in a -minute window. Then confirm your answer a second way, by splitting the window into an hour and a half-hour and using the rule for sums of independent Poisson variables.
- (c)For the hourly count, compute the ratio and use it to find every most likely value of .
- (d)Which is more likely: exactly orders in one hour, or exactly orders in two hours? Decide without a calculator, giving an inequality on that settles it, and explain in a sentence why the answer makes sense.
Solution
(a) One hour, . With ,
“At least ” has infinitely many terms, so use the complement, which excludes exactly the values and :
(b) Rescale to the window first. Ninety minutes is hours, so the count in that window is Poisson with parameter , and
Second way: the window is an hour followed by a disjoint half-hour, whose counts are independent Poisson variables with parameters and . The whole window is empty exactly when both pieces are empty, so the probability is ✓. (This is the sum rule in action: the total count is Poisson, whose zero-term is .)
(c) The ratio of neighbours. For a Poisson variable,
With this is : it equals at , exactly at , and at , shrinking thereafter. So , and there are two most likely values, and , each with probability . (Whenever is a positive integer, and tie.)
(d) Two hours, . The two-hour count is Poisson, so
Compare with by dividing:
This exceeds exactly when . Since , , so the ratio is greater than and exactly orders in one hour is the more likely event.
Why this is reasonable: both events ask for the count to land exactly on its mean, but the two-hour count has variance rather than , so its mass is spread over more values and each individual value — including the mean — gets less of it. Note also that “ in two hours” is not the same as “ in each hour”: the latter has probability , only one of the five ways () of reaching a total of .
- 8.Computation
Items coming off a production line are defective independently with probability . An inspector tests them one at a time, and is the position of the first defective item found, so is geometric with on .
- (a)Compute , and as exact fractions, and explain the tail probability by an argument about the first four items rather than by summing a series.
- (b)State , and .
- (c)The first six items have all passed. Find the probability that the first defective is item or later, first by quoting memorylessness and then by computing the conditional probability directly from the tail formula.
- (d)Find the median of : the smallest integer with . Compare it with the mean and explain the direction of the difference.
Solution
(a) Read the pmf off the experiment. For the first defective to be the fourth item, items – must pass and item must fail:
The event says simply that the first four items all passed, which by independence has probability — no summation needed. Then .
(b) Moments. , , and , roughly — nearly as large as the mean, as geometric waiting times usually are.
(c) Memorylessness, then the check. By memorylessness, . Here and “item or later” is , so
Directly: , so the intersection is and
Six passes in a row have taught the inspector nothing about item : it fails with probability , exactly as item did.
(d) The median. exactly when . Now , while . So the smallest such is : the median is , with just under a half and just over.
The median is below the mean . The geometric pmf is right-skewed — it is largest at and decays geometrically — so a minority of very long waits drags the mean above the point that splits the probability in half. Half of all inspections find a defective within items, but the average wait is .
- 9.Proof
Let . You may quote and , and the exponential series for every real .
- (a)Prove that . Deduce that an even count is always strictly more likely than an odd one, and describe what happens as .
- (b)Prove that , and deduce that .
- (c)Let be independent of . Prove that, conditional on , the variable is binomial:
Solution
(a) Alternate the signs. Consider the difference between the even and the odd mass:
by the exponential series at . We also know , since the pmf sums to . Adding the two equations and halving,
Since for every , this exceeds strictly, so even counts always win — the edge comes entirely from the term, which is even and has no odd partner of comparable size. As , and the probability tends to : for a large rate, parity is a coin flip.
(b) Cancel three factors of the factorial. The terms vanish because there. For , , so
after substituting . (The law of the unconscious statistician is what lets us write the expectation as this sum.)
For the cube, expand the falling factorials: and . Hence
which you can confirm by expanding the right side: ✓. Taking expectations by linearity,
Check at : , which is the right size — it must exceed because on the support.
(c) Condition on the total. By the definition of conditional probability, and because ,
the factorisation in the numerator being independence. The denominator is known: independent Poissons add, so . Substituting all three pmfs,
The exponentials cancel exactly, the factorials assemble into , and splitting gives
which is the pmf.
The interpretation: once you know events occurred in total, each one was independently an “-type” event with probability proportional to its rate. Note that and can be any positive numbers, but the binomial parameter is a genuine probability in , exactly as it must be.
- 10.Computation
Two unrelated situations, one waiting time and one draw from a finite pool.
Situation A. A basketball player makes each free throw independently with probability . Let be the number of the shot on which she records her second make.
Situation B. A committee of is chosen uniformly at random from a group of women and men. Let be the number of women on the committee.
- (a)Name the distribution of and its parameters. Compute , and as fractions with denominator , and hence . Then verify independently by an argument about the first four shots alone.
- (b)Find and , and explain why is a sum of two independent geometric variables — say what each one counts and which theorem makes their variances add.
- (c)Name the distribution of and its parameters. Compute , and exactly.
- (d)A student models as instead. Compute that model's and variance, decide whether the approximation is acceptable by the usual rule of thumb, and explain in terms of the finite population correction why the true variance is the smaller of the two.
Solution
(a) Negative binomial, , . For the second make to land on shot , shot must be a make and exactly one of the first shots must be a make:
So , , .
Adding, , hence .
Independent check: says the second make has not arrived by shot , i.e. the first four shots contain at most one make. The number of makes in four shots is , so
(b) Two geometric stages. Let be the number of shots up to and including the first make, and the number of further shots from there up to and including the second make. Then exactly. Each is geometric: after the first make the sequence of independent shots simply restarts, which is memorylessness. The two stages depend on disjoint blocks of shots, so they are independent.
Linearity gives . Because the stages are independent, the variance-of-a-sum theorem applies and
Sanity check against (a): the mean sits between the two most likely values and , and says the distribution is tight, consistent with a standard deviation of about .
(c) Hypergeometric, , , . The committee is a sample without replacement from a finite pool, so
With : , and
(d) The binomial is the wrong model here. Under ,
Compare (about ) with the true (about ): the binomial is off by nearly on a single probability. The rule of thumb allows the binomial when the sample is at most of the population; here , far outside it, so the approximation is not acceptable. The mean, , is the same under both models — linearity does not care about dependence — but the binomial variance overstates the true by the factor .
The reason is the finite population correction . Each woman chosen leaves fewer women in the pool, so the draws push the count back toward its mean: the dependence is negative, and it shrinks the spread. Sampling with replacement would waste draws on people already chosen and could not exert this pull, which is why it has the larger variance.
- 11.Proof
Throughout, “geometric with parameter ” means the distribution on with , and you may quote its tail .
- (a)Let and be independent, geometric with parameters and respectively, and let . Prove that is geometric with parameter . Give a one-sentence interpretation of in terms of the two trial sequences run side by side.
- (b)Prove that , and deduce that this is strictly greater than for every .
- (c)Two players, A and B, take turns flipping a coin that shows heads with probability ; A flips first, and the first player to flip heads wins. Let . Without using (b), set up an equation for by conditioning on A's first flip and invoking memorylessness, solve it, and confirm it agrees with (b).
Solution
(a) Work with tails, which multiply. The minimum exceeds exactly when both variables do, and by independence
where . Since forces , and likewise for , the product lies in , so is a legitimate parameter.
A distribution on is determined by its tail, because the pmf is the sequence of tail differences. For ,
which is exactly the geometric pmf.
Interpretation: run both sequences of trials in parallel and call round a “success” if either sequence succeeds on its th trial. Rounds are independent and each succeeds with probability — one minus the chance that both fail — so , the first successful round, is the waiting time for a Bernoulli process. (For , and .)
(b) Sum over the odd support. The odd values are for , so
a geometric series with ratio , convergent because . The denominator is , and cancelling the (legitimate since ) gives
For we have , so . The first trial is odd-numbered and carries the single largest lump of probability, ; every later odd trial is paired with the even trial before it, which is likelier, but the unpaired first trial tips the balance. At the probability is (the first trial always succeeds), and as it falls toward .
(c) Condition on the first flip. Either A's first flip is heads, with probability , and A wins at once; or it is tails, with probability , and the game continues with B flipping first. Because the coin has no memory, that continuation is a fresh copy of the original game with the roles swapped, so B now wins it with probability and A with probability . Hence
Solve: , so , i.e. and
This agrees with (b), as it must: A wins exactly when the first head appears on an odd-numbered flip, and the number of the first head is geometric. For a fair coin A wins with probability — moving first is worth a full extra third.
- 12.Computation
A clinic recruits for a study. Each person screened qualifies independently with probability . For every part below, first name the distribution and its parameters and quote the tell in the wording that identifies it, then do the calculation. Leave every answer exact.
- (a)Thirty people are screened on Monday and is the number who qualify. Find and . Write down the exact and the Poisson approximation to it, and prove which of the two numbers is larger by using the inequality for (justify that inequality in one line).
- (b)Screening continues one person at a time until people have qualified, and is the number of people screened. Find , and , and write as an exact expression.
- (c)Separately, the clinic has a list of past volunteers, of whom exactly have condition Z. Four names are drawn at random without replacement and is the number drawn who have the condition. Find and .
- (d)Outside referrals arrive at the clinic at a rate of per working day, under Poisson assumptions. Let be the number of referral-free days in a -day week and the number of the first referral-free day. Identify the distribution of each — one of them needs a probability that a Poisson calculation must supply first — and find , and . Check a second way by treating the whole week as one window.
Solution
(a) Binomial: fixed , count of successes. Thirty independent screenings with constant , and counts successes, so — the tell is “thirty people are screened … how many qualify”. and .
Exactly, . With large and small, the Poisson approximation with gives .
Which is larger? The inequality for holds because satisfies and for , so is strictly positive there. Apply it with and raise both (positive) sides to the th power:
So the Poisson approximation overstates the exact probability of zero qualifiers. (The two are close — the error of the Poisson limit is of order relative to unity in the exponent, i.e. a few percent here.)
(b) Negative binomial: count of trials until the th success. The number of trials is random and the number of successes is fixed at — “continue until have qualified” — so is negative binomial with , , on . As a sum of three independent geometric waits,
The standard deviation, a little over , is more than half the mean: the recruiter should not plan on “about ”.
For , person must qualify and exactly of the first must qualify:
(The coefficient is , not : the last trial is not free.)
(c) Hypergeometric: without replacement from a small pool. Four names from a list of with marked, drawn without replacement — “drawn at random without replacement” from a fixed finite list is the tell — so is hypergeometric with , , . Choosing no one with the condition means all four names come from the unmarked:
— by linearity over the four indicator variables, dependence notwithstanding. The binomial would not do here: is far above .
(d) A Poisson feeds a binomial and a geometric. Referrals in a single day are Poisson with (a rate over a window, no list of trials), so a given day is referral-free with probability
Under the Poisson assumptions, counts in disjoint days are independent, so the five days are independent Bernoulli trials.
counts successes among a fixed of them: , with and
Second way: the whole week is a single window of days, so its referral count is Poisson, and “no referrals all week” is its zero term, ✓ — the sum rule for independent Poissons and the binomial product agree, as they must.
counts trials (days) up to and including the first success (a free day), so is geometric with parameter on , and
This is a little under : with only half a referral expected per day, a quiet day comes quickly. The two-step reading is the point of the part — a Poisson calculation supplies the that a binomial and a geometric then consume.