Problem Sheet 2

Solutions are now available to all non-assessed questions.

This is Problem Sheet 2. This problem sheet covers material from Lectures 3 to 6. You should work through all the questions on this problem sheet in preparation for your tutorial in Week 4. The problem sheet contains two assessed questions, which are due in by 2pm on Monday 30 October.

A: Short questions

A1. Suppose you toss a coin 4 times.

(a) What would you suggest for a sample space \(\Omega\) (i) if you only care about the total number of heads; (ii) if you care about the result of each coin toss?

(b) For each of the cases in part (a), what is \(|\Omega|\)?

Solution.

(i) We can take \(\Omega = \{0,1,2,3,4\}\), with \(|\Omega| = 5\).

(ii) Here, \(\Omega = \{ \text{HHHH}, \text{HHHT}, \text{HHTH},\dots, \text{TTTT} \}\) should be the set of all sequences of four “H”s or “T”s. So here, \(|\Omega| = 2^4 = 16\).

A2. Let \(A\), \(B\) and \(C\) be events in a sample space \(\Omega\). Write the following events using only \(A\), \(B\), \(C\) and the complement, intersection, and union operations.

(a) \(C\) happens but \(A\) doesn’t.

Solution. This is “\(C\) and not \(A\)”: \(C\cap A^{\mathsf{c}}\).

(b) At least one of \(A\), \(B\) and \(C\) happens.

Solution. This is simply the union \(A \cup B\cup C\).

(c) Exactly one of \(B\) or \(C\) happens.

Solution. One way to write this is to split it up as “‘\(B\) but not \(C\)’ or ‘\(C\) but not \(B\)’”, which is \((B \cap C^{\mathsf{c}}) \cup (B^{\mathsf{c}} \cap C)\).

An alternative is to split it up as “‘\(B\) or \(C\)’ but not ‘both \(B\) and \(C\)’”, which is \((B \cup C) \cap (B\cap C)^{\mathsf{c}}\).

You can check these are equal by (for example) using De Morgan’s law and the distributive law to expand out the second version.

(d) Exactly two of \(A\), \(B\) and \(C\) happens.

Solution. I would split this up into “\(A\) and \(B\) but not \(C\)”, “\(A\) and \(C\) but not \(B\)”, and “\(B\) and \(C\) but not \(A\)” and take the union. This gives \[ (A \cap B \cap C^{\mathsf{c}}) \cup (A \cap B^{\mathsf{c}} \cap C) \cup (A^{\mathsf{c}} \cap B \cap C) . \] There are other equivalent formulations.

A3. What is the value of the following expressions?

(a) \(6!\)

Solution. \[ 6! = 6 \times 5 \times 4 \times 3 \times 2 \times 1 = 720. \]

(b) \(8^4\)

Solution. \[ 8^4 = 8 \times 8 \times 8 \times 8 = 4096 \]

(c) \({8}^{\underline{4}}\)

Solution. \[ {8}^{\underline{4}} = 8 \times 7 \times 6 \times 5 = 1680 \]

(d) \({\displaystyle \binom{10}{4}}\)

Solution. \[ \binom{10}{4} = \frac{10 \times 9 \times 8 \times 7}{4\times 3\times 2\times 1} = 210 \]

A4. An urn contains 4 red balls and 6 blue balls. Two balls are drawn from the urn. What is the probability that both balls are red, if the balls are drawn (a) with replacement; (b) without replacement?

Solution.

(a) There are \(|\Omega| = 10^2 = 100\) ways to draw two balls with replacement. There are \(|A| = 4^2=16\) ways to draw two red balls. So \(\mathbb P(A) = \frac{16}{100} = 0.16\).

(b) There are \(|\Omega| = {10}^{\underline{2}} = 10 \times 9 = 90\) ways to draw two balls without replacement. There are \(|A| = {4}^{\underline{2}} = 4 \times 3 = 12\) to draw two red balls. So \(\mathbb P(A) = \frac{12}{90} = \frac{2}{15} = 0.133\).

B: Long questions

B1. Starting from just the three probability axioms, prove the following statements:

(a) \(\mathbb P(\varnothing) = 0\).

