8 problems found
A coin is tossed repeatedly. The probability that a head appears is \(p\) and the probability that a tail appears is \(q = 1 - p\).
Solution:
In a game, I toss a coin repeatedly. The probability, \(p\), that the coin shows Heads on any given toss is given by \[ p= \frac N{N+1} \,, \] where \(N\) is a positive integer. The outcomes of any two tosses are independent. The game has two versions. In each version, I can choose to stop playing after any number of tosses, in which case I win £\(H\), where \(H\) is the number of Heads I have tossed. However, the game may end before that, in which case I win nothing.
Solution:
Solution:
Four players \(A\), \(B\), \(C\) and \(D\) play a coin-tossing game with a fair coin. Each player chooses a sequence of heads and tails, as follows: Player A: HHT; Player B: THH; Player C: TTH; Player D: HTT. The coin is then tossed until one of these sequences occurs, in which case the corresponding player is the winner.
Solution:
Two coins \(A\) and \(B\) are tossed together. \(A\) has probability \(p\) of showing a head, and \(B\) has probability \(2p\), independent of \(A\), of showing a head, where \(0 < p < \frac12\). The random variable \(X\) takes the value 1 if \(A\) shows a head and it takes the value \(0\) if \(A\) shows a tail. The random variable \(Y\) takes the value 1 if \(B\) shows a head and it takes the value \(0\) if \(B\) shows a tail. The random variable \(T\) is defined by \[ T= \lambda X + {\textstyle\frac12} (1-\lambda)Y. \] Show that \(\E(T)=p\) and find an expression for \(\var(T)\) in terms of \(p\) and \(\lambda\). Show that as \(\lambda\) varies, the minimum of \(\var(T)\) occurs when \[ \lambda =\frac{1-2p}{3-4p}\;. \] The two coins are tossed \(n\) times, where \(n>30\), and \(\overline{T}\) is the mean value of \(T\). Let \(b\) be a fixed positive number. Show that the maximum value of \(\P\big(\vert \overline{T}-p\vert < b\big)\) as \(\lambda\) varies is approximately \(2\Phi(b/s)-1\), where \(\Phi\) is the cumulative distribution function of a standard normal variate and \[ s^2= \frac{p(1-p)(1-2p)}{(3-4p)n}\;. \]
Solution: \begin{align*} && \E[T] &= \E[\lambda X + \tfrac12(1-\lambda)Y] \\ &&&= \lambda \E[X] + \tfrac12(1-\lambda) \E[Y] \\ &&&= \lambda p + \tfrac12 (1-\lambda) 2p \\ &&&= p \\ \\ && \var[T] &= \var[\lambda X + \tfrac12(1-\lambda)Y] \\ &&&= \lambda^2 \var[X] + \tfrac14(1-\lambda)^2 \var[Y] \\ &&&= \lambda^2 p(1-p) + \tfrac14(1-\lambda)^22p(1-2p) \\ &&&= p(\lambda^2 + \tfrac12(1-\lambda)^2) -p^2(\lambda^2+(1-\lambda)^2)\\ &&&= p(\tfrac32\lambda^2 - \lambda + \tfrac12) -p^2(2\lambda^2 -2\lambda + 2) \end{align*} Differentiating \(\var[T]\) with respect to \(\lambda\), and noting it is a quadratic with positive leading coefficient, we get \begin{align*} && \frac{\d \var[T]}{\d \lambda} &= p(2\lambda -(1-\lambda)) - p^2(2 \lambda -2(1-\lambda)) \\ &&&= p(3\lambda - 1)-p^2(4\lambda - 2) \\ \Rightarrow && \lambda(4p-3) &= 2p-1 \\ \Rightarrow && \lambda &= \frac{1-2p}{3-4p} \end{align*} By the central limit theorem \(\overline{T} \sim N(p, \frac{\sigma^2}{n})\) in particular, \(\mathbb{P}(|\overline{T} - p| < b) = \mathbb{P}(\left \lvert |\frac{\overline{T}-p}{\frac{\sigma}{\sqrt{n}}} \right \lvert < \frac{b}{\frac{\sigma}{\sqrt{n}}}) = \mathbb{P}(|Z| < \frac{b\sqrt{n}}{\sigma}) = 2\Phi(b/s) - 1\) where \(s = \frac{\sigma}{\sqrt{n}}\) so \begin{align*} && s^2 &= \frac1n \sigma^2 \\ &&&= \frac1n \left ( \left (\left ( \frac{1-2p}{3-4p} \right)^2 + \tfrac12 \left (1-\frac{1-2p}{3-4p} \right)^2 \right)p - \left ( \left ( \frac{1-2p}{3-4p} \right)^2 + \left (1-\frac{1-2p}{3-4p} \right)^2\right)p^2 \right) \\ &&&= \frac1n \left ( \left (\left ( \frac{1-2p}{3-4p} \right)^2 + \tfrac12 \left (\frac{2-2p}{3-4p} \right)^2 \right)p - \left ( \left ( \frac{1-2p}{3-4p} \right)^2 + \left (\frac{2-2p}{3-4p} \right)^2\right)p^2 \right) \\ &&&= \frac{p}{n(3-4p)^2} \left ( (1 -4p + 4p^2 + 2-4p+2p^2) - (1-4p+4p^2+4-8p+4p^2)p \right) \\ &&&= \frac{p}{n(3-4p)^2} \left (3-13p+18p^2-8p^3 \right) \\ &&&= \frac{p}{n(3-4p)^2} (3-4p)(1-2p)(1-p) \\ &&&= \frac{p(1-p)(1-2p)}{(3-4p)n} \end{align*}
The probability of throwing a head with a certain coin is \(p\) and the probability of throwing a tail is \(q=1-p\). The coin is thrown until at least two heads and at least two tails have been thrown; this happens when the coin has been thrown \(N\) times. Write down an expression for the probability that \(N=n\). Show that the expectation of \(N\) is $$ 2\bigg({1\over pq} -1-pq\bigg). $$
Solution: This can either occur via \(N-2\) heads and \(1\) tail in the first \(N-1\) flips, followed by a tail, or \(N-2\) tails and \(1\) head in the first \(N-1\) flips, followed by another head, ie \begin{align*} \mathbb{P}(N = n) &= \underbrace{\binom{n-1}{1}}_{\text{ways to choose when the first tail occurs}}p^{n-2}q^2 + \underbrace{\binom{n-1}{1}}_{\text{ways to choose when the first head occurs}}q^{n-2}p^2 \\ &= (n-1)p^2q^2(p^{n-4}+q^{n-4}) \\ \\ \mathbb{E}(N) &= \sum_{n=4}^{\infty} n \cdot \mathbb{P}(N = n) \\ &= \sum_{n=4}^{\infty} n \cdot (n-1)p^2q^2(p^{n-4}+q^{n-4}) \\ &= \sum_{n=4}^{\infty} n \cdot (n-1)(p^{n-2}q^2+q^{n-2}p^2) \\ &= q^2\sum_{n=4}^{\infty} n(n-1)p^{n-2}+p^2\sum_{n=4}^{\infty} n(n-1)q^{n-2} \\ &= q^2\left ( \sum_{n=2}^{\infty} n(n-1)p^{n-2} -2 \cdot 1 - 3 \cdot 2 \cdot p\right)+p^2\left ( \sum_{n=2}^{\infty} n(n-1)q^{n-2} - 2-6q\right) \\ &= q^2\left ( 2(1-p)^{-3} -2 - 6 p\right)+p^2\left ( 2(1-q)^{-3} - 2-6q\right) \\ &= q^2\left ( 2q^{-3} -2 - 6 p\right)+p^2\left ( 2p^{-3} - 2-6q\right) \\ &= \frac{2}{q} - 2q^2 - 6pq^2+\frac{2}{p} -2p^2-6p^2q \\ &= \frac{2}{q}+\frac2p - 2(p^2+q^2) - 6pq \\ &= \frac{2}{pq} - 2((p+q)^2-2pq) - 6pq \\ &= \frac{2}{pq} - 2 -2pq \\ &= 2 \left (\frac1{pq} - 1 - pq \right) \end{align*}
A coin has probability \(p\) (\(0 < p < 1\)) of showing a head when tossed. Give a careful argument to show that the \(k\)th head in a series of consecutive tosses is achieved after exactly \(n\) tosses with probability \[ \binom{n-1}{k-1}p^{k}(1-p)^{n-k}\qquad(n\geqslant k). \] Given that it took an even number of tosses to achieve exactly \(k-1\) heads, find the probability that exactly \(k\) heads are achieved after an even number of tosses. If this coin is tossed until exactly 3 heads are obtained, what is the probability that exactly 2 of the heads occur on even-numbered tosses?
Solution: We must have a sequence consisting of \(\underbrace{HTT\cdots TH}_{k-1\text{ heads and }n-k\text{ tails}}\underbrace{H}_{k\text{th head}}\). There are \(\binom{n-1}{k-1}\) ways to chose how to place the \(k-1\) heads in the first \(n-1\) flips, and each sequence has probability \(p^{k-1}(1-p)^{n-k}p\) which gives a probability of \(\displaystyle \binom{n-1}{k-1} p^k (1-p)^{n-k}\). Given that it took an even number of tosses to achieve \(k-1\) heads, this is equivalent to the problem of what is the probability that the first head occurs on an even flip, ie \begin{align*} \mathbb{P}(\text{even flip}) &= \mathbb{P}(2\text{nd flip}) +\mathbb{P}(4\text{th flip}) +\mathbb{P}(6\text{th flip}) + \cdots \\ &= (1-p)p + (1-p)^3p + (1-p)^5p + \cdots \\ &= (1-p)p \left ( \sum_{r=0}^\infty (1-p)^{2r}\right) \\ &= \frac{p(1-p)}{1-(1-p)^2} \\ &= \frac{p(1-p)}{2p-p^2} \\ &= \frac{1-p}{2-p} \end{align*} The ways to achieve \(2\) heads on even tosses are \(EEO\), \(EOE\), \(OEE\). The probability of going from \(O\) to \(E\) is the same as the initial probability of an \(O\) flip, etc. Therefore \begin{align*} \mathbb{P}(EEO) &=\left( \frac{1-p}{2-p} \right)^2 \left ( 1- \frac{1-p}{2-p} \right) \\ &= \left( \frac{1-p}{2-p} \right)^2 \left ( \frac{1}{2-p} \right) \\ \mathbb{P}(EOE) &= \left( \frac{1-p}{2-p} \right) \left ( \frac{1}{2-p} \right)^2 \\ \mathbb{P}(OEE) &= \left ( \frac{1}{2-p} \right)^2 \left( \frac{1-p}{2-p} \right)\\ \mathbb{P}(2 \text{ heads on even tosses}) &= \frac{(1-p)^2 + 2(1-p)}{(2-p)^3} \\ &= \frac{(1-p)(2-p)}{(2-p)^3} \\ &= \frac{1-p}{(2-p)^2} \end{align*}