CalcPath
ProgressProblem setsFeedback
← Question sheet

Probability · Solutions

Foundations of Probability

12 questions · about 106 minutes

Work this sheet on paper, showing every step — the solutions give the full method so you can check your route, not just your final number. Name every rule you use (“by the complement rule”, “by the law of total probability”, “by Bayes' theorem”) and check its hypothesis where it has one: that the sample space is equiprobable, that the conditioning event has positive probability, that the cases form a partition. No calculator is needed anywhere; every answer is an exact fraction. Full worked solutions are on a separate page, and each question has its own reveal, so you can check one answer without seeing the rest.

  1. 1.Computation

    A red die and a blue die, both fair, are rolled, and the outcome is recorded as the ordered pair (red,blue). Let E be the event “the product of the two faces is even”, F be “the blue die shows 3”, and G be “the two faces sum to 4”. Wherever you use P(A)=∣A∣/∣S∣, say why the sample space you are counting in is equiprobable.

    1. (a)Find ∣E∣, ∣F∣ and ∣G∣, and hence P(E), P(F) and P(G). Do not list all of E: find ∣E∣ by counting its complement, and name the rule that licenses the step.
    2. (b)Find P(E∪F) by the addition rule, then confirm the value by counting E∪F directly.
    3. (c)Find the probability that the faces sum to 4 and their product is odd. Say which two of E, F, G are involved and which named result gives the answer without listing outcomes.

    Solution

    (a) Set up the space. S={(i,j):1≤i,j≤6} has 36 outcomes. Two fair dice are physically symmetric and the red die does not influence the blue one, so every ordered pair is equally likely and the counting formula P(A)=∣A∣/36 applies.

    Ec is “the product is odd”, which happens exactly when both faces are odd. Each die has 3 odd faces, so by the multiplication principle ∣Ec∣=3×3=9 and P(Ec)=369​=41​. By the complement rule, P(E)=1−41​=43​, so ∣E∣=27.

    F={(i,3):1≤i≤6} has 6 outcomes, so P(F)=366​=61​.

    G={(1,3),(2,2),(3,1)} has 3 outcomes, so P(G)=363​=121​.

    (b) Addition rule. Inside F the blue face is 3, which is odd, so the product is even exactly when the red face is even: E∩F={(2,3),(4,3),(6,3)} and P(E∩F)=363​=121​. Then

    P(E∪F)=P(E)+P(F)−P(E∩F)=3627​+366​−363​=3630​=65​.

    Direct count: E∪F consists of the 27 outcomes of E together with the outcomes of F that are not in E, namely those with an odd red face, (1,3),(3,3),(5,3). That is 27+3=30 outcomes, and 3630​=65​ as before.

    (c) Difference formula. The event is G∩Ec=G∖E: sum 4, product odd. Since G∩E⊆G, the difference formula that comes with monotonicity gives

    P(G∖E)=P(G)−P(G∩E).

    Of the three outcomes in G, only (2,2) has an even product, so P(G∩E)=361​ and

    P(G∩Ec)=363​−361​=362​=181​.

    Check by listing: the outcomes are (1,3) and (3,1), both with product 3, and there are indeed two of them.

  2. 2.Computation

    An integer N is chosen uniformly at random from {1,2,…,60}. Let A, B and C be the events that N is divisible by 2, by 3 and by 5 respectively.

    1. (a)Compute P(A), P(B), P(C), P(A∩B), P(A∩C), P(B∩C) and P(A∩B∩C), saying in one line how each intersection is counted.
    2. (b)Find the probability that N is divisible by at least one of 2, 3, 5, and the probability that it is divisible by none of them. Name the theorem you use, and run the sanity checks that Boole's inequality and monotonicity provide.
    3. (c)Find the probability that N is divisible by exactly one of the three. Derive the count you use from the addition rule rather than quoting a formula.

    Solution

    (a) Count multiples. “Uniformly” means the 60 outcomes are equiprobable, so every probability is a count divided by 60. There are 30 multiples of 2, 20 multiples of 3 and 12 multiples of 5 up to 60, giving

    P(A)=6030​=21​,P(B)=6020​=31​,P(C)=6012​=51​.

    Because 2, 3 and 5 are pairwise coprime, “divisible by 2 and by 3” is the same as “divisible by 6”, and similarly for the other pairs and the triple. There are 10 multiples of 6, 6 of 10, 4 of 15 and 2 of 30:

    P(A∩B)=6010​=61​,P(A∩C)=606​=101​,P(B∩C)=604​=151​,P(A∩B∩C)=602​=301​.

    (b) Inclusion–exclusion for three events.

    ∣A∪B∪C∣=30+20+12−10−6−4+2=44,P(A∪B∪C)=6044​=1511​.

    By the complement rule, P(none)=1−1511​=154​, which is 16 of the 60 integers. (Listing them — 1,7,11,13,17,19,23,29,31,37,41,43,47,49,53,59 — confirms 16.)

    Checks. Boole's inequality gives P(A∪B∪C)≤21​+31​+51​=3031​, which exceeds 1 and so is not informative here, though it is not violated. Monotonicity gives P(A∪B∪C)≥P(A)=21​, and 1511​>21​ holds.

    (c) Exactly one. “A only” is A∖(B∪C). By the difference formula, P(A only)=P(A)−P(A∩(B∪C)), and by distributivity A∩(B∪C)=(A∩B)∪(A∩C), whose probability the addition rule gives as

    P(A∩B)+P(A∩C)−P(A∩B∩C),

    since (A∩B)∩(A∩C)=A∩B∩C. Hence, in counts,

    ∣A only∣=30−10−6+2=16,∣B only∣=20−10−4+2=8,∣C only∣=12−6−4+2=4.

    The three “only” events are pairwise disjoint (an integer cannot be divisible by 2 alone and by 3 alone), so finite additivity gives

    P(exactly one)=6016+8+4​=6028​=157​.

    Sanity check: exactly one is a sub-event of at least one, and 157​≤1511​, as monotonicity demands. The remaining 154​ of “at least one” is “two or more”, that is 16 integers: 10+6+4−2⋅2=16, counting each pairwise multiple and removing the multiples of 30, which were counted three times, twice.

  3. 3.Proof

    Prove each statement for an arbitrary probability measure P, using only the Kolmogorov axioms and the results that follow directly from them: finite additivity, the complement rule, monotonicity and the addition rule. Name each result at the point where it is used. The proofs are short; the marks are for making every hypothesis visible.

    1. (a)For any events A and B, P(A∩B)≥P(A)+P(B)−1.
    2. (b)For any events A and B, with no containment assumed, P(A∩Bc)=P(A)−P(A∩B).
    3. (c)If P(A)=1 then P(A∩B)=P(B) for every event B. Then explain in one sentence why this does not show A=S.

    Solution

    (a) From the addition rule and the upper bound. By the addition rule,

    P(A∪B)=P(A)+P(B)−P(A∩B).

    Since A∪B⊆S, monotonicity gives P(A∪B)≤P(S)=1, the last equality being the normalisation axiom. Combining,

    P(A)+P(B)−P(A∩B)≤1,soP(A∩B)≥P(A)+P(B)−1.■

    The bound has content only when P(A)+P(B)>1; otherwise it says P(A∩B)≥ a negative number, which non-negativity already guarantees.

    (b) Split A along B. Every outcome of A lies either in B or in Bc, and not both, so

    A=(A∩B)∪(A∩Bc)

    with the two pieces disjoint, because one is inside B and the other inside Bc. Finite additivity gives P(A)=P(A∩B)+P(A∩Bc), and subtracting P(A∩B) from both sides is the claim. ■

    This is the difference formula P(B′∖A′)=P(B′)−P(A′) with A′=A∩B and B′=A; the containment A∩B⊆A that formula needs is automatic, which is why no containment had to be assumed.

    (c) A probability-one event is invisible to intersections. By the complement rule, P(Ac)=1−P(A)=0. Now B∩Ac⊆Ac, so monotonicity gives P(B∩Ac)≤P(Ac)=0, and non-negativity gives P(B∩Ac)≥0; hence P(B∩Ac)=0. Apply part (b) with the roles of A and B exchanged:

    P(B∩A)=P(B)−P(B∩Ac)=P(B)−0=P(B).■

    This does not show A=S, because the axioms allow a non-empty event to have probability zero — a loaded die whose face 6 never comes up has P({6})=0 and P({1,…,5})=1, yet {1,…,5}=S. Probability one means “almost certain”, which is a statement about P, not about the set.

  4. 4.Computation

    A committee of 4 is chosen uniformly at random from a pool of 6 women and 5 men. Before each count, say whether order matters and whether repetition is allowed, and use the same convention in numerator and denominator.

    1. (a)Find the probability that the committee has exactly 2 women.
    2. (b)Find the probability that it contains at least one man, using the complement rule. Then explain precisely why the count 5×(310​) (“pick a man, then any three others”) does not count the committees with at least one man, and reconcile it with the correct count by saying how many times it counts a committee with exactly m men.
    3. (c)Find the probability that the committee contains more women than men, and verify your table of counts by checking that the numbers of committees with 0,1,2,3,4 women sum to (411​).

    Solution

    (a) Unordered, without repetition. A committee is a 4-element subset of the 11 people: order is irrelevant and nobody can be chosen twice. All subsets are equally likely, so

    ∣S∣=(411​)=4!11⋅10⋅9⋅8​=247920​=330.

    A committee with exactly 2 women is built in two stages — choose the 2 women from 6, then the 2 men from 5 — and the number of options at the second stage does not depend on the first choice, so the multiplication principle applies:

    ∣A∣=(26​)(25​)=15×10=150,P(A)=330150​=115​.

    (b) Complement. “At least one man” fails only for the all-women committees, of which there are (46​)=15. By the complement rule,

    P(at least one man)=1−33015​=330315​=2221​.

    The count 5×(310​)=5×120=600 cannot be right: it exceeds ∣S∣=330, so it is not the size of any event. The error is that a committee with m men is produced once for each man who could have been “the” chosen one, so it is counted m times. Exact counts by number of men: 1 man, 5×(36​)=100; 2 men, (25​)(26​)=150; 3 men, (35​)×6=60; 4 men, (45​)=5. The correct total is 100+150+60+5=315, matching the complement. Weighting by multiplicity, 1⋅100+2⋅150+3⋅60+4⋅5=100+300+180+20=600 — exactly the flawed count, which confirms the diagnosis.

    (c) Disjoint cases. “More women than men” means 3 or 4 women, two mutually exclusive cases, so finite additivity applies:

    (36​)(15​)+(46​)=20×5+15=115,P=330115​=6623​.

    Full table by number of women: 0 women, (45​)=5; 1 woman, 6×(35​)=60; 2 women, 150; 3 women, 100; 4 women, 15. Sum: 5+60+150+100+15=330=(411​). The five cases partition the sample space, so the check had to come out exactly, and it did.

  5. 5.Computation

    A four-digit PIN is chosen uniformly at random from 0000 to 9999, so leading zeros are allowed and ∣S∣=104. Give every answer as an exact fraction in lowest terms.

    1. (a)Find the probability that all four digits are distinct, and hence the probability that some digit is repeated.
    2. (b)Find the probability that the digit 7 appears at least once.
    3. (c)Find the probability that the digits are strictly increasing from left to right (as in 1359). Explain why a combination count is the right tool even though the sample space consists of ordered strings.
    4. (d)A student argues: “the events in (a) and (b) are both about digits, so P(all distinct and contains a 7)=P(all distinct)P(contains a 7).” Compute P(all distinct and contains a 7) correctly, decide whether the two events are independent, and explain in words which way the dependence runs.

    Solution

    (a) Ordered, without repetition. A PIN is an ordered string, and ∣S∣=104=10,000 by the multiplication principle with repetition allowed. All-distinct PINs are ordered selections of 4 digits from 10 without repetition:

    P(10,4)=10×9×8×7=5040,P(all distinct)=100005040​=12563​.

    By the complement rule, P(some digit repeated)=1−12563​=12562​.

    (b) Complement again. “At least one 7” is awkward directly, so count PINs with no 7: each of the four positions has 9 choices, giving 94=6561. Hence

    P(at least one 7)=1−100006561​=100003439​.

    The fraction is already in lowest terms: 3439=19×181 is odd and not a multiple of 5, so it shares no factor with 104=2454.

    (c) Combinations inside an ordered space. A strictly increasing string has four distinct digits, and conversely any 4-element subset of {0,1,…,9} can be written in increasing order in exactly one way. So the increasing PINs are in one-to-one correspondence with the 4-subsets, and there are

    (410​)=2410⋅9⋅8⋅7​=210

    of them. Note that 210=5040/4!: of the 24 orderings of each set of four distinct digits, exactly one is increasing. Thus P=10000210​=100021​. The sample space is ordered, but the event picks out one representative per subset, so an unordered count is exactly what is needed — and the denominator stays 104, because the sample space has not changed.

    (d) Dependent. Count all-distinct PINs containing a 7 by stages: choose which of the 4 positions holds the 7 (4 ways), then fill the other three positions with distinct digits from the remaining 9 (9×8×7=504 ways). By the multiplication principle,

    ∣A∩B∣=4×504=2016,P(A∩B)=100002016​=625126​.

    Independence would require P(A∩B)=P(A)P(B)=12563​⋅100003439​. Compare via the conditional form, since P(A)>0:

    P(B∣A)=P(A)P(A∩B)​=50402016​=52​=0.4,P(B)=0.3439.

    These differ, so the events are dependent, and the student's product is wrong. The direction is intelligible: a PIN with four distinct digits uses four different values out of ten, whereas a PIN with repeats uses fewer, so a specific digit such as 7 is more likely to be among the values used when the digits are distinct.

  6. 6.Computation

    A box holds 5 red, 3 blue and 2 green balls. Three balls are drawn one at a time without replacement, every ball still in the box being equally likely at each draw.

    1. (a)Use the chain rule to find the probability that all three balls are the same colour. Then recompute it by counting unordered draws, and confirm the two routes agree.
    2. (b)Find the probability that the three balls are of three different colours.
    3. (c)Given that no green ball was drawn, find the probability that all three balls are red — once from the definition of conditional probability, and once by working directly inside the reduced sample space.

    Solution

    (a) Chain rule, colour by colour. Let Ri​, Bi​, Gi​ be the colour of the i-th ball. For all red,

    P(R1​∩R2​∩R3​)=P(R1​)P(R2​∣R1​)P(R3​∣R1​∩R2​)=105​⋅94​⋅83​=72060​=121​,

    each conditioning event having positive probability, as the chain rule requires. For all blue, 103​⋅92​⋅81​=7206​=1201​. For all green, P(G3​∣G1​∩G2​)=80​=0, since only two green balls exist. The three cases are mutually exclusive, so by finite additivity

    P(same colour)=121​+1201​+0=12010​+1201​=12011​.

    Unordered check: all (310​)=120 three-ball subsets are equally likely, and the monochrome ones number (35​)+(33​)+(32​)=10+1+0=11, giving 12011​ again. The ordering convention cancels when used consistently on top and bottom.

    (b) Three different colours. In draw order the colours can appear in any of 3!=6 sequences. For the sequence red, blue, green the chain rule gives 105​⋅93​⋅82​=72030​, and every other sequence gives the same product — the numerators 5,3,2 are merely permuted over the fixed denominators 10,9,8. The six sequences are mutually exclusive, so

    P(three colours)=6×72030​=720180​=41​.

    Unordered check: 5×3×2=30 subsets out of 120, and 12030​=41​.

    (c) Conditioning on “no green”. Let N be “no green ball drawn” and A be “all three red”. Then A⊆N, so A∩N=A and P(A∩N)=121​. For P(N), count unordered draws from the 8 non-green balls: (38​)=56, so P(N)=12056​=157​>0 (the chain rule agrees: 108​⋅97​⋅86​=720336​=157​). By the definition,

    P(A∣N)=P(N)P(A∩N)​=7/151/12​=8415​=285​.

    Reduced sample space: given N, the draw is effectively three balls from the 8 non-green ones, all 56 subsets equally likely, and (35​)=10 of them are all red: 5610​=285​. Same answer, as it must be — conditioning is exactly the restriction to N with the probabilities rescaled to total 1.

  7. 7.Critique

    A bag holds 4 red and 6 blue balls. Two are drawn without replacement. Write R1​, B1​ for the colour of the first ball and R2​, B2​ for the second. A student writes:

    Step 1. P(R2​∣B1​)=94​, since after a blue ball leaves, 4 of the 9 remaining balls are red.

    Step 2. So by the complement rule, P(R2​∣R1​)=1−P(R2​∣B1​)=95​.

    Step 3. By the multiplication rule, P(R1​∩R2​)=P(R1​)P(R2​∣R1​)=104​⋅95​=92​.

    Step 4. P(R1​∣R2​) is undefined: the second draw happens after the first, so it cannot affect it, and there is nothing to condition on.

    Step 1 is correct. Nothing after it is.

    1. (a)For each of Steps 2, 3 and 4, say exactly what is wrong — which rule is misapplied, or which idea is confused — and give the correct value wherever there is one.
    2. (b)Compute P(R2​) and P(R1​∣R2​), and explain in one sentence what P(R1​∣R2​) means.

    Solution

    (a) Step 2: the complement rule is applied behind the bar. The rules of probability transfer to P(⋅∣B1​) because conditioning on a fixed event yields a probability measure — but that measure lives in front of the bar. The valid statement is P(R2c​∣B1​)=1−P(R2​∣B1​), i.e. P(B2​∣B1​)=95​. Changing the condition from B1​ to R1​ moves to a different reduced sample space, and nothing relates the two numbers. Correct value: after a red ball leaves, 3 of the 9 remaining are red, so

    P(R2​∣R1​)=93​=31​.

    Note 94​+31​=97​=1; there is no reason it should be 1.

    Step 3: right rule, wrong input. The multiplication rule P(R1​∩R2​)=P(R1​)P(R2​∣R1​) is correctly stated and its hypothesis P(R1​)=104​>0 holds; the error is only the inherited 95​. Correct value:

    P(R1​∩R2​)=104​⋅93​=9012​=152​.

    Check by unordered counting: (24​)/(210​)=456​=152​.

    Step 4: conditioning is about information, not causation. The definition P(A∣B)=P(A∩B)/P(B) asks only that P(B)>0; it says nothing about which event happens first. Learning the colour of the second ball is evidence about the first, because the two draws are dependent. Since P(R2​)>0 (computed in (b)), P(R1​∣R2​) is perfectly well defined, and its value is 31​.

    (b) Compute P(R2​) by counting. Take the sample space of ordered pairs of distinct balls: 10×9=90 equally likely outcomes. The second ball is red in 4 ways, and for each of those the first ball is any of the other 9, so ∣R2​∣=4×9=36 and

    P(R2​)=9036​=52​=P(R1​).

    (That the two agree is the symmetry of a well-mixed bag: no position in the draw is special.) By the definition,

    P(R1​∣R2​)=P(R2​)P(R1​∩R2​)​=2/52/15​=152​⋅25​=31​.

    Meaning: among all runs of the experiment in which the second ball turns out red, one-third have a red first ball — the second draw does not change the first, but knowing its result changes what we should believe about the first. It equals P(R2​∣R1​) here only because P(R1​)=P(R2​).

  8. 8.Proof

    Work from the definition of independence, P(A∩B)=P(A)P(B), throughout. Use the conditional characterisation only after checking its hypothesis.

    1. (a)Prove that an event A is independent of itself if and only if P(A)=0 or P(A)=1.
    2. (b)Suppose A is independent of B, A is independent of C, and B∩C=∅. Prove that A is independent of B∪C.
    3. (c)Give an explicit example on a single fair die showing that the conclusion of (b) can fail when B∩C=∅, and point to the line of your proof in (b) that breaks.

    Solution

    (a) Only certain or impossible events are self-independent. Since A∩A=A, independence of A with itself reads P(A)=P(A)P(A), that is

    P(A)(1−P(A))=0,

    so P(A)=0 or P(A)=1. Conversely, if P(A) is 0 or 1 then P(A)2=P(A)=P(A∩A) and the definition holds. ■

    In words: learning that A occurred tells you nothing about whether A occurred only when you already knew.

    (b) Independence is additive over disjoint events. By distributivity,

    A∩(B∪C)=(A∩B)∪(A∩C),

    and the two pieces are disjoint, because (A∩B)∩(A∩C)⊆B∩C=∅. Finite additivity, then the two independence hypotheses, then finite additivity once more for the disjoint pair B, C:

    P(A∩(B∪C))=P(A∩B)+P(A∩C)=P(A)P(B)+P(A)P(C)=P(A)(P(B)+P(C))=P(A)P(B∪C).

    This is precisely the definition of independence for A and B∪C. ■

    (c) A counterexample with overlap. Roll one fair die, so S={1,2,3,4,5,6} is equiprobable. Take A={1,2,3}, B={1,4}, C={1,5}, so P(A)=21​ and P(B)=P(C)=31​.

    A∩B={1} and P(A∩B)=61​=21​⋅31​, so A and B are independent; identically A∩C={1} gives A and C independent. But B∩C={1}=∅.

    Now B∪C={1,4,5} has P(B∪C)=21​, while A∩(B∪C)={1} has probability 61​, and

    61​=21​⋅21​=41​.

    So A is not independent of B∪C.

    The proof breaks at the first equality: A∩B and A∩C are no longer disjoint (both contain 1), so P(A∩B)+P(A∩C)=31​ double counts the outcome 1 and is not P(A∩(B∪C))=61​. The last equality fails for the same reason, since P(B)+P(C)=32​=21​=P(B∪C); the addition rule's correction term −P(B∩C) is exactly what the disjointness hypothesis was suppressing.

  9. 9.Computation

    Two fair dice are rolled and the outcome is the ordered pair (first,second) in the 36-element equiprobable sample space. Let T be “the sum is 7”, E be “the sum is 8”, B be “the first die shows 3”, and C be “the second die shows 4”.

    1. (a)Decide from the definition whether T and B are independent, and whether E and B are independent. Explain in words what it is about the number 7 that makes the difference.
    2. (b)Let V be “the first die shows an even number”. Show that T and V are independent.
    3. (c)Show that T, B, C are pairwise independent but not mutually independent, and say in words why the failure is not surprising.

    Solution

    (a) Seven is special. T={(1,6),(2,5),(3,4),(4,3),(5,2),(6,1)}, so P(T)=366​=61​, and P(B)=366​=61​. The intersection T∩B={(3,4)} has probability 361​, and

    P(T)P(B)=61​⋅61​=361​=P(T∩B),

    so T and B are independent.

    E={(2,6),(3,5),(4,4),(5,3),(6,2)} has P(E)=365​, and E∩B={(3,5)} has probability 361​. But

    P(E)P(B)=365​⋅61​=2165​=2166​=361​,

    so E and B are dependent.

    The reason: whatever the first die shows, exactly one face of the second die makes the sum 7, so P(T∣first die=k)=61​=P(T) for every k — learning the first die changes nothing. For a sum of 8, a first die of 1 makes the event impossible while a 3 leaves one chance in six, so the first die carries information about E.

    (b) Independence of T from an even first die. V is the disjoint union of “first die is 2”, “first die is 4”, “first die is 6”, so P(V)=3618​=21​. Directly, T∩V={(2,5),(4,3),(6,1)} and

    P(T∩V)=363​=121​=61​⋅21​=P(T)P(V).

    Independent. (This is also an instance of a general fact: T is independent of each “first die is k” by the argument in (a), and independence is preserved under disjoint unions.)

    (c) Pairwise but not mutually. P(C)=61​. The three pairwise intersections are

    T∩B={(3,4)},T∩C={(3,4)},B∩C={(3,4)},

    each of probability 361​=61​⋅61​, so all three pairs are independent. (B and C are independent by the physical separation of the dice; T and C by the same reasoning as T and B.)

    The triple intersection is again {(3,4)}, so P(T∩B∩C)=361​, whereas

    P(T)P(B)P(C)=2161​.

    Since 361​=2161​, mutual independence fails. It is not surprising: B and C together pin the outcome to (3,4), which forces the sum to be 7, so P(T∣B∩C)=1=61​=P(T). Each event alone says nothing about T; two of them together say everything.

  10. 10.Computation

    A fair die is rolled. If it shows k, then k fair coins are tossed, the coins being independent of one another and of the die. Let H be the event that every coin tossed shows heads, and let Dk​ be the event that the die shows k.

    1. (a)Verify that D1​,…,D6​ form a partition, state P(H∣Dk​) with justification, and compute P(H) exactly.
    2. (b)Compute the probability that exactly one head appears in total.
    3. (c)Let V be “the die shows an even number”. Compute P(H∣V). Explain which theorem lets you run a total-probability argument inside the conditional world, and check the answer against the weighted-average bounds.
    4. (d)Are H and D1​ independent? Decide by a computation, and say in words which way the dependence runs.

    Solution

    (a) Partition, then total probability. The die shows exactly one face, so the Dk​ are pairwise mutually exclusive and their union is the whole sample space; each has P(Dk​)=61​>0. All three conditions in the definition of a partition hold.

    Given Dk​, the k coins are mutually independent and fair, so P(H∣Dk​)=(21​)k by the product rule for mutually independent events. By the law of total probability,

    P(H)=k=1∑6​P(H∣Dk​)P(Dk​)=61​(21​+41​+81​+161​+321​+641​)=61​⋅6432+16+8+4+2+1​=61​⋅6463​=38463​=12821​.

    Bounds check: the conditional rates run from 641​ to 21​, and 12821​≈0.164 lies between them.

    (b) Exactly one head. Given Dk​, the k coin results form 2k equally likely strings (multiplication principle, with independence making them equiprobable), of which exactly k contain a single head — one for each position the head could occupy. So P(one head∣Dk​)=2kk​, and

    P(one head)=61​(21​+42​+83​+164​+325​+646​)=61​⋅6432+32+24+16+10+6​=61​⋅64120​=384120​=165​.

    (c) Total probability inside a conditional measure. Write Q(⋅)=P(⋅∣V), which is legitimate since P(V)=21​>0, and which is a probability measure by the theorem that conditioning yields a probability measure. Under Q the events D2​,D4​,D6​ are still disjoint, they exhaust V so that Q(D2​∪D4​∪D6​)=Q(V)=1, and each has Q(Dk​)=1/21/6​=31​>0. So they partition the space for Q, and the law of total probability applies to Q. Moreover, for even k,

    Q(H∣Dk​)=P(Dk​∩V)P(H∩Dk​∩V)​=P(Dk​)P(H∩Dk​)​=P(H∣Dk​),

    because Dk​⊆V. Hence

    P(H∣V)=31​(41​+161​+641​)=31​⋅6416+4+1​=19221​=647​.

    Direct route as a check: P(H∩V)=61​(41​+161​+641​)=61​⋅6421​=1287​, and dividing by P(V)=21​ gives 647​. Bounds: the relevant conditional rates are 641​,161​,41​, and 647​≈0.109 lies between 641​ and 41​. It is also below P(H)=12821​≈0.164, as it should be: an even die means at least two coins, which makes all-heads harder.

    (d) Dependent. P(H∣D1​)=21​, whereas P(H)=12821​; since P(D1​)>0 the conditional characterisation applies, and the two differ, so H and D1​ are dependent. In product form, P(H∩D1​)=61​⋅21​=121​=76864​ while P(H)P(D1​)=76821​.

    The dependence is positive: a 1 on the die means a single coin, the easiest case for all-heads, so D1​ raises the chance of H from 12821​ to 21​. Symmetrically, observing H makes a low die roll more plausible.

  11. 11.Computation

    A pocket holds three coins: a fair coin, a two-headed coin, and a biased coin for which heads has probability 41​. One coin is chosen uniformly at random and tossed twice; successive tosses of a given coin are independent. Both tosses show heads. Write F, D and W for the events that the fair, two-headed and biased coin was chosen, and HH for the observation.

    1. (a)Compute P(HH) by the law of total probability, and check it against the weighted-average bounds.
    2. (b)Find the posterior probability of each coin given HH, and verify that the three posteriors sum to 1. Then compare the fair and two-headed coins in odds form and confirm it agrees.
    3. (c)The same coin is tossed a third time. Find the probability that it shows heads, given the two heads already seen. State exactly where conditional independence is used, and compare with the unconditional probability that a single toss shows heads.
    4. (d)Would a single observed head have moved the probability of the two-headed coin less far? Compute P(D∣H) and compare with P(D∣HH).

    Solution

    (a) Evidence. The events F, D, W partition the sample space — exactly one coin is chosen — with P(F)=P(D)=P(W)=31​>0. Given the coin, the two tosses are independent, so

    P(HH∣F)=21​⋅21​=41​,P(HH∣D)=1⋅1=1,P(HH∣W)=41​⋅41​=161​.

    By the law of total probability,

    P(HH)=31​(41​+1+161​)=31​⋅164+16+1​=31​⋅1621​=167​.

    Bounds: 167​ lies between 161​ and 1, the smallest and largest conditional rates.

    (b) Posteriors by Bayes' theorem with a partition. With P(HH)=167​>0,

    P(D∣HH)=7/161⋅31​​=31​⋅716​=2116​,P(F∣HH)=7/1641​⋅31​​=121​⋅716​=214​,P(W∣HH)=7/16161​⋅31​​=481​⋅716​=211​.

    Sum: 2116+4+1​=1, as the posteriors over a partition must (they are Q(F)+Q(D)+Q(W)=Q(S) for the probability measure Q=P(⋅∣HH)).

    Odds form, two-headed against fair: the prior odds are 1/31/3​=1; the likelihood ratio is P(HH∣F)P(HH∣D)​=1/41​=4; so the posterior odds are 4×1=4. Directly, P(F∣HH)P(D∣HH)​=4/2116/21​=4. Agreed.

    (c) Predicting the third toss. Let H3​ be “third toss is heads”. Conditioning on HH gives a probability measure Q, under which F, D, W still form a partition (each posterior is positive), so the law of total probability applies to Q:

    P(H3​∣HH)=coin∑​P(H3​∣coin∩HH)P(coin∣HH).

    Conditional independence is used here: given the coin, the third toss is independent of the first two, so P(H3​∣coin∩HH)=P(H3​∣coin), which is 21​, 1, 41​ for F, D, W. Therefore

    P(H3​∣HH)=2116​⋅1+214​⋅21​+211​⋅41​=8464​+848​+841​=8473​.

    Check from the definition: P(HHH)=31​(81​+1+641​)=31​⋅6473​, and P(HH)P(HHH)​=31​⋅6473​⋅716​=8473​.

    Unconditionally a single toss shows heads with probability 31​(21​+1+41​)=31​⋅47​=127​=8449​, well below 8473​. The tosses are conditionally independent given the coin but strongly dependent unconditionally: two heads are evidence for the two-headed coin, and that raises the chance of a third.

    (d) One head moves the posterior less. P(H)=127​ from (c), so by Bayes' theorem

    P(D∣H)=7/121⋅31​​=31​⋅712​=74​=2112​.

    Compare P(D∣HH)=2116​. The prior 217​ rises to 2112​ after one head and to 2116​ after two: each head is evidence for D, and the second head adds less than the first in absolute terms because there is less room left to move.

  12. 12.Sketch

    A test for a condition has sensitivity P(+∣D)=s and false-positive rate P(+∣Dc)=f, with 0<f<s<1. The prevalence p=P(D) depends on the population being tested. Write g(p)=P(D∣+) for the posterior probability of the condition after one positive result. Keep s and f symbolic until part (c); no calculator is needed.

    1. (a)Derive g(p)=sp+f(1−p)sp​ for 0<p<1, naming each theorem used. Then obtain the same formula from the odds form of Bayes' theorem.
    2. (b)Show that g(p)>p for every 0<p<1; find the prevalence p∗ at which g(p∗)=21​; and show that pg(p)​=f+(s−f)ps​, so that g(p)≈fs​p for small p and the ratio g(p)/p decreases as p grows.
    3. (c)Take s=109​ and f=101​. Sketch y=g(p) for 0≤p≤1 on the same axes as the line y=p. Mark the points at p=0, p=1001​, p=p∗, p=21​ and p=1 with their exact g-values and indicate the initial slope. Then explain what each of these features means for a patient: the gap between the curve and the diagonal, the steepness near p=0, and the flattening near p=1. Finally say what the sketch becomes for a useless test with s=f.

    Solution

    (a) Bayes with the partition {D,Dc}. For 0<p<1 both P(D)=p and P(Dc)=1−p (complement rule) are positive, so {D,Dc} is a partition and the law of total probability gives the evidence

    P(+)=P(+∣D)P(D)+P(+∣Dc)P(Dc)=sp+f(1−p),

    which is positive since s,f>0. Bayes' theorem then applies:

    g(p)=P(D∣+)=P(+)P(+∣D)P(D)​=sp+f(1−p)sp​.

    Odds route: posterior odds equal the likelihood ratio times the prior odds,

    P(Dc∣+)P(D∣+)​=fs​⋅1−pp​.

    Converting odds o back to a probability with o/(1+o),

    g(p)=1+f(1−p)sp​f(1−p)sp​​=f(1−p)+spsp​,

    the same expression, obtained without ever computing P(+).

    (b) Three properties. The posterior exceeds the prior. Since the denominator is positive, g(p)>p is equivalent to sp>p(sp+f(1−p)), i.e. (dividing by p>0) to s>sp+f(1−p), i.e. to s(1−p)>f(1−p), which holds because s>f and 1−p>0. A positive result from a test whose true-positive rate beats its false-positive rate always raises the probability of the condition.

    The half-way prevalence. g(p)=21​ exactly when sp=f(1−p), that is p(s+f)=f, so

    p∗=s+ff​.

    Below this prevalence a positive result still leaves the condition less likely than not.

    The amplification factor. Dividing numerator and denominator of g(p) by p and rewriting sp+f(1−p)=f+(s−f)p,

    pg(p)​=f+(s−f)ps​.

    At p near 0 the denominator is near f, so g(p)≈fs​p: the posterior is the likelihood ratio times the prior, which is the odds form read for small probabilities. As p increases the denominator grows (because s−f>0), so the ratio g(p)/p falls from fs​ towards 1 at p=1. The chord from the origin to any point of the curve therefore gets shallower as p grows, which is what makes the curve bend downward.

    (c) The sketch. With s=109​, f=101​,

    g(p)=109​p+101​(1−p)109​p​=1+8p9p​,p∗=11/10​=101​,fs​=9.

    Values to mark: g(0)=0; g(1001​)=108/1009/100​=121​; g(101​)=18/109/10​=21​; g(21​)=59/2​=109​; g(1)=99​=1.

    Draw axes with p from 0 to 1 horizontally and y from 0 to 1 vertically, and the diagonal y=p dashed. The curve starts at the origin, where it leaves nine times as steeply as the diagonal — draw a short tangent segment of slope 9, so that it reaches height 1009​ by p=1001​, just above the marked point (1001​,121​). It passes through (101​,21​), already half-way up after one-tenth of the horizontal axis, then through (21​,109​), and arrives at (1,1) almost flat: the last half of the axis lifts it only from 109​ to 1. It lies strictly above the diagonal on 0<p<1, by (b), touching it only at the two ends, and it is concave — the chords from the origin have slopes pg(p)​=1+8p9​, which fall from 9 to 1.

    The gap between curve and diagonal is the information the positive result carries: at prevalence p the patient's probability moves from p up to g(p), and the gap is largest in the middle of the range — at p=101​ it is 21​−101​=52​.

    The steepness near 0 is the base-rate effect seen from the other side: for rare conditions the posterior is extremely sensitive to the prevalence, so a screening programme at p=1001​ gives g=121​ while a clinic whose patients arrive at p=101​ gets 21​ from the very same test. Nothing about the test changed; the population did.

    The flattening near 1 says a positive result adds little when the condition is already near-certain: at p=21​ the test lifts the probability to 109​, but from 109​ it can only reach g(109​)=82/1081/10​=8281​, a gain of under 101​.

    A useless test. If s=f then g(p)=sp+s(1−p)sp​=p: the curve collapses onto the dashed diagonal. The likelihood ratio is 1, the posterior odds equal the prior odds, and a positive result is no evidence at all.

← Back to the question sheet

CalcPath·Free university mathematics

SubjectsProblem setsProgressFeedbackAbout