Solution. Let \(A\) be any event (such as \(A = \varnothing\) or \(A = \Omega\), for example). Then \(A \cup \varnothing = A\), and the union is disjoint – since \(\varnothing\) contains no sample points, it certainly can’t contain any sample points that are also in \(A\). Then applying Axiom 3, we get \(\mathbb P(A) + \mathbb P(\varnothing) = \mathbb P(A)\). Subtracting \(\mathbb P(A)\) from both sides gives the result.

Alternatively, if you prove part (b) first, you can apply that with \(A = \varnothing\). Since \(\varnothing^\mathsf{c}= \Omega\) and Axiom 2 tells us that \(\mathbb P(\Omega) = 1\), the result follows.

Group feedback: With this, and most “prove from the axioms” questions, the key is to find a relevant disjoint union, which then allows us to use Axiom 3. So if we can find \(C = A \cup B\) as a disjoint union (hopefully containing some events relevant to the question at hand), Axiom 3 allows us to write \(\mathbb P(C) = \mathbb P(A) + \mathbb P(B)\).

(b) \(\mathbb P(A^\mathsf{c}) = 1 - \mathbb P(A)\).

Solution. A very useful and relevant disjoint union is \(A \cup A^\mathsf{c}= \Omega\). Applying Axiom 3 gives us \(\mathbb P(A) + \mathbb P(A^\mathsf{c}) = \mathbb P(\Omega)\). But Axiom 2 tells us that \(\mathbb P(\Omega) = 1\), so \(\mathbb P(A) + \mathbb P(A^\mathsf{c}) = 1\). Rearranging gives the result.

B2. In this question, you will have to use the standard two-event form of the addition rule for unions \[ \mathbb P(A \cup B) = \mathbb P(A) + \mathbb P(B) - \mathbb P(A \cap B) . \]

(a) Using the two-event addition rule, show that \[ \mathbb P(C \cup D \cup E) = \mathbb P(C) + \mathbb P(D \cup E) - \mathbb P\big(C \cap (D \cup E)\big). \]

Solution. As with the Cauchy–Schwarz question from Problem Sheet 1, the key is to make a good choice for what \(A\) and \(B\) should be. This time, \(A = C\) and \(B = D \cup E\) will work well, since \(C \cup (D \cup E) = C \cup D \cup E\). (You can call this “associativity”, if you like.) Making that substitution immediately gives us \[ \mathbb P(C \cup D \cup E) = \mathbb P(C) + \mathbb P(D \cup E) - \mathbb P\big(C \cap (D \cup E)\big) , \] as required.

(b) Using your result from part (a), the two-event addition rule, the distributive law, and the two-event addition rule again, prove the three-event form of the addition rule for unions: \[ \mathbb P(C \cup D \cup E) = \mathbb P(C) + \mathbb P(D) + \mathbb P(E) - \mathbb P(C \cap D) - \mathbb P(C \cap E) - \mathbb P(D \cap E) + \mathbb P(C \cap D \cap E) . \]

Solution. Let’s take the three terms on the right of the equation from part (a) separately.

The first term is \(\mathbb P(C)\), which is fine as it is.

The second term is \(\mathbb P(D \cup E)\). This is the probability of the union of two events, so we can use addition rule for the union of two events to get \[ \mathbb P(D \cup E) = \mathbb P(D) + \mathbb P(E) - \mathbb P(D \cap E) . \]

The third term is \(\mathbb P\big(C \cap (D \cup E)\big)\). If we use the distributive law, as suggested in the question, we get \(C \cap (D \cup E) = (C \cap D) \cup (C\cap E)\), so we want to find \(\mathbb P\big((C \cap D) \cup (C\cap E)\big)\). But this is another union of two events again, this time with \(A = C \cap D\) and \(B = C \cap E\). So the two-event addition rule gives \[ \mathbb P\big((C \cap D) \cup (C\cap E)\big) = \mathbb P(C \cap D) + \mathbb P(C \cap E) - \mathbb P(C \cap D \cap E) , \] since \((C \cap D) \cap (C \cap E) = C \cap D \cap E\).

Finally, we put this all together, and get \[\begin{align*} \mathbb P(C &\cup D \cup E) \\ &= \mathbb P(C) + \big(\mathbb P(D) + \mathbb P(E) - \mathbb P(D \cap E)\big) - \big(\mathbb P(C \cap D) + \mathbb P(C \cap E) - \mathbb P(C \cap D \cap E)\big) \\ &= \mathbb P(C) + \mathbb P(D) + \mathbb P(E) - \mathbb P(C \cap D) - \mathbb P(C \cap E) - \mathbb P(D \cap E) + \mathbb P(C \cap D \cap E) , \end{align*}\] which is what we wanted.

