Solution

ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2023/discrete-mathematics-probability-and-continuous-mathematics/8/c/solution

The given four probabilities factor into independent Bernoulli indicators for the occurrence of and on each trial, with parameters and . Independent trials make the full sequence of indicators independent of the full sequence of indicators. Let count trials strictly before the first . Then , independently of the indicators, and the desired count is their sum over these trials. Therefore its distribution is , as in part (b).
The word “before” excludes the stopping trial: an on that trial stops the experiment but does not add to the count. Another check is to discard all trials. Among the remaining relevant outcomes, stopping has probability and an additional pre-stopping has the complementary probability, again giving the same zero-based geometric distribution.

New to topics? Read the docs here!