71 problems found
A random number generator prints out a sequence of integers \(I_1, I_2, I_3, \dots\). Each integer is independently equally likely to be any one of \(1, 2, \dots, n\), where \(n\) is fixed. The random variable \(X\) takes the value \(r\), where \(I_r\) is the first integer which is a repeat of some earlier integer. Write down an expression for \(\mathbb{P}(X=4)\).
Solution: \begin{align*} && \mathbb{P}(X > 4) &= 1 \cdot \frac{n-1}{n} \cdot \frac{n-2}{n} \cdot \frac{n-3}{n} \\ && \mathbb{P}(X > 3) &= 1 \cdot \frac{n-1}{n} \cdot \frac{n-2}{n} \\ \Rightarrow && \mathbb{P}(X =4) &= \mathbb{P}(X > 3) - \mathbb{P}(X > 4) \\ &&&= \frac{(n-1)(n-2)}{n^2} \left (1 - \frac{n-3}{n} \right) \\ &&&= \frac{3(n-1)(n-2)}{n^3} \end{align*}
The random variable \(X\) has probability density function \(f(x)\) (which you may assume is differentiable) and cumulative distribution function \(F(x)\) where \(-\infty < x < \infty \). The random variable \(Y\) is defined by \(Y= \e^X\). You may assume throughout this question that \(X\) and \(Y\) have unique modes.
Solution:
I play a game which has repeated rounds. Before the first round, my score is \(0\). Each round can have three outcomes:
Solution:
From the integers \(1, 2, \ldots , 52\), I choose seven (distinct) integers at random, all choices being equally likely. From these seven, I discard any pair that sum to 53. Let \(X\) be the random variable the value of which is the number of discarded pairs. Find the probability distribution of \(X\) and show that \(\E (X) = \frac 7 {17}\). Note: \(7\times 17 \times 47 =5593\).
Solution: There are \(\binom{26}3\binom{23}{1}2\) ways to obtain \(3\) pairs There are \(\binom{26}2 \binom{24}3 \cdot 2^3\) ways to obtain \(2\) pairs There are \(\binom{26}1 \binom{25}5 \cdot 2^5\) ways to obtain \(1\) pairs There are \(\binom{26}7 \cdot 2^7\) ways to obtain \(0\) pairs There are \(\binom{52}{7}\) ways to choose our integers, so \begin{align*} && \mathbb{P}(X = 3) &= \frac{\binom{26}{3} \cdot \binom{23}{1} \cdot 2}{\binom{52}{7}} \\ &&&= \frac{7! \cdot 26 \cdot 25 \cdot 24 \cdot 23 \cdot 2}{3! \cdot 52 \cdot 51 \cdot 50 \cdot 49 \cdot 48 \cdot 47 \cdot 46} \\ &&&= \frac{7 \cdot 6 \cdot 5 \cdot 4 }{51 \cdot 2\cdot 49 \cdot 2\cdot 47 \cdot 2} \\ &&&= \frac{ 5 }{17\cdot 7\cdot 47} = \frac{5}{5593} \\ \\ && \mathbb{P}(X = 2) &= \frac{\binom{26}2 \binom{24}3 \cdot 2^3}{\binom{52}{7}} \\ &&&= \frac{220}{5593} \\ \\ && \mathbb{P}(X = 1) &= \frac{\binom{26}1 \binom{25}5 \cdot 2^5}{\binom{52}{7}} \\ &&&= \frac{1848}{5593} \\ \\ && \mathbb{P}(X = 0) &= \frac{\binom{26}7 \cdot 2^7}{\binom{52}{7}} \\ &&&= \frac{3520}{5593} \\ \\ && \mathbb{E}(X) &= \frac{1848}{5593} + 2 \cdot \frac{220}{5593} + 3 \cdot \frac{5}{5593} \\ &&&= \frac{2303}{5593} = \frac{7}{17} \end{align*} Notice we can find the expected value directly: Let \(X_i\) be the random variable the \(i\)th number is discarded. Notice that \(\mathbb{E}(X) = \mathbb{E}\left (\frac12 \left (X_1 +X_2 +X_3 +X_4 +X_5 +X_6 +X_7\right) \right)\) and also notice that each \(X_i\) has the same distribution (although not independent!). Then \begin{align*} &&\mathbb{E}(X) &= \frac72 \mathbb{E}(X_i) \\ &&&= \frac72 \cdot \left (1 - \frac{50}{51} \cdot \frac{49}{50} \cdots \frac{45}{46} \right) = \frac74 \left ( 1 - \frac{45}{51}\right) \\ &&&= \frac72 \cdot \frac{6}{51} \\ &&&= \frac7{17} \end{align*}
The random variable \(U\) has a Poisson distribution with parameter \(\lambda\). The random variables \(X\) and \(Y\) are defined as follows. \begin{align*} X&= \begin{cases} U & \text{ if \(U\) is 1, 3, 5, 7, \(\ldots\,\)} \\ 0 & \text{ otherwise} \end{cases} \\ Y&= \begin{cases} U & \text{ if \(U\) is 2, 4, 6, 8, \(\ldots\,\) } \\ 0 & \text{ otherwise} \end{cases} \end{align*}
Solution:
A list consists only of letters \(A\) and \(B\) arranged in a row. In the list, there are \(a\) letter \(A\)s and \(b\) letter \(B\)s, where \(a\ge2\) and \(b\ge2\), and \(a+b=n\). Each possible ordering of the letters is equally probable. The random variable \(X_1\) is defined by \[ X_1 = \begin{cases} 1 & \text{if the first letter in the row is \(A\)};\\ 0 & \text{otherwise.} \end{cases} \] The random variables \(X_k\) (\(2 \le k \le n\)) are defined by \[ X_k = \begin{cases} 1 & \text{if the \((k-1)\)th letter is \(B\) and the \(k\)th is \(A\)};\\ 0 & \text{otherwise.} \end{cases} \] The random variable \(S\) is defined by \(S = \sum\limits_ {i=1}^n X_i\,\).
Solution:
Solution:
What property of a distribution is measured by its skewness?
Solution: Skewness is a measure of the symmetry (specifically the lack-thereof) in the distribution. How much mass is there on one side rather than another.
The random variable \(N\) takes positive integer values and has pgf (probability generating function) \(\G(t)\). The random variables \(X_i\), where \(i=1\), \(2\), \(3\), \(\ldots,\) are independently and identically distributed, each with pgf \({H}(t)\). The random variables \(X_i\) are also independent of \(N\). The random variable \(Y\) is defined by \[ Y= \sum_{i=1}^N X_i \;. \] Given that the pgf of \(Y\) is \(\G(H(t))\), show that \[ \E(Y) = \E(N)\E(X_i) \text{ and } \var(Y) = \var(N)\big(\E(X_i)\big)^2 + \E(N) \var(X_i) \,.\] A fair coin is tossed until a head occurs. The total number of tosses is \(N\). The coin is then tossed a further \(N\) times and the total number of heads in these \(N\) tosses is \(Y\). Find in this particular case the pgf of \(Y\), \(\E(Y)\), \(\var(Y)\) and \(\P(Y=r)\).
Solution: Recall that for a random variable \(Z\) with pgf \(F(t)\) we have \(F(1) = 1\), \(\E[Z] = F'(1)\) and \(\E[Z^2] = F''(1) +F'(1)\) so \begin{align*} && \E[Y] &= G'(H(1))H'(1) \\ &&&= G'(1)H'(1) \\ &&&= \E[N]\E[X_i] \\ \\ && \E[Y^2] &= G''(H(1))(H'(1))^2+G'(H(1))H''(1) + G'(H(1))H'(1) \\ &&&= G''(1)(H'(1))^2+G'(1)H''(1) + G'(1)H'(1) \\ &&&= (\E[N^2]-\E[N])(\E[X_i])^2 + \E[N](\E[X_i^2]-\E[X_i]) + \E[N]\E[X_i] \\ &&&= (\E[N^2]-\E[N])(\E[X_i])^2 + \E[N]\E[X_i^2] \\ && \var[Y] &= (\E[N^2]-\E[N])(\E[X_i])^2 + \E[N]\E[X_i^2] - (\E[N])^2(\E[X_i])^2\\ &&&= (\var[N]+(\E[N])^2-\E[N])(\E[X_i])^2 + \E[N](\var[X_i]+\E[X_i]^2) - (\E[N])^2(\E[X_i])^2\\ &&&= \var[N](\E[X_i])^2 + \E[N]\var[X_i] \end{align*} Notice that \(N \sim Geo(\tfrac12)\) and \(Y = \sum_{i=1}^N X_i\) where \(X_i\) are Bernoulli. We have that \(G(t) = \frac{\frac12}{1-\frac12z}\) and \(H(t) = \frac12+\frac12p\) so the pgf of \(Y\) is \(G(H(t) = \frac{\frac12}{1 - \frac14-\frac14p} = \frac{2}{3-p}\). \begin{align*} && \E[X_i] &= \frac12\\ && \var[X_i] &= \frac14 \\ && \E[N] &= 2 \\ && \var[N] &= 2 \\ \\ && \E[Y] &= 2 \cdot \frac12 = 1 \\ && \var[Y] &= 2 \cdot \frac14 + 2 \frac14 = 1 \\ && \mathbb{P}(Y=r) &= \tfrac23 \left ( \tfrac13 \right)^r \end{align*}
A discrete random variable \(X\) takes only positive integer values. Define \(\E(X)\) for this case, and show that \[\E(X) =\sum^{\infty}_{n=1}\P\left(X\ge n \right).\] I am collecting toy penguins from cereal boxes. Each box contains either one daddy penguin or one mummy penguin. The probability that a given box contains a daddy penguin is \(p\) and the probability that a given box contains a mummy penguin is \(q\), where \(p\ne0\), \(q\ne0\) and \(p+q=1\,\). Let \(X\) be the number of boxes that I need to open to get at least one of each kind of penguin. Show that \(\P(X\ge 4)= p^{3}+q^{3}\), and that \[ \E(X)=\frac{1}{pq}-1.\, \] Hence show that \(\E(X)\ge 3\,\).
Solution: \[ \E[X] := \sum_{n=1}^{\infty} n \mathbb{P}(X=n) \] \begin{align*} && \sum^{\infty}_{n=1}\mathbb{P}\left(X\ge n \right) &= \sum^{\infty}_{n=1}\sum_{k=n}^\infty \mathbb{P}(X=k) \\ &&&= \sum_{k=1}^\infty k \cdot \mathbb{P}(X=k) \\ &&&= \E[X] \end{align*} \begin{align*} &&\mathbb{P}(X \geq 4) &= \mathbb{P}(\text{first 3 are daddies}) +\mathbb{P}(\text{first 3 are mummies}) \\ &&&= p^3 + q^3 \\ \Rightarrow && \E[X] &= \sum_{n=1}^{\infty} \mathbb{P}\left(X\ge n \right) \\ &&&= 1+\sum_{n=2}^{\infty} \left ( p^{n-1} + q^{n-1}\right) \\ &&&= 1+\frac{p}{1-p} + \frac{q}{1-q} \\ &&&= 1+\frac{p}q + \frac{q}p \\ &&&= 1+\frac{p^2+q^2}{pq} \\ &&&= 1+\frac{(p+q)^2-2pq}{pq} \\ &&&= \frac{1}{pq} -1 \\ &&& \underbrace{\geq}_{AM-GM} \frac{1}{4}-1 = 3 \end{align*}
The continuous random variable \(X\) has probability density function \(\f(x)\), where \[ \f(x) = \begin{cases} a & \text {for } 0\le x < k \\ b & \text{for } k \le x \le 1\\ 0 & \text{otherwise}, \end{cases} \] where \(a > b > 0\) and \(0 < k < 1\). Show that \(a > 1\) and \(b < 1\).
Solution: \begin{align*} && 1 &= \int_0^1 f(x) \d x \\ &&&= ak + b(1-k) \\ &&&= b + (a-b)k \\ \Rightarrow && k &= \frac{1-b}{a-b} \\ \Rightarrow && b & < 1 \tag{\(0 < k, \,a > b\)} \\ && k &> 1 \\ \Rightarrow && a-b & > 1-b \\ \Rightarrow && a > 1 \end{align*}
In this question, \({\rm Corr}(U,V)\) denotes the product moment correlation coefficient between the random variables \(U\) and \(V\), defined by \[ \mathrm{Corr}(U,V) \equiv \frac{\mathrm{Cov}(U,V)}{\sqrt{\var(U)\var(V)}}\,. \] The independent random variables \(Z_1\), \(Z_2\) and \(Z_3\) each have expectation 0 and variance 1. What is the value of \(\mathrm{Corr} (Z_1,Z_2)\)? Let \(Y_1 = Z_1\) and let \[ Y_2 = \rho _{12} Z_1 + (1 - {\rho_{12}^2})^{ \frac12} Z_ 2\,, \] where \(\rho_{12}\) is a given constant with $-1<\rho _{12}<1$. Find \(\E(Y_2)\), \(\var(Y_2)\) and \(\mathrm{Corr}(Y_1, Y_2)\). Now let \(Y_3 = aZ_1 + bZ_2 + cZ_3\), where \(a\), \(b\) and \(c\) are real constants and \(c\ge0\). Given that \(\E(Y_3) = 0\), \(\var(Y_3) = 1\), \( \mathrm{Corr}(Y_1, Y_3) =\rho^{{2}}_{13} \) and \( \mathrm{Corr}(Y_2, Y_3)= \rho^{{2}} _{23}\), express \(a\), \(b\) and \(c\) in terms of \(\rho^{2} _{23}\), \(\rho^{2}_{13}\) and \(\rho^{2} _{12}\). Given constants \(\mu_i\) and \(\sigma_i\), for \(i=1\), \(2\) and \(3\), give expressions in terms of the \(Y_i\) for random variables \(X_i\) such that \(\E(X_i) = \mu_i\), \(\var(X_i) = \sigma_ i^2\) and \(\mathrm{Corr}(X_i,X_j) = \rho_{ij}\).
Solution: \begin{align*} \mathrm{Corr} (Z_1,Z_2) &= \frac{\mathrm{Cov}(Z_1,Z_2)}{\sqrt{\var(Z_1)\var(Z_2)}} \\ &= \frac{\mathbb{E}(Z_1 Z_2)}{\sqrt{1 \cdot 1}} \\ &= \frac{\mathbb{E}(Z_1)\mathbb{E}(Z_2)}{\sqrt{1 \cdot 1}} \\ &= \frac{0}{1} \\ &= 0 \end{align*} \begin{align*} && \mathbb{E}(Y_2) &= \mathbb{E}(\rho_{12} Z_1 + (1 - {\rho_{12}^2})^{ \frac12} Z_ 2) \\ &&&= \mathbb{E}(\rho_{12} Z_1) + \mathbb{E}( (1 - {\rho_{12}^2})^{ \frac12} Z_ 2) \\ &&&= \rho_{12}\mathbb{E}( Z_1) + (1 - {\rho_{12}^2})^{ \frac12}\mathbb{E}( Z_ 2) \\ &&&= 0\\ \\ && \textrm{Var}(Y_2) &= \textrm{Var}(\rho _{12} Z_1 + (1 - {\rho_{12}^2})^{ \frac12} Z_ 2) \\ &&&= \textrm{Var}(\rho_{12} Z_1)+\textrm{Cov}(\rho_{12} Z_1,(1 - {\rho_{12}^2})^{ \frac12} Z_ 2 ) + \textrm{Var}((1 - {\rho_{12}^2})^{ \frac12} Z_ 2) \\ &&&= \rho_{12}^2\textrm{Var}( Z_1)+\rho_{12} (1 - {\rho_{12}^2})^{ \frac12} \textrm{Cov}(Z_1, Z_ 2 ) + (1 - {\rho_{12}^2})\textrm{Var}(Z_ 2) \\ &&&= \rho_{12}^2 + (1-\rho_{12}^2) = 1 \\ \\ && \textrm{Cov}(Y_1, Y_2) &= \mathbb{E}((Y_1-0)(Y_2-0)) \\ &&&= \mathbb{E}(Z_1 \cdot (\rho _{12} Z_1 + (1 - {\rho_{12}^2})^{ \frac12} Z_ 2)) \\ &&&= \rho_{12} \mathbb{E}(Z_1^2) + (1-\rho_{12}^2)^{\frac12}\mathbb{E}(Z_1, Z_2) \\ &&&= \rho_{12} \\ \Rightarrow && \textrm{Corr}(Y_1, Y_2) &= \frac{\textrm{Cov}(Y_1, Y_2)}{\sqrt{\textrm{Var}(Y_1)\textrm{Var}(Y_2)}} \\ &&&= \frac{\rho_{12}}{1 \cdot 1} = \rho_{12} \end{align*} Suppose \(Y_3 =aZ_1 +bZ_2+cZ_3\) with \(\mathbb{E}(Y_3) = 0\) (must be true), \(\textrm{Var}(Y_3) = 1 = a^2+b^2+c^2\) and \(\textrm{Corr}(Y_1, Y_3) = \rho_{13}, \textrm{Corr}(Y_2, Y_3) = \rho_{23}\). \begin{align*} && \textrm{Corr}(Y_1,Y_3) &= \textrm{Cov}(Y_1, Y_3) \\ &&&= \textrm{Cov}(Z_1, aZ_1 +bZ_2+cZ_3) \\ &&&= a \\ \Rightarrow && a &= \rho_{13} \\ \\ && \textrm{Corr}(Y_2,Y_3) &= \textrm{Cov}(Y_2, Y_3) \\ &&&= \textrm{Cov}(\rho_{12}Z_1+(1-\rho_{12}^2)^\frac12Z_2, \rho_{13}Z_1 +bZ_2+cZ_3) \\ &&&= \rho_{12}\rho_{13}+(1-\rho_{12}^2)^\frac12b \\ \Rightarrow && \rho_{23} &= \rho_{12}\rho_{13}+(1-\rho_{12}^2)^\frac12b \\ \Rightarrow && b &= \frac{\rho_{23}-\rho_{12}\rho_{13}}{(1-\rho_{12}^2)^\frac12} \\ && c &= \sqrt{1-\rho_{13}^2-\frac{(\rho_{23}-\rho_{12}\rho_{13})^2}{(1-\rho_{12}^2)}} \end{align*} Finally, let \(X_i = \mu_i + \sigma_i Y_i\)
I seat \(n\) boys and \(3\) girls in a line at random, so that each order of the \(n+3\) children is as likely to occur as any other. Let \(K\) be the maximum number of consecutive girls in the line so, for example, \(K=1\) if there is at least one boy between each pair of girls.
Solution:
A continuous random variable \(X\) has probability density function given by \[ \f(x) = \begin{cases} 0 & \mbox{for } x<0 \\ k\e^{-2 x^2} & \mbox{for } 0\le x< \infty \;,\\ \end{cases} \] where \(k\) is a constant.
Solution:
In this question, you may use without proof the results: \[ \sum_{r=1}^n r = \tfrac12 n(n+1) \qquad\text{and}\qquad \sum_{r=1}^n r^2 = \tfrac1 6 n(n+1)(2n+1)\,. \] The independent random variables \(X_1\) and \(X_2\) each take values \(1\), \(2\), \(\ldots\), \(N\), each value being equally likely. The random variable \(X\) is defined by \[ X= \begin{cases} X_1 & \text { if } X_1\ge X_2\\ X_2 & \text { if } X_2\ge X_1\;. \end{cases} \]
Solution: \begin{align*} \P(X = r) &= \P(X_1 = r, X_2 \leq r) + \P(X_2 = r, X_1 < r) \\ &= \P(X_1 = r) \P(X_2 \leq r) + \P(X_2 = r)\P( X_1 < r) \\ &= \frac{1}{N} \frac{r}{N} + \frac{1}{N} \frac{r-1}{N} \\ &= \frac{2r-1}{N^2} \end{align*} \begin{align*} \E(X) &= \sum_{r=1}^N r \P(X = r) \\ &= \sum_{r=1}^N \frac{2r^2 - r}{N^2} \\ &= \frac{1}{N^2} \l \frac{N(N+1)(2N+1)}{3} - \frac{N(N+1)}{2} \r \\ &= \frac{N+1}{N} \l \frac{4N-1}{6} \r \end{align*} When \(N = 100\), this is equal to \(\frac{101 \cdot 399}{6 \cdot 100} = \frac{101 \cdot 133}{200} = 67.165\) \begin{align*} &&\frac12 &\leq \P(X \leq m) \\ &&&=\sum_{r=1}^m \P(X=r) \\ &&&=\sum_{r=1}^m \frac{2r-1}{N^2} \\ &&&= \frac{1}{N^2} \l m(m+1) - m \r \\ &&&= \frac{m^2}{N^2} \\ \Rightarrow && m^2 &\geq \frac{N^2}{2} \\ \Rightarrow && m &\geq \frac{N}{\sqrt{2}} \\ \Rightarrow && m &= \left \lceil \frac{N}{\sqrt{2}} \right \rceil \end{align*} When \(N = 100\), \(100/\sqrt{2} = \sqrt{2}50\). \(\sqrt{2} > 1.4 \Rightarrow 50\sqrt{2} > 70\) \(\sqrt{2} < 1.42 \Rightarrow 50 \sqrt{2} < 71\), therefore \(\displaystyle \left \lceil \frac{100}{\sqrt{2}} \right \rceil = 71\) \begin{align*} \lim_{N \to \infty} \frac{\frac{(N+1)(4N-1)}{6N}}{ \left \lceil\frac{N}{\sqrt{2}} \right \rceil} &= \lim_{N \to \infty} \frac{\sqrt{2}}{3}\l \frac{4N^2 +3N - 1}{2N^2} \r \tag{since the floor will be irrelevant}\\ &= \lim_{N \to \infty} \frac{\sqrt{2}}{3}\l 2 + \frac{3}{2N} - \frac{1}{N^2} \r \\ &= \lim_{N \to \infty} \frac{2\sqrt{2}}{3} \end{align*}