B3. Suppose we pick a number at random from the set \(\{1, 2, \dots, 2023\}\).

(a) What is the probability that the number is divisible by 5?

Solution. The sample space is \(\Omega = \{1, 2, \dots, 2023\}\). Clearly \(|\Omega| = 2023\). The event in question is \(A = \{5, 10, \dots, 2020\}\) of numbers up to 2023 that are divisible by 5. Thus \(|A|\) is the largest integer no bigger than \(\frac{2023}{5} = 404.6\), which is 404, as this is how many times 5 “goes into” 2023. Hence \[ \mathbb P(A) = \frac{|A|}{|\Omega|} = \frac{404}{2023} = 0.1997 , \] just a tiny bit smaller than \(\frac{1}{5}\).

Group feedback: With these “classical probability” questions, the steps should always be:

  1. State clearly what the sample space \(\Omega\) is.
  2. Count how many outcomes \(|\Omega|\) are in the sample space.
  3. State clearly what the event \(A\) is.
  4. Count how many outcomes \(|A|\) are in the event.
  5. The desired probability is then \(\mathbb P(A) = |A|/|\Omega|\).

(b) What is the probability the number is divisible by 5 or by 7?

Solution. With the same \(\Omega\) and \(A\), now let \(B\) be the numbers up to 2023 divisible by \(7\); so we’re looking for \(\mathbb P(A \cup B)\). By the addition rule for unions, this is \[ \mathbb P(A \cup B) = \mathbb P(A) + \mathbb P(B) - \mathbb P(A \cap B) . \] We already know \(\mathbb P(A) = \frac{404}{2022}\), so need to find out \(\mathbb P(B)\) and \(\mathbb P(A \cap B)\).

This time, 7 goes into 2023 exactly, so \(|B|\) is \(\frac{2023}{7} = 289\). So \[ \mathbb P(B) = \frac{|B|}{|\Omega|} = \frac{289}{2023} = \frac{1}{7} . \]

Now, \(A \cap B\) is the set of numbers divisible by both 5 and 7, which is precisely the numbers divisible by their least common multiple \(5 \times 7 = 35\). Then \(|A \cap B|\) is \(\frac{2023}{35} = 57.8\) rounded down, so \(\mathbb P(A \cap B) = \frac{57}{2023}\).

So finally, we have \[ \mathbb P(A \cup B) = \frac{404}{2023} + \frac{289}{2023} - \frac{57}{2023} = \frac{636}{2023} = 0.314 , \] just a tiny bit larger than \(\frac{11}{35}\)

B4. Eight friends are about to sit down at random at a round table. Find the probability that

(a) Ashley and Brook sit next to each other, with Chris directly opposite Brook;

Solution. Let \(\Omega\) be the sample space of ways the friends can sit around the table. This is an ordering problem, so \(|\Omega| = 8!\).

Let \(A\) be the event in the question. What is \(|A|\)? Well,

  • Ashley can sit anywhere, so has 8 choices of seat.
  • Brook can sit either directly to Ashley’s left or directly to Ashley’s right, so has 2 choices of seat.
  • Chris must sit directly opposite Brook, so only has 1 choice of seat.
  • The remaining five friends can fill up the remaining seats however they like, so have 5, 4, 3, 2, and 1 choices respectively.

Hence \(|A| = 8 \times 2 \times 1 \times 5 \times 4 \times 3 \times 2 \times 1\). Thus we get \[ \mathbb P(A) = \frac{|A|}{|\Omega|} = \frac{8 \times 2 \times 1 \times 5 \times 4 \times 3 \times 2 \times 1}{8 \times 7 \times 6 \times 5 \times 4 \times 3 \times 2 \times 1} = \frac{2 \times 1}{7 \times 6} = \frac{1}{21} . \]

Group feedback: As we have discussed more recently, after this Problem Sheet was assigned, often “classical probability” problems also can be equivalently solved by the step-by-step “chain rule” method. Can you use a chain rule argument to find the same answer as \[ \mathbb P(A) = 1 \times \frac27 \times \frac16 \times 1 \times 1 \times 1 \times 1 \times 1 = \frac{1}{21} ? \]

