Problems

Filters
Clear Filters

5 problems found

2013 Paper 2 Q13
D: 1600.0 B: 1516.0

A biased coin has probability \(p\) of showing a head and probability \(q\) of showing a tail, where \(p\ne0\), \(q\ne0\) and \(p\ne q\). When the coin is tossed repeatedly, runs occur. A straight run of length \(n\) is a sequence of \(n\) consecutive heads or \(n\) consecutive tails. An alternating run of length \(n\) is a sequence of length \(n\) alternating between heads and tails. An alternating run can start with either a head or a tail. Let \(S\) be the length of the longest straight run beginning with the first toss and let \(A\) be the length of the longest alternating run beginning with the first toss.

  1. Explain why \(\P(A=1)=p^2+q^2\) and find \(\P(S=1)\). Show that \(\P(S=1)<\P(A=1)\).
  2. Show that \(\P(S=2)= \P(A=2)\) and determine the relationship between \(\P(S=3)\) and \( \P(A=3)\).
  3. Show that, for \(n>1\), \(\P(S=2n)>\P(A=2n)\) and determine the corresponding relationship between \(\P(S=2n+1)\) and \(\P(A=2n+1)\). [You are advised not to use \(p+q=1\) in this part.]


Solution:

  1. The only way \(A = 1\) is if we get \(HH\) or \(TT\) which has probability \(p^2+q^2\). The only way we get \(S=1\) is if we have \(HT\) to \(TH\), ie \(2pq\). Since \((p-q)^2 = p^2 + q^2 - 2pq >0\) we must have \(\mathbb{P}(A=1) > \mathbb{P}(S=1)\).
  2. \(\,\) \begin{align*} \mathbb{P}(S=2) &= p^2q + q^2p \\ \mathbb{P}(A=2) &= pq^2 + qp^2 = \mathbb{P}(S=2) \\ \\ \mathbb{P}(S=3) &= p^3q + q^3p = pq(p^2+q^2) \\ \mathbb{P}(A=3) &= pqp^2 + qpq^2 = pq(p^2+q^2) = \mathbb{P}(S=3) \end{align*}
  3. For \(n > 1\) we must have \begin{align*} && \mathbb{P}(S = 2n) &= p^{2n}q + q^{2n}p \\ && \mathbb{P}(A=2n) &= (pq)^{n}q + (qp)^{n}p \\ &&&= p^nq^{n+1} + q^np^{n+1} \\ && \mathbb{P}(S = 2n) &> \mathbb{P}(A = 2n) \\ \Leftrightarrow && p^{2n}q + q^{2n}p & > p^nq^{n+1} + q^np^{n+1}\\ \Leftrightarrow && 0 & < p^{2n}q+q^{2n}p - p^nq^{n+1} -q^np^{n+1}\\ &&&= (p^n-q^n)(qp^n - pq^n) \end{align*} which is clearly true. \begin{align*} && \mathbb{P}(S=2n+1) &= p^{2n+1}q + q^{2n+1}p \\ && \mathbb{P}(A=2n+1) &= (pq)^{n}p^2 + (qp)^{n}q^2 \\ &&&= p^{n+2}q^n + q^{n+2}p^n \end{align*} The same factoring logic shows that \(\mathbb{P}(S = 2n+1) > \mathbb{P}(A=2n+1)\)

2002 Paper 3 Q12
D: 1700.0 B: 1502.1

In a game, a player tosses a biased coin repeatedly until two successive tails occur, when the game terminates. For each head which occurs the player wins \(\pounds 1\). If \(E\) is the expected number of tosses of the coin in the course of a game, and \(p\) is the probability of a head, explain why \[ E = p \l 1 + E \r + \l 1 - p \r p \l 2 + E \r + 2 \l 1 - p \r ^2\,, \] and hence determine \(E\) in terms of \(p\). Find also, in terms of \(p\), the expected winnings in the course of a game. A second game is played, with the same rules, except that the player continues to toss the coin until \(r\) successive tails occur. Show that the expected number of tosses in the course of a game is given by the expression \(\displaystyle {1 - q^r \over p q^r}\,\), where \(q = 1 - p\).

1998 Paper 3 Q13
D: 1700.0 B: 1500.0

Write down the probability of obtaining \(k\) heads in \(n\) tosses of a fair coin. Now suppose that \(k\) is known but \(n\) is unknown. A maximum likelihood estimator (MLE) of \(n\) is defined to be a value (which must be an integer) of \(n\) which maximizes the probability of \(k\) heads. A friend has thrown a fair coin a number of times. She tells you that she has observed one head. Show that in this case there are two MLEs of the number of tosses she has made. She now tells you that in a repeat of the exercise she has observed \(k\) heads. Find the two MLEs of the number of tosses she has made. She next uses a coin biased with probability \(p\) (known) of showing a head, and again tells you that she has observed \(k\) heads. Find the MLEs of the number of tosses made. What is the condition for the MLE to be unique?


