40 problems found
Solution:
Let \(X\) be a random variable with a Laplace distribution, so that its probability density function is given by \[ \f(x) = \frac12 \e^{-\vert x \vert }\;, \text{ \(-\infty < x < \infty \)}. \tag{\(*\)} \] Sketch \(\f(x)\). Show that its moment generating function \({\rm M}_X(\theta)\) is given by \({\rm M}_X(\theta)= (1-\theta^2)^{-1}\) and hence find the variance of \(X\). A frog is jumping up and down, attempting to land on the same spot each time. In fact, in each of \(n\) successive jumps he always lands on a fixed straight line but when he lands from the \(i\)th jump (\(i=1\,,2\,,\ldots\,,n\)) his displacement from the point from which he jumped is \(X_i\,\)cm, where \(X_i\) has the distribution \((*)\). His displacement from his starting point after \(n\) jumps is \(Y\,\)cm (so that \(Y=\sum\limits_{i=1}^n X_i\)). Each jump is independent of the others. Obtain the moment generating function for \(Y/ \sqrt {2n}\) and, by considering its logarithm, show that this moment generating function tends to \(\exp(\frac12\theta^2)\) as \(n\to\infty\). Given that \(\exp(\frac12\theta^2)\) is the moment generating function of the standard Normal random variable, estimate the least number of jumps such that there is a \(5\%\) chance that the frog lands 25 cm or more from his starting point.
Solution:
A box contains \(n\) pieces of string, each of which has two ends. I select two string ends at random and tie them together. This creates either a ring (if the two ends are from the same string) or a longer piece of string. I repeat the process of tying together string ends chosen at random until there are none left. Find the expected number of rings created at the first step and hence obtain an expression for the expected number of rings created by the end of the process. Find also an expression for the variance of the number of rings created. Given that \(\ln 20 \approx 3\) and that \(1+ \frac12 + \cdots + \frac 1n \approx \ln n\) for large \(n\), determine approximately the expected number of rings created in the case \(n=40\,000\).
Solution: Let \(X_i\) be the indicator variable a loop is formed when there are \(i\) strings in the bag, so \(\mathbb{P}(X_i = 1) = \frac{1}{2i-1}\). Therefore \begin{align*} && Y_n &= X_n + Y_{n-1} \\ && Y_n &= X_n + \cdots + X_1 \\ \Rightarrow && \E[Y_n] &= \frac{1}{2n-1} + \frac{1}{2n-3} + \cdots + \frac{1}{1} \\ && \var[Y_n] &= \sum_{i=1}^n \frac{1}{2i-1} \frac{2i-2}{2i-1} \\ &&&= 2\sum_{i=1}^n \frac{i-1}{(2i-1)^2} \end{align*} \begin{align*} && \E[Y_{n}] &= 1 + \frac13 + \cdots + \frac{1}{2n-1} \\ &&&= 1 + \frac12 + \cdots + \frac1{2n} - \frac12\left (1 + \frac12 + \cdots + \frac1n \right) \\ &&&\approx \ln 2n -\frac12 \ln n \\ &&&= \ln 2 \sqrt{n} \\ \\ && \E[Y_{40\,000}] &= \ln 2 \sqrt{40\,000} \\ &&&= \ln 400 \\ &&&= 2 \ln 20 \approx 6 \end{align*}
I choose a number from the integers \(1, 2, \ldots, (2n-1)\) and the outcome is the random variable \(N\). Calculate \( \E(N)\) and \(\E(N^2)\). I then repeat a certain experiment \(N\) times, the outcome of the \(i\)th experiment being the random variable \(X_i\) (\(1\le i \le N\)). For each \(i\), the random variable \(X_i\) has mean \(\mu\) and variance \(\sigma^2\), and \(X_i\) is independent of \(X_j\) for \(i\ne j\) and also independent of \(N\). The random variable \(Y\) is defined by \(Y= \sum\limits_{i=1}^NX_i\). Show that \(\E(Y)=n\mu\) and that \(\mathrm{Cov}(Y,N) = \frac13n(n-1)\mu\). Find \(\var(Y) \) in terms of \(n\), \(\sigma^2\) and \(\mu\).
Solution: \begin{align*} && \E[N] &= \sum_{i=1}^{2n-1} \frac{i}{2n-1} \\ &&&= \frac{2n(2n-1)}{2(2n-1)} = n\\ && \E[N^2] &= \sum_{i=1}^{2n-1} \frac{i^2}{2n-1} \\ &&&= \frac{(2n-1)(2n)(4n-1)}{6(2n-1)} \\ &&&= \frac{n(4n-1)}{3} \\ && \var[N] &= \frac{n(4n-1)}{3} - n^2 \\ &&&= \frac{n^2-n}{3} \end{align*} \begin{align*} && \E[Y] &= \E \left [ \E \left [ \sum_{i=1}^N X_i | N = k\right] \right]\\ &&&= \E \left[ N\mu \right] = n\mu \\ \\ && \mathrm{Cov}(Y,N) &= \mathbb{E}[XY] - \E[X]\E[Y] \\ &&&= \E \left [ \E \left [N \sum_{i=1}^N X_i | N = k\right] \right] - n^2 \mu \\ &&&= \E[N^2\mu] - n^2 \mu \\ &&&= \left ( \frac{n^2(4n-1)}{3} - n^2 \right) \mu \\ &&&= \frac{n^2-n}{3}\mu \\ \\ && \E[Y^2] &= \E \left [ \E \left [ \left ( \sum_{i=1}^N X_i \right) ^2\right ] \right] \\ &&&= \E \left [ \E \left [ \sum_{i=1}^N X_i ^2 + 2\sum_{i,j} X_iX_j\right ] \right] \\ &&&= \E \left [ \sum_{i=1}^N \left ( \E[X_i ^2] + 2\sum_{i,j} \E[X_i]\E[X_j]\right ) \right] \\ &&&= \E \left [ N(\sigma^2 + \mu^2) + (N^2-N)\mu^2\right] \\ &&&= n(\sigma^2+\mu^2) + \left ( \frac{n^2-n}{3}-n \right)\mu^2 \\ &&&= n\sigma^2 + \frac{n^2-n}{3} \mu^2 \\ \Rightarrow && \var[Y] &= n\sigma^2 + \frac{n^2-n}{3} \mu^2 - n^2\mu^2 \\ &&&= n\sigma^2 - \frac{2n^2+n}{3} \mu^2 \end{align*}
For any random variables \(X_1\) and \(X_2\), state the relationship between \(\E(aX_1+bX_2)\) and \(\E(X_1)\) and \(\E(X_2)\), where \(a\) and \(b\) are constants. If \(X_1\) and \(X_2\) are independent, state the relationship between \(\E(X_1X_2)\) and \(\E(X_1)\) and \(\E(X_2)\). An industrial process produces rectangular plates. The length and the breadth of the plates are modelled by independent random variables \(X_1\) and \(X_2\) with non-zero means \(\mu_1\) and \(\mu_2\) and non-zero standard deviations \(\sigma_1\) and \(\sigma_2\), respectively. Using the results in the paragraph above, and without quoting a formula for \(\var(aX_1+bX_2)\), find the means and standard deviations of the perimeter \(P\) and area \(A\) of the plates. Show that \(P\) and \(A\) are not independent. The random variable \(Z\) is defined by \(Z=P-\alpha A\), where \(\alpha \) is a constant. Show that \(Z\) and \(A\) are not independent if \[ \alpha \ne \dfrac{2(\mu_1^{\vphantom2} \sigma_2^2 +\mu_2^{\vphantom2}\sigma_1^2)} { \mu_1^2 \sigma_2^2 +\mu_2^2\sigma_1^2 + \sigma_1^2\sigma_2^2 } \;. \] Given that \(X_1\) and \(X_2\) can each take values 1 and 3 only, and that they each take these values with probability \(\frac 12\), show that \(Z\) and \(A\) are not independent for any value of \(\alpha\).
Solution: \(\E(aX_1+bX_2) = a \E(X_1) + b\E(X_2)\) for any \(X_1, X_2\) \(\E(X_1X_2)=\E(X_1)\E(X_2)\). if \(X_1, X_2\) are independent. \begin{align*} && \E(P) &= \E(2(X_1+X_2)) = 2(\E[X_1]+\E[X_2]) \\ &&&= 2(\mu_1 + \mu_2) \\ && \var(P) &= \E[\left ( 2(X_1+X_2) \right)^2] - \E[2(X_1+X_2)]^2 \\ &&&= 4\E[X_1^2+2X_1X_2+X_2^2] -4(\mu_1 + \mu_2)^2 \\ &&&= 4(\mu_1^2 + \sigma_1^2 + 2\mu_1\mu_2 + \mu_2^2 + \sigma_2^2) - 4(\mu_1 + \mu_2)^2 \\ &&&= 4(\sigma_1^2+\sigma_2^2) \\ && \textrm{SD}(P) &= 2 \sqrt{\sigma_1^2+\sigma_2^2}\\ \\ && \E(A) &= \E[X_1X_2] = \E[X_1]\E[X_2] \\ &&&= \mu_1\mu_2 \\ && \var(A) &= \E[(X_1X_2)^2] - (\mu_1\mu_2)^2 \\ &&&= (\mu_1^2+\sigma_1^2)(\mu_2^2+\sigma_2^2) - (\mu_1\mu_2)^2\\ &&&= \mu_1^2 \sigma_2^2 + \mu_2^2 \sigma_1^2 + \sigma_1^2 \sigma_2^2\\ && \textrm{SD}(A) &= \sqrt{\mu_1^2 \sigma_2^2 + \mu_2^2 \sigma_1^2 + \sigma_1^2 \sigma_2^2} \end{align*} \begin{align*} \E[PA] &= \E[2(X_1+X_2)X_1X_2] \\ &= 2\E[X_1^2X_2] + 2\E[X_1X_2^2]\\ &= 2(\mu_1^2 + \sigma_1^2)\mu_2 + 2\mu_1 (\mu_2^2+\sigma_2^2)\\ &\neq 2(\mu_1 + \mu_2)\mu_1\mu_2 \\ &= \E[P]\E[A] \end{align*} \begin{align*} && \E[Z] &= \E[P] - \alpha \E[A] \\ &&&= 2(\mu_1+\mu_2) - \alpha \mu_1 \mu_2 \\ \\ && \E[ZA] &= \E[PA - \alpha A^2] \\ &&&= 2(\mu_1^2 + \sigma_1^2)\mu_2 + 2\mu_1 (\mu_2^2+\sigma_2^2) - \alpha \E[A^2] \\ &&&= 2(\mu_1^2 + \sigma_1^2)\mu_2 + 2\mu_1 (\mu_2^2+\sigma_2^2) - \alpha \E[X_1^2]\E[X_2^2] \\ &&&= 2(\mu_1^2 + \sigma_1^2)\mu_2 + 2\mu_1 (\mu_2^2+\sigma_2^2) - \alpha (\mu_1^2+\sigma_1^2)(\mu_2^2+\sigma_2^2) \\ \text{if ind.} && \E[Z]\E[A] &= \E[ZA]\\ && (2(\mu_1+\mu_2) - \alpha \mu_1 \mu_2) \mu_1\mu_2 &= 2(\mu_1^2 + \sigma_1^2)\mu_2 + 2\mu_1 (\mu_2^2+\sigma_2^2) - \alpha (\mu_1^2+\sigma_1^2)(\mu_2^2+\sigma_2^2) \\ \Rightarrow && 2(\mu_1^2\mu_2+\mu_1\mu_2^2) - \alpha \mu_1^2\mu_2^2 &= 2(\mu_1^2\mu_2+\mu_1\mu_2^2) + 2\sigma_1^2\mu_2 + 2\sigma_2^2\mu_1 - \alpha (\mu_1^2+\sigma_1^2)(\mu_2^2+\sigma_2^2) \\ \Rightarrow && \alpha ((\mu_1^2+\sigma_1^2)(\mu_2^2+\sigma_2^2) - \mu_1^2\mu_2^2) &= 2(\sigma_1^2\mu_2 + \sigma_2^2\mu_1) \\ \Rightarrow && \alpha &= \frac{ 2(\sigma_1^2\mu_2 + \sigma_2^2\mu_1) }{\mu_1^2 \sigma_2^2 + \mu_2^2 \sigma_1^2 + \sigma_1^2 \sigma_2^2} \end{align*} Therefore if they are not independent if \(\alpha \neq \) the expression. \begin{array}{c|c|c|c|c|c} & X_1 & X_2 & A & P & Z \\ \hline 0.25 & 1 & 1 & 1 & 4 & 4-\alpha \\ 0.25 & 1 & 3 & 3 & 8 & 8-3\alpha \\ 0.25 & 3 & 1 & 3 & 8 & 8-3\alpha \\ 0.25 & 3 & 3 & 9 & 12 & 12-9\alpha \\ \end{array} If \(\mathbb{P}(A = 1, Z = 4-\alpha) = \mathbb{P}(A = 1)\mathbb{P}(Z = 4-\alpha)\) then \(\mathbb{P}(Z = 4-\alpha) = 1\), but that mean \(4-\alpha = 8-3\alpha = 12-9\alpha\) which is not a consistent set of equations as the first two are solved by \(\alpha = 2\) and the second by \(\alpha = \frac23\)
The random variable \(X\) can take the value \(X=-1\), and also any value in the range \(0\le X <\infty\,\). The distribution of \(X\) is given by \[ \P(X=-1) =m \,, \ \ \ \ \ \ \ \P(0\le X\le x) = k(1-\e^{-x})\,, \] for any non-negative number \(x\), where \(k\) and \(m\) are constants, and \(m <\frac12\,\).
Solution:
A team of \(m\) players, numbered from \(1\) to \(m\), puts on a set of a \(m\) shirts, similarly numbered from \(1\) to \(m\). The players change in a hurry, so that the shirts are assigned to them randomly, one to each player. Let \(C_i\) be the random variable that takes the value \(1\) if player \(i\) is wearing shirt \(i\), and 0 otherwise. Show that \(\mathrm{E}\left(C_1\right)={1 \over m}\) and find \(\var \left(C_1\right)\) and \(\mathrm{Cov}\left(C_1 \, , \; C_2 \right) \,\). Let \(\, N = C_1 + C_2 + \cdots + C_m \,\) be the random variable whose value is the number of players who are wearing the correct shirt. Show that \(\mathrm{E}\left(N\right)= \var \left(N\right) = 1 \,\). Explain why a Normal approximation to \(N\) is not likely to be appropriate for any \(m\), but that a Poisson approximation might be reasonable. In the case \(m = 4\), find, by listing equally likely possibilities or otherwise, the probability that no player is wearing the correct shirt and verify that an appropriate Poisson approximation to \(N\) gives this probability with a relative error of about \(2\%\). [Use \(\e \approx 2\frac{72}{100} \,\).]
Solution: There are \(m!\) different ways of assigning the shirts, and in \((m-1)!\) of them player \(1\) gets their own shirt, ie \(\mathbb{E}(C_1) = \mathbb{P}(\text{player }1\text{ gets own shirt}) = \frac{(m-1)!}{m!} = \frac{1}{m}\). \(\var(C_1) = \mathbb{E}(C_1^2) - [\mathbb{E}(C_1)]^2 = \frac{1}{m} - \frac{1}{m^2} = \frac{m-1}{m^2}\). If we have two players, there are \((m-2)!\) ways they both get their own shirts, therefore \(\textrm{Cov}(C_1,C_2) = \mathbb{E}(C_1C_2) - \mathbb{E}(C_1)\mathbb{E}(C_2) = \frac{(m-2)!}{m!} - \frac{1}{m^2} = \frac{1}{m(m-1)} - \frac{1}{m^2} = \frac{m-m+1}{m^2(m-1)} = \frac{1}{m^2(m-1)}\). \begin{align*} \mathbb{E}(N) &= \mathbb{E}(C_1 + C_2 + \cdots + C_m) \\ &= \mathbb{E}(C_1) + \mathbb{E}(C_2) + \cdots + \mathbb{E}(C_m) \\ &= \frac{1}{m} + \frac{1}{m} +\cdots+ \frac1m \\ &= 1 \\ \\ \var(N) &= \sum_{r=1}^m \var(C_r) + 2\sum_{r=1}^{m-1} \sum_{s=2}^{m} \textrm{Cov}(C_r,C_s) \\ &= m \frac{m-1}{m^2} + 2 \frac{m(m-1)}{2}\frac{1}{m^2(m-1)} \\ &=\frac{m-1}{m} + \frac{1}{m} \\ &= 1 \end{align*} If we were to take a normal approximation, we would want to take \(N(1,1)\), but this would say things like \(-1\) is as likely as \(3\) shirts being correct, which is clearly a bad model. A Poisson is much more likely to be a sensible model as they have the same mean and variance as the parameter, and if \(m\) is large, the covariance between shirts is going to be very small, so it will appear similar to random events occurring. We can have \begin{align*} BADC \\ BCDA \\ BDAC \\ CADB \\ CDAB\\ CDBA \\ DABC\\ DCAB \\ DCBA \end{align*} Ie \(\frac{9}{24}\) ways to have no player wearing their own shirt with \(4\) players. \(Po(1)\) would say this probability is \(e^{-1}\), giving a relative error of: \begin{align*} \frac{e^{-1}-\frac{9}{24}}{\frac9{24}} &\approx \frac{\frac{100}{272} - \frac{9}{24}}{\frac9{24}} \\ &= -\frac{1}{51} \\ &\approx -2\% \end{align*}
Let \(\F(x)\) be the cumulative distribution function of a random variable \(X\), which satisfies \(\F(a)=0\) and \(\F(b)=1\), where \(a>0\). Let \[ \G(y) = \frac{\F(y)}{2-\F(y)}\;. \] Show that \(\G(a)=0\,\), \(\G(b)=1\,\) and that \(\G'(y)\ge0\,\). Show also that \[ \frac12 \le \frac2{(2-\F(y))^2} \le 2\;. \] The random variable \(Y\) has cumulative distribution function \(\G(y)\,\). Show that \[ { \tfrac12} \,\E(X) \le \E(Y) \le 2 \E(X) \;, \] and that \[ \var(Y) \le 2\var(X) +\tfrac 74 \big(\E(X)\big)^2\;. \]
Solution: \begin{align*} && G(a) &= \frac{F(a)}{2-F(a)}\\ &&&= 0 \tag{\(F(a)= 0\)}\\ \\ && G(b) &= \frac{F(b)}{2-F(b)} \\ &&&= \frac{1}{2-1} = 1 \tag{\(F(b)=1\)}\\ \\ && G'(y) &= \frac{F'(y)(2-F(y))+F(y)F'(y)}{(2-F(y))^2} \\ &&&= \frac{2F'(y)}{(2-F(y))^2} \geq 0 \tag{\(F'(y) \geq 0\)} \end{align*} \begin{align*} && 0 \leq F(y)\leq1\\ \Leftrightarrow&& 1\leq 2-F(y) \leq 2\\ \Leftrightarrow &&1 \leq (2-F(y))^2 \leq 4\\ \Leftrightarrow && 1 \geq \frac{1}{(2-F(y))^2} \geq \frac14 \\ \Leftrightarrow && 2 \geq \frac{2}{(2-F(y))^2} \geq\frac12 \end{align*} \begin{align*} && \mathbb{E}(Y) &= \int_a^b y G'(y) \d y \\ &&&= \int_a^b y F'(y) \underbrace{\frac{2}{(2-F(y))^2}}_{\in [\frac12, 2]} \d y \\ &&&\leq 2 \E[X] \\ &&&\geq \frac12 \E[X]\\ \\ && \E[Y^2] &\leq 2\E[X^2] \\ && \E[Y^2] &\geq \frac12\E[X^2] \\ \\ \Rightarrow && \var[Y] &= \E[Y^2]-\E[Y]^2 \\ &&& \leq 2 \E[X^2] - (\tfrac12\E[X])^2 \\ &&&= 2 \var[X] + \tfrac74(\E[X])^2 \end{align*}
Prove that, for any two discrete random variables \(X\) and \(Y\), \[ \mathrm{Var} \left(X + Y \right) = \mathrm{Var}(X) + \mathrm{Var}(Y) + 2 \, \mathrm{Cov}(X,Y), \] where \(\mathrm{Var}(X)\) is the variance of \(X\) and \(\mathrm{Cov}(X,Y)\) is the covariance of \(X\) and \(Y\). When a Grandmaster plays a sequence of \(m\) games of chess, she is, independently, equally likely to win, lose or draw each game. If the values of the random variables \(W\), \(L\) and \(D\) are the numbers of her wins, losses and draws respectively, justify briefly the following claims:
Solution: \begin{align*} && \var[X+Y] &= \E\left [(X+Y-\E[X+Y])^2 \right] \\ &&&= \E \left [ (X - \E[X] + Y - \E[Y])^2 \right] \\ &&&= \E \left [(X - \E[X])^2 + (Y-\E[Y])^2 + 2(X-\E[X])(Y-\E[Y]) \right] \\ &&&= \E \left [(X - \E[X])^2 \right]+\E \left [(Y-\E[Y])^2 \right]+\E \left [2(X-\E[X])(Y-\E[Y]) \right] \\ &&&= \var[X] + \var[Y] + 2 \mathrm{Cov}(X,Y) \end{align*}
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*}
A random variable \(X\) is distributed uniformly on \([\, 0\, , \, a\,]\). Show that the variance of \(X\) is \({1 \over 12} a^2\). A sample, \(X_1\) and \(X_2\), of two independent values of the random variable is drawn, and the variance \(V\) of the sample is determined. Show that \(V = {1 \over 4} \l X_1 -X_2 \r ^2\), and hence prove that \(2 V\) is an unbiased estimator of the variance of X. Find an exact expression for the probability that the value of \(V\) is less than \({1 \over 12} a^2\) and estimate the value of this probability correct to one significant figure.
Solution: \begin{align*} && \E[X] &= \frac{a}{2}\tag{by symmetry} \\ &&\E[X^2] &= \int_0^a \frac{1}{a} x^2 \d x \\ &&&= \frac{a^3}{3a} = \frac{a^2}{3} \\ \Rightarrow && \var[X] &= \frac{a^2}{3} - \frac{a^2}{4} = \frac{a^2}{12} \\ \end{align*} \begin{align*} && V &=\frac{1}{2} \left ( \left ( X_1 - \frac{X_1+X_2}{2} \right )^2+\left ( X_2- \frac{X_1+X_2}{2} \right )^2 \right ) \\ &&&= \frac{1}{8} ((X_1 - X_2)^2 + (X_2 - X_1)^2 ) \\ &&&= \frac14 (X_1-X_2)^2 \\ \\ && \E[2V] &= \E \left [ \frac12 (X_1 - X_2)^2 \right] \\ &&&= \frac12 \E[X_1^2] - \E[X_1X_2] + \frac12 \E[X_2^2] \\ &&&= \frac{a^2}{3} - \frac{a^2}{4} = \frac{a^2}{12} \end{align*} Therefore \(2V\) is an unbiased estimator of the variance of \(X\).
The random variable \(X\) is uniformly distributed on the interval \([-1,1]\). Find \(\E(X^2)\) and \(\var (X^2)\). A second random variable \(Y\), independent of \(X\), is also uniformly distributed on \([-1,1]\), and \(Z=Y-X\). Find \(\E(Z^2)\) and show that \(\var (Z^2) = 7 \var (X^2)\).
Solution: \(X \sim U(-1,1)\) \begin{align*} \E[X^2] &= \int_{-1}^1 \frac12 x^2 \, dx \\ &= \frac{1}{6} \left [ x^3 \right]_{-1}^1 \\ &= \frac{1}{3} \end{align*} \begin{align*} \E[X^4] &= \int_{-1}^1 \frac12 x^4 \, dx \\ &= \frac{1}{10} \left [ x^5 \right]_{-1}^1 \\ &= \frac{1}{5} \end{align*} \begin{align*} \var[X^2] &=\E[X^4] - \E[X^2]^2 \\ &= \frac{1}{5} - \frac{1}{9} \\ &= \frac{4}{45} \end{align*} \begin{align*} \E(Z^2) &= \E(Y^2 - 2XY+Z^2) \\ &= \E(Y^2) - 2\E(X)\E(Y)+\E(Z^2) \\ &= \frac{1}{3} - 0 + \frac{1}{3} \\ &= \frac{2}{3} \end{align*} \begin{align*} \E[Z^4] &= \E[Y^4 -4Y^3X+6Y^2X^2-4YX^3+X^4] \\ &= \E[Y^4]-4\E[Y^3]\E[X]+6\E[Y^2]\E[X^2]-4\E[Y]\E[X^3]+\E[X^4] \\ &= \frac{1}{5}+6 \frac{1}{3} \frac13 + \frac{1}{5} \\ &= \frac{2}{5} + \frac{2}{3} \\ &= \frac{16}{15} \end{align*} \begin{align*} \var(Z^2) &= \E(Z^4) - \E(Z^2) \\ &= \frac{16}{15} - \frac{4}{9} \\ &= \frac{28}{45} \\ &= 7 \var(X^2) \end{align*}
The random variables \(X_1\), \(X_2\), \(\ldots\) , \(X_{2n+1}\) are independently and uniformly distributed on the interval \(0 \le x \le 1\). The random variable \(Y\) is defined to be the median of \(X_1\), \(X_2\), \(\ldots\) , \(X_{2n+1}\). Given that the probability density function of \(Y\) is \(\g(y)\), where \[ \mathrm{g}(y)=\begin{cases} ky^{n}(1-y)^{n} & \mbox{ if }0\leqslant y\leqslant1\\ 0 & \mbox{ otherwise} \end{cases} \] use the result $$ \int_0^1 {y^{r}}{{(1-y)}^{s}}\,\d y = \frac{r!s!}{(r+s+1)!} $$ to show that \(k={(2n+1)!}/{{(n!)}^2}\), and evaluate \(\E(Y)\) and \({\rm Var}\,(Y)\). Hence show that, for any given positive number \(d\), the inequality $$ {\P\left({\vert {Y - 1/2} \vert} < {d/{\sqrt {n}}} \right)} < {\P\left({\vert {{\bar X} - 1/2} \vert} < {d/{\sqrt {n}}} \right)} $$ holds provided \(n\) is large enough, where \({\bar X}\) is the mean of \(X_1\), \(X_2\), \(\ldots\) , \(X_{2n+1}\). [You may assume that \(Y\) and \(\bar X\) are normally distributed for large \(n\).]
Bar magnets are placed randomly end-to-end in a straight line. If adjacent magnets have ends of opposite polarities facing each other, they join together to form a single unit. If they have ends of the same polarity facing each other, they stand apart. Find the expectation and variance of the number of separate units in terms of the total number \(N\) of magnets.
Solution: There are \(N-1\) gaps between the magnets which are independently gaps or not gaps. Therefore the total number of gaps is \(X \sim Binomial(N-1, \frac12)\) and \begin{align*} \mathbb{E}(X) &= \frac{N-1}{2} \\ \textrm{Var}(X) &= \frac{N-1}{4} \end{align*}
An experiment produces a random number \(T\) uniformly distributed on \([0,1]\). Let \(X\) be the larger root of the equation \[x^{2}+2x+T=0.\] What is the probability that \(X>-1/3\)? Find \(\mathbb{E}(X)\) and show that \(\mathrm{Var}(X)=1/18\). The experiment is repeated independently 800 times generating the larger roots \(X_{1}, X_{2}, \dots, X_{800}\). If \[Y=X_{1}+X_{2}+\dots+X_{800}.\] find an approximate value for \(K\) such that \[\mathrm{P}(Y\leqslant K)=0.08.\]
Solution: \((x+1)^2+T-1 = 0\) so the larger root is \(-1 + \sqrt{1-T}\) \begin{align*} && \mathbb{P}(X > -1/3) &= \mathbb{P}(-1 + \sqrt{1-T} > -1/3) \\ &&&= \mathbb{P}(\sqrt{1-T} > 2/3)\\ &&&= \mathbb{P}(1-T > 4/9)\\ &&&= \mathbb{P}\left (T < \frac59 \right) = \frac59 \end{align*} Similarly, for \(t \in [-1,0]\) \begin{align*} && \mathbb{P}(X \leq t) &= \mathbb{P}(-1 + \sqrt{1-T} \leq t) \\ &&&= \mathbb{P}(\sqrt{1-T} \leq t+1)\\ &&&= \mathbb{P}(1-T \leq (t+1)^2)\\ &&&= \mathbb{P}\left (T \geq 1-(t+1)^2\right) = (t+1)^2 \\ \Rightarrow && f_X(t) &= 2(t+1) \\ \Rightarrow && \E[X] &= \int_{-1}^0 x \cdot f_X(x) \d x \\ &&&= \int_{-1}^0 x2(x+1) \d x \\ &&&= \left [\frac23x^3+x^2 \right]_{-1}^0 \\ &&&= -\frac13 \\ && \E[X^2] &= \int_{-1}^0 x^2 \cdot f_X(x) \d x \\ &&&= \int_{-1}^0 2x^2(x+1) \d x \\ &&&= \left [ \frac12 x^4 + \frac23x^3\right]_{-1}^0 \\ &&&= \frac16 \\ \Rightarrow && \var[X] &= \E[X^2] - \left (\E[X] \right)^2 \\ &&&= \frac16 - \frac19 = \frac1{18} \end{align*} Notice that by the central limit theorem \(\frac{Y}{800} \approx N( -\tfrac13, \frac{1}{18 \cdot 800})\). Also notice that \(\Phi^{-1}(0.08) \approx -1.4 \approx -\sqrt{2}\) Therefore we are looking for roughly \(800 \cdot (-\frac13 -\frac{1}{\sqrt{18 \cdot 800}} \sqrt{2})) = -267-9 = -276\)