(b) neither Ashley, Brook nor Chris sit next to each other.

Solution. The sample space \(\Omega\) is as before. Let’s count the outcomes in \(B\), the event in the question.

  • Ashley can sit anywhere, so has 8 choices of seat.
  • Chris’s number of choices will depend on where Brook sits, so we’ll have to count Brook’s and Chris’s choices together:
    • Brook cannot sit next to Ashley.
    • If Brook sits next-but-one to Ashley – of which there are 2 choices – then Chris has 3 choices: Chris cannot sit on the seat directly between Ashley and Brook, nor directly next to Ashley on the other side, nor directly next to Brook on the other side, leaving \(6-3=3\) choices.
    • If Brook sits neither next nor next-but-one to Ashley – of which there are 3 choices – then Chris has 2 choices: he cannot sit to the right or left of Ashley, nor to the right or left of Brook, leaving \(6-4=2\) choices.
  • The remaining friends have 5, 4, 3, 2, and 1 choices again.

Hence, \(|B| = 8 \times (2\times 3 + 3 \times 2) \times 5 \times 4 \times 3 \times 2 \times 1\). So \[ \mathbb P(B) = \frac{|B|}{|\Omega|} = \frac{8 \times (2\times 3 + 3 \times 2) \times 5 \times 4 \times 3 \times 2 \times 1}{8 \times 7 \times 6 \times 5 \times 4 \times 3 \times 2 \times 1} = \frac{2\times 3 + 3 \times 2}{7 \times 6} = \frac{12}{42} = \frac{2}{7} . \]

Alternatively, in a previous year’s tutorial, a MATH1710 student suggested to me the following rather elegant solution. Suppose the five other friends are already sat at a round table with five chairs. Ashley, then Brook, then Chris will each bring along their own chair, and push into one of the gaps between the friends.

Ashley has 5 gaps to choose from, then Brook will have 6 gaps (Ashley joining the table will have increased the number of gaps by 1), then Chris will have 7, so the total number of ways they can push in is \(|\Omega| = 5 \times 6 \times 7\).

To not sit next to each other, Ashley can push in any of the 5 gaps, Brook only has \(6 - 2 = 4\) choices (not in the gap directly to the left or right of Ashley), and Chris only has \(7 - 4 = 3\) choices (not in the gaps directly to the left or right of Ashley nor the gaps directly to the left or right of Brook – these four gaps are distinct assuming Brook was not next to Ashley). Hence \(|B| = 5 \times 4 \times 3\), and we have \[ \mathbb P(B) = \frac{5 \times 4 \times 3}{5 \times 6 \times 7} = \frac{4 \times 3}{6 \times 7} = \frac{12}{42} = \frac{2}{7}. \]

Group feedback: Again, an equivalent answer can be derived using the step-by-step “chain rule” method.

B5. A “random digit” is a number chosen at random from \(\{0, 1, \dots, 9\}\), each with equal probability. A statistician chooses \(n\) random digits (with replacement).

(a) For \(k = 0, 1, \dots, 9\), let \(A_k\) be the event that all the digits are \(k\) or smaller. What is the probability of \(A_k\), as a function of \(k\) and \(n\)?

Solution. The sample space is \(\Omega = \{0,1,\dots,9\}^n\), the set of length-\(n\) sequences of digits between \(0\) and \(9\). The number of these is \(|\Omega| = 10^n\), as there are 10 choices for each of the \(n\) digits.

The event \(A_k\) is \(\{0,1,\dots,k\}^n\), the set of length-\(n\) sequences of digits that are between \(0\) and \(k\). The number of these is \(|A_k| = (k+1)^n\). (Note that it’s \(k+1\) because we’re allowing 0 as well.)

Hence, the probability is \[ \mathbb P(A_k) = \frac{|A_k|}{|\Omega|} = \frac{(k+1)^n}{10^n} . \]

(b) Let \(B_k\) be the event that the largest digit chosen is equal to \(k\). By finding a relationship between \(B_k\), \(A_{k-1}\) and \(A_k\), or otherwise, show that \[ \mathbb P(B_k) = \frac{(k+1)^n - k^n}{10^n} . \]