Solution: \begin{align*} && \mathbb{P}(k \text{ heads} | n\text{ tosses}) &= \binom{n}k 2^{-n} \\ && \mathbb{P}(1 \text{ head} | n\text{ tosses}) &= n2^{-n} \\ \Rightarrow && \frac{ \mathbb{P}(1 \text{ head} | n+1\text{ tosses}) }{ \mathbb{P}(1 \text{ head} | n\text{ tosses}) } &= \frac{n+1}{2n} \end{align*} Which is less than \(1\) unless \(n \geq 1\). Therefore the MLE is \(n = 1\) or \(n= 2\). \begin{align*} \frac{ \mathbb{P}(k \text{ head} | n+1\text{ tosses}) }{ \mathbb{P}(k \text{ head} | n\text{ tosses}) } &= \frac{\binom{n+1}{k}}{2 \binom{n}{k}} \\ &= \frac{(n+1)!(n-k)!}{2n!(n+1-k)!} \\ &= \frac{n+1}{2(n+1-k)} \end{align*} This is less than or equal to \(1\) if \(n+1 = 2(n+1-k) \Leftrightarrow n= 2k-1\), therefore the MLEs are \(2k-1\) and \(2k\). If the coin is biased, we have \begin{align*} && \frac{ \mathbb{P}(k \text{ head} | n+1\text{ tosses}) }{ \mathbb{P}(k \text{ head} | n\text{ tosses}) } &= \frac{\binom{n+1}{k}p^kq^{n+1-k}}{\binom{n}{k}p^kq^{n-k}} \\ &&&= \frac{n+1}{(n+1-k)}q \\ \\ && 1 & \geq \frac{n+1}{(n+1-k)}q \\ \Leftrightarrow && (n+1)(1-q) &\geq k \\ \Leftrightarrow && n+1 & \geq \frac{k}{p} \end{align*} Therefore the probability is increasing until \(n+1 \geq \frac{k}{p}\). If \(\frac{k}p\) is an integer the MLEs are \(\frac{k}{p}-1\) and \(\frac{k}p\), otherwise it is \(\lfloor \frac{k}{p} \rfloor\) and the MLE is unique.

1997 Paper 3 Q12
D: 1700.0 B: 1500.0

  1. I toss a biased coin which has a probability \(p\) of landing heads and a probability \(q=1-p\) of landing tails. Let \(K\) be the number of tosses required to obtain the first head and let \[ \mathrm{G}(s)=\sum_{k=1}^{\infty}\mathrm{P}(K=k)s^{k}. \] Show that \[ \mathrm{G}(s)=\frac{ps}{1-qs} \] and hence find the expectation and variance of \(K\).
  2. I sample cards at random with replacement from a normal pack of \(52\). Let \(N\) be the total number of draws I make in order to sample every card at least once. By expressing \(N\) as a sum \(N=N_{1}+N_{2}+\cdots+N_{52}\) of random variables, or otherwise, find the expectation of \(N\). Estimate the numerical value of this expectation, using the approximations \(\mathrm{e}\approx2.7\) and \(1+\frac{1}{2}+\frac{1}{3}+\cdots+\frac{1}{n}\approx0.5+\ln n\) if \(n\) is large.


Solution:

  1. Let \(N_i\) be the number of draws between the \((i-1)\)th new card and the \(i\)th new card. (Where \(N_1 = 1\)0 then \(N_i \sim K\) with \(p = \frac{53-i}{52}\)). Therefore \begin{align*} \E[N] &= \E[N_1 + \cdots + N_{52}] \\ &= \E[N_1] + \cdots + \E[N_i] + \cdots + \E[N_{52}] \\ &= 1 + \frac{52}{51} + \cdots + \frac{52}{53-k} + \cdots + \frac{52}{1} \\ &= 52 \left (1 + \frac{1}{2} + \cdots + \frac{1}{52} \right) \\ &= 52 \cdot \left ( 1 + \ln 52 \right) \end{align*} Notice that \(2.7 \times 2.7 = 7.29\) and \(7.3 \times 7.3 \approx 53.3\) so \(\ln 52 \approx 4\) and so our number is \(\approx 52 \cdot 4.5 =234\). [The correct answer actual number is 235.9782]

1996 Paper 1 Q14
D: 1484.0 B: 1484.0

A biased coin, with a probability \(p\) of coming up heads and a probability \(q=1-p\) of coming up tails, is tossed repeatedly. Let \(A\) be the event that the first run of \(r\) successive heads occurs before the first run of \(s\) successive tails. If \(H\) is the even that on the first toss the coin comes up heads and \(T\) is the event that it comes up tails, show that \begin{alignat*}{1} \mathrm{P}(A|H) & =p^{\alpha}+(1-p^{\alpha})\mathrm{P}(A|T),\\ \mathrm{P}(A|T) & =(1-q^{\beta})\mathrm{P}(A|H), \end{alignat*} where \(\alpha\) and \(\beta\) are to be determined. Use these two equations to find \(\mathrm{P}(A|H),\) \(\mathrm{P}(A|T),\) and hence \(\mathrm{P}(A).\)


Solution: \begin{align*} && \P(A|H) &= \P(\text{achieve }r\text{ heads immediately}) + \P(\text{don't and then achieve it from having flipped a tail}) \\ &&&= p^{r-1} + (1-p^{r-1}) \cdot \P(A|T) \\ && \P(A|T) &= (1-q^{s-1})\P(A|H) \\ \\ &&\P(A|H) &= p^{r-1}+(1-p^{r-1})(1-q^{s-1})\P(A|H) \\ \Rightarrow && \P(A|H) &= \frac{p^{r-1}}{1-(1-p^{r-1})(1-q^{s-1})} \\ && \P(A|T) &= \frac{(1-q^{s-1})p^{r-1}}{1-(1-p^{r-1})(1-q^{s-1})} \\ && \P(A) &= \frac{(2-q^{s-1})p^{r-1}}{2(1-(1-p^{r-1})(1-q^{s-1}))} \end{align*}