5 problems found
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.
Solution:
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\).
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.
Solution:
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*}