Solution. Consider the event \(A_k\) that all the digits are at most \(k\). Within \(A_k\), either one or more of the digits equal \(k\), in which case that \(k\) is the largest digit and we are in \(B_k\); or none of the digits equal \(k\), in which case they are all at most \(k-1\), and we are in \(A_{k-1}\). Only one of these two possibilitie can occur, so we have a disjoint union \[ A_k = B_k \cup A_{k-1} . \]

Applying Axiom 3 to the disjoint union gives \[ \mathbb P(A_k) = \mathbb P(B_k) + \mathbb P(A_{k-1}) . \] Rearranging this gives \[ \mathbb P(B_k) = \mathbb P(A_k) - \mathbb P(A_{k-1}) . \] Substituting in the answer from part (a) gives \[\mathbb P(B_k) = \frac{(k+1)^n}{10^n} - \frac{(k-1+1)^n}{10^n} = \frac{(k+1)^n - k^n}{10^n} . \]

C: Assessed questions

The last two questions are assessed questions. These two questions count for 3% of your final mark for this module.

The deadline for submitting your solutions is 2pm on Monday 30 October at the beginning of Week 5. You should submit a PDF to Gradescope. Your work will be marked by your tutor and returned on Monday 6 November, when solutions will also be made available.

Both questions are “long questions”, where the marks are not only for mathematical accuracy but also for the clarity and completeness of your explanatory writing.

You should not collaborate with others on the assessed questions: your answers must represent solely your own work. The University’s rules on academic integrity – and the related punishments for violating them – apply to your work on the assessed questions.

C1. Let \(\Omega\) be a sample space with a probability measure \(\mathbb P\), and let \(A, B \subset \Omega\) be events. For each of the following statements, state whether the statement is true or false (that is, always true or sometimes false). If it is true, briefly justify the statement; if it is false, give a counterexample.

(a) If \(\mathbb P(A) \leq \mathbb P(B)\), then \(A \subset B\).

Hint. Try to find a counterexample. Make sure you’re paying attention to the direction of implication (the other direction is true).

(b) \(\mathbb P(A \cap B) + \mathbb P(A \cap B^{\mathsf{c}}) = \mathbb P(A)\).

Hint. Is there a relevant disjoint union here?

(c) \(\mathbb P(A \cup B) \leq \mathbb P(A)\)

Hint. You’d expect the inequality to be the other way round – so it should be possible to find a counterexample.

(d) If \(A\) and \(B\) are disjoint, then \(\mathbb P((A \cup B)^{\mathsf{c}}) = 1 - \mathbb P(A) - \mathbb P(B)\).

Hint. Can you use the complement rule to start off with?

C2. An urn contains 15 balls: 4 red balls, 5 blue balls, and 6 green balls.

(a) If three balls are drawn with replacement, what is the probability that all three balls are the same colour?

Hint. If \(A\) is the event all three balls are the same colour, then we have a disjoint union \(A = A_{\text{red}} \cup A_{\text{blue}} \cup A_{\text{green}}\), where \(A_{\text{red}}\) is the event all three balls are red, and so on.

(b) If three balls are drawn without replacement, what is the probability that all three balls are different colours?

Hint. One way to do this is to look at the ordered collection of balls, and look at all \(3!\) possible orderings red-blue-green, red-green-blue, etc.

Another way is to look at the unordered collection, so the denominator is \(\binom{15}{3}\).

Solutions to short questions

A1. (a) (i) \(\{0,1,\dots, 4\}\) (ii) \(\{ \text{HHHH}, \text{HHHT}, \text{HHTH},\dots, \text{TTTT} \}\) (b) (i) 5 (ii) 16.
A2. (a) \(C \cap A^\mathsf{c}\) (b) \(A \cup B \cup C\) (c) \((B \cup C) \cap (B \cap C)^\mathsf{c}\) or \((B \cap C^\mathsf{c}) \cup (B^\mathsf{c}\cap C)\)
(d) \((A \cap B \cap C^\mathsf{c}) \cup (A \cap B^\mathsf{c}\cap C) \cup (A^\mathsf{c}\cap B \cap C)\) or other equivalent
A3. (a) 720 (b) 4092 (c) 1680 (d) 210
A4. (a) \(\frac{4}{25} = 0.16\) (b) \(\frac{2}{15} = 0.133\)