71 problems found
A bag contains \(b\) black balls and \(w\) white balls. Balls are drawn at random from the bag and when a white ball is drawn it is put aside.
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\).]
A set of \(n\) dice is rolled repeatedly. For each die the probability of showing a six is \(p\). Show that the probability that the first of the dice to show a six does so on the \(r\)th roll is $$q^{n r } ( q^{-n} - 1 )$$ where \(q = 1 - p\). Determine, and simplify, an expression for the probability generating function for this distribution, in terms of \(q\) and \(n\). The first of the dice to show a six does so on the \(R\)th roll. Find the expected value of \(R\) and show that, in the case \(n = 2\), \(p=1/6\), this value is \(36/11\). Show that the probability that the last of the dice to show a six does so on the \(r\)th roll is \[ \big(1-q^r\big)^n-\big(1-q^{r-1}\big)^n. \] Find, for the case \(n = 2\), the probability generating function. The last of the dice to show a six does so on the \(S\)th roll. Find the expected value of \(S\) and evaluate this when \(p=1/6\).
The random variable \(X\) takes only the values \(x_1\) and \(x_2\) (where \( x_1 \not= x_2 \)), and the random variable \(Y\) takes only the values \(y_1\) and \(y_2\) (where \(y_1 \not= y_2\)). Their joint distribution is given by $$ \P ( X = x_1 , Y = y_1 ) = a \ ; \ \ \P ( X = x_1 , Y = y_2 ) = q - a \ ; \ \ \P ( X = x_2 , Y = y_1 ) = p - a \ . $$ Show that if \(\E(X Y) = \E(X)\E(Y)\) then $$ (a - p q ) ( x_1 - x_2 ) ( y_1 - y_2 ) = 0 . $$ Hence show that two random variables each taking only two distinct values are independent if \(\E(X Y) = \E(X) \E(Y)\). Give a joint distribution for two random variables \(A\) and \(B\), each taking the three values \(- 1\), \(0\) and \(1\) with probability \({1 \over 3}\), which have \(\E(A B) = \E( A)\E (B)\), but which are not independent.
Solution: \begin{align*} \mathbb{P}(X = x_1) &= a + q - a = q \\ \mathbb{P}(X = x_2) &= 1 - q \\ \mathbb{P}(Y = y_1) & = a + p - a = p \\ \mathbb{P}(Y = y_2) & = 1 - p \end{align*} \begin{align*} \mathbb{E}(X)\mathbb{E}(Y) &= \l qx_1 + (1-q)x_2 \r \l p y_1 + (1-p)y_2\r \\ &= qpx_1y_1 + q(1-p)x_1y_2 + (1-q)px_2y_1 + (1-q)(1-p)x_2y_2 \\ \mathbb{E}(XY) &= ax_1y_1 + (q-a)x_1y_2 + (p-a)x_2y_1 + (1 + a - p - q)x_2y_2 &= \end{align*} Therefore \(\mathbb{E}(XY) - \mathbb{E}(X)\mathbb{E}(Y)\) is a degree 2 polynomial in the \(x_i, y_i\). If \(x_1 = x_2\) then we have: \begin{align*} \mathbb{E}(X)\mathbb{E}(Y) &=x_1 \l p y_1 + (1-p)y_2\r \\ \mathbb{E}(XY) &= x_1(ay_1 + (q-a)y_2 + (p-a)y_1 + (1 + a - p - q)y_2) \\ &= x_1 (py_1 + (1-p)y_2) \end{align*} Therefore \(x_1 - x_2\) is a root and by symmetry \(y_1 - y_2\) is a root. Therefore it remains to check the coefficient of \(x_1y_1\) which is \(a - pq\) to complete the factorisation. For any two random variables taking two distinct values, we can find \(a, q, p\) satisfying the relations above. We also note that \(X\) and \(Y\) are independent if \(\mathbb{P}(X = x_i, Y = y_i) = \mathbb{P}(X = x_i)\mathbb{P}(Y = y_i)\). Since \(x_1 \neq x_2\) and \(y_1 \neq y_2\) and \(\E(A B) = \E( A)\E (B) \Rightarrow a = pq\). But if \(a = pq\), we have \(\mathbb{P}(X = x_1, Y = y_1) = \mathbb{P}(X = x_1)\mathbb{P}(Y = y_1)\) and all the other relations drop out similarly. Consider \begin{align*} \mathbb{P}(A = -1, B = 1) &= \frac{1}{6} \\ \mathbb{P}(A = -1, B = -1) &= \frac{1}{6} \\ \mathbb{P}(A = 0, B = 0) &= \frac{1}{3} \\ \mathbb{P}(A = 1, B = -1) &= \frac{1}{6} \\ \mathbb{P}(A = -1, B = -1) &= \frac{1}{6} \end{align*}
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*}
In the game of endless cricket the scores \(X\) and \(Y\) of the two sides are such that \[ \P (X=j,\ Y=k)=\e^{-1}\frac{(j+k)\lambda^{j+k}}{j!k!},\] for some positive constant \(\lambda\), where \(j,k = 0\), \(1\), \(2\), \(\ldots\).
Solution:
The staff of Catastrophe College are paid a salary of \(A\) pounds per year. With a Teaching Assessment Exercise impending it is decided to try to lower the student failure rate by offering each lecturer an alternative salary of \(B/(1+X)\) pounds, where \(X\) is the number of his or her students who fail the end of year examination. Dr Doom has \(N\) students, each with independent probability \(p\) of failure. Show that she should accept the new salary scheme if $$A(N+1)p < B(1-(1-p)^{N+1}).$$ Under what circumstances could \(X\), for Dr Doom, be modelled by a Poisson random variable? What would Dr Doom's expected salary be under this model?
Solution: \begin{align*} && \E[\text{salary}] &= B\sum_{k=0}^N \frac{1}{1+k}\binom{N}{k}p^k(1-p)^{N-k} \\ \\ && (q+x)^N &= \sum_{k=0}^N \binom{N}{k}x^kq^{N-k} \\ \Rightarrow && \int_0^p(q+x)^N \d x &= \sum_{k=0}^N \binom{N}{k} \frac{p^{k+1}}{k+1}q^{N-k} \\ && \frac{(q+p)^{N+1}-q^{N+1}}{N+1} &= \frac{p}{B} \E[\text{salary}] \\ \Rightarrow && \E[\text{salary}] &= B\frac{1-q^{N+1}}{p(N+1)} \end{align*} Therefore if \(Ap(N+1) < B(1-(1-p)^{N+1})\) the expected value of the new salary is higher. (Whether or not the new salary is worth it in a risk adjusted sense is for the birds). We could model \(X\) by a Poisson random variable if \(N\) is large and \(Np = \lambda \) is small. Suppose \(X \approx Po(\lambda)\) then \begin{align*} \E \left [\frac{B}{1+X} \right] &= B\sum_{k=0}^\infty \frac{1}{1+k}\frac{e^{-\lambda}\lambda^k}{k!} \\ &= \frac{B}{\lambda} \sum_{k=0}^\infty e^{-\lambda} \frac{\lambda^{k+1}}{(k+1)!} \\ &= \frac{B}{\lambda}e^{-\lambda}(e^{\lambda}-1) \\ &= \frac{B(1-e^{-\lambda})}{\lambda} = B \frac{1-e^{-Np}}{Np} \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\)
The maximum height \(X\) of flood water each year on a certain river is a random variable with density function \begin{equation*} {\mathrm f}(x)= \begin{cases} \exp(-x)&\text{if \(x\geqslant 0\),}\\ 0&\text{otherwise}. \end{cases} \end{equation*} It costs \(y\) megadollars each year to prepare for flood water of height \(y\) or less. If \(X\leqslant y\) no further costs are incurred but if \(X\geqslant y\) the cost of flood damage is \(r+s(X-y)\) megadollars where \(r,s>0\). The total cost \(T\) megadollars is thus given by \begin{equation*} T= \begin{cases} y&\text{if \(X\leqslant y\)},\\ y+r+s(X-y)&\text{if \(X>y\)}. \end{cases} \end{equation*} Show that we can minimise the expected total cost by taking \[y=\ln(r+s).\]
Solution:
Let \(X\) and \(Y\) be independent standard normal random variables: the probability density function, \(\f\), of each is therefore given by \[ \f(x)=\left(2\pi\right)^{-\frac{1}{2}}\e^{-\frac{1}{2}x^{2}}. \]
Solution:
An industrial process produces rectangular plates of mean length \(\mu_{1}\) and mean breadth \(\mu_{2}\). The length and breadth vary independently with non-zero standard deviations \(\sigma_{1}\) and \(\sigma_{2}\) respectively. Find the means and standard deviations of the perimeter and of the area of the plates. Show that the perimeter and area are not independent.
Solution: Let \(L \sim N(\mu_1, \sigma_1^2)\), \(B \sim N(\mu_2, \sigma_2)^2\), so \begin{align*} && \mathbb{E}(\text{perimeter}) &= \E(2(L+B)) \\ &&&= 2\E[L]+2\E[B] \\ &&&= 2(\mu_1+\mu_2) \\ &&\var[\text{perimeter}] &= \E\left [ (2(L+B))^2 \right] - \left ( \E[2(L+B)] \right)^2 \\ &&&= 4\E[L^2+2LB+B^2] - 4(\mu_1+\mu_2)^2 \\ &&&= 4(\sigma_1^2+\mu_1^2+2\mu_1\mu_2+\sigma_2^2+\mu_2^2) - 4(\mu_1+\mu_2)^2\\ &&&= 4(\sigma_1^2+\sigma_2^2) \\ &&\text{sd}[\text{perimeter}] &= 2\sqrt{\sigma_1^2+\sigma_2^2} \\ \\ && \E[\text{area}] &= \E[LB] \\ &&&= \E[L]\E[B] \\ &&&= \mu_1\mu_2 \\ && \var[\text{area}] &= \E[(LB)^2] - \left (\E[LB] \right)^2 \\ &&&= \E[L^2]\E[B^2]-\mu_1^2\mu_2^2 \\ &&&= (\mu_1^2+\sigma_1^2)(\mu_2^2+\sigma_2^2) -\mu_1^2\mu_2^2 \\ &&&= \sigma_1^2\mu_2^2 + \sigma_2^2\mu_1^2 + \sigma_1^2\sigma_2^2\\ && \text{sd}(\text{area}) &= \sqrt{\sigma_1^2\mu_2^2 + \sigma_2^2\mu_1^2 + \sigma_1^2\sigma_2^2} \\ \\ && \E[\text{perimeter} \cdot \text{area}] &= \E[2(L+B)LB] \\ &&&= 2\E[L^2]\E[B] + 2\E[L]\E[B^2] \\ &&&= 2(\sigma_1^2+\mu_1^2)\mu_2 + 2(\sigma_2^2+\mu_2^2)\mu_1 \\ && \E[\text{perimeter}] \E[\text{area}] &= 2(\mu_1+\mu_2) \cdot \mu_1\mu_2 \end{align*} Since the latter does not depend on \(\sigma_i\) but the former does they cannot be equal in general, therefore they cannot be independent. [See also STEP 2006 Paper 3 Q14]
I have a Penny Black stamp which I want to sell to my friend Jim, but we cannot agree a price. So I put the stamp under one of two cups, jumble them up, and let Jim guess which one it is under. If he guesses correctly, I add a third cup, jumble them up, and let Jim guess correctly, adding another cup each time. The price he pays for the stamp is \(\pounds N,\) where \(N\) is the number of cups present when Jim fails to guess correctly. Find \(\mathrm{P}(N=k)\). Show that \(\mathrm{E}(N)=\mathrm{e}\) and calculate \(\mathrm{Var}(N).\)
Solution: \begin{align*} && \mathbb{P}(N = k) &= \mathbb{P}(\text{guesses }k-1\text{ correctly then 1 wrong})\\ &&&= \frac12 \cdot \frac{1}{3} \cdots \frac{1}{k-1} \frac{k-1}{k} \\ &&&= \frac{k-1}{k!} \\ &&\mathbb{E}(N) &= \sum_{k=2}^\infty k \cdot \mathbb{P}(N=k) \\ &&&= \sum_{k=2}^{\infty} \frac{k(k-1)}{k!} \\ &&&= \sum_{k=0}^{\infty} \frac{1}{k!} = e \\ && \textrm{Var}(N) &= \mathbb{E}(N^2) - \mathbb{E}(N)^2 \\ && \mathbb{E}(N^2) &= \sum_{k=2}^{\infty} k^2 \mathbb{P}(N=k) \\ &&&= \sum_{k=2}^{\infty} \frac{k^2(k-1)}{k!} \\ &&&= \sum_{k=0}^{\infty} \frac{k+2}{k!} \\ &&&= \sum_{k=0}^{\infty} \frac{1}{k!} + 2 \sum_{k=0}^{\infty} \frac{1}{k!} = 3e \\ \Rightarrow && \textrm{Var}(N) &= 3e-e^2 \end{align*}
The random variable \(X\) is uniformly distributed on \([0,1]\). A new random variable \(Y\) is defined by the rule \[ Y=\begin{cases} 1/4 & \mbox{ if }X\leqslant1/4,\\ X & \mbox{ if }1/4\leqslant X\leqslant3/4\\ 3/4 & \mbox{ if }X\geqslant3/4. \end{cases} \] Find \({\mathrm E}(Y^{n})\) for all integers \(n\geqslant 1\). Show that \({\mathrm E}(Y)={\mathrm E}(X)\) and that \[{\mathrm E}(X^{2})-{\mathrm E}(Y^{2})=\frac{1}{24}.\] By using the fact that \(4^{n}=(3+1)^{n}\), or otherwise, show that \({\mathrm E}(X^{n}) > {\mathrm E}(Y^{n})\) for \(n\geqslant 2\). Suppose that \(Y_{1}\), \(Y_{2}\), \dots are independent random variables each having the same distribution as \(Y\). Find, to a good approximation, \(K\) such that \[{\rm P}(Y_{1}+Y_{2}+\cdots+Y_{240000} < K)=3/4.\]
Solution: \begin{align*} && \E[Y^n] &= \frac14 \cdot \frac1{4^n} + \frac14 \cdot \frac{3^n}{4^n} + \frac12 \int_{1/4}^{3/4}2 y^n \d y \\ &&&= \frac{3^n+1}{4^{n+1}} + \left [ \frac{y^{n+1}}{n+1} \right]_{1/4}^{3/4} \\ &&&= \frac{3^n+1}{4^{n+1}} + \frac{3^{n+1}-1}{(n+1)4^{n+1}} \end{align*} \begin{align*} && \E[Y] &= \frac{3+1}{16} + \frac{9-1}{2 \cdot 16} \\ &&&= \frac{1}{4} + \frac{1}{4} = \frac12 = \E[X] \end{align*} \begin{align*} && \E[X^2] &= \int_0^1 x^2 \d x = \frac13 \\ && \E[Y^2] &= \frac{9+1}{64} + \frac{27-1}{3 \cdot 64} = \frac{56}{3 \cdot 64} = \frac{7}{24} \\ \Rightarrow && \E[X^2] - \E[Y^2] &= \frac13 - \frac{7}{24} = \frac{1}{24} \end{align*} \begin{align*} && \E[X^n] &= \frac{1}{n+1} \\ && \E[Y^n] &= \frac{1}{n+1} \frac{1}{4^{n+1}}\left ( (n+1)(3^n+1)+3^{n+1}-1 \right) \\ &&&= \frac{1}{n+1} \frac{1}{4^{n+1}}\left ( 3^{n+1} + (n+1)3^n +n \right) \\ \\ && (3+1)^{n+1} &= 3^{n+1} + (n+1)3^n + \cdots + (n+1) \cdot 3 + 1 \\ &&&> 3^{n+1} + (n+1)3^n + n + 1 \end{align*} if \(n \geq 2\) Notice that by the central limit theorem: \begin{align*} &&\frac{1}{240\,000} \sum_{i=1}^{240\,000} Y_i &\sim N \left ( \frac12, \frac{1}{24 \cdot 240\,000}\right) \\ \Rightarrow && \mathbb{P}\left (\frac{\frac{1}{240\,000} \sum_{i=1}^{240\,000} Y_i - \frac12}{\frac1{24} \frac{1}{100}} \leq \frac23 \right) &\approx 0.75 \\ \Rightarrow && \mathbb{P} \left ( \sum_i Y_i \leq 240\,000 \cdot \left ( \frac2{3} \frac1{2400}+\frac12 \right) \right ) & \approx 0.75 \\ \Rightarrow && K &= 120\,000 + 66 \\ &&&\approx 120\,066 \end{align*}