Show that, for any functions \(f\) and \(g\), and for any \(m \geq 0\),
$$\sum_{r=1}^{m+1} f(r)\sum_{s=r-1}^m g(s) = \sum_{s=0}^m g(s)\sum_{r=1}^{s+1} f(r)$$
The random variables \(X_0, X_1, X_2, \ldots\) are defined as follows:
\(X_0\) takes the value \(0\) with probability \(1\);
\(X_{n+1}\) takes the values \(0, 1, \ldots, X_n + 1\) with equal probability, for \(n = 0, 1, \ldots\)
Write down \(E(X_1)\).
Find \(P(X_2 = 0)\) and \(P(X_2 = 1)\) and show that \(P(X_2 = 2) = \frac{1}{6}\).
Hence calculate \(E(X_2)\).
For \(n \geq 1\), show that
$$P(X_n = 0) = \sum_{s=0}^{n-1} \frac{P(X_{n-1} = s)}{s+2}$$
and find a similar expression for \(P(X_n = r)\), for \(r = 1, 2, \ldots, n\).
Hence show that \(E(X_n) = \frac{1}{2}(1 + E(X_{n-1}))\).
Find an expression for \(E(X_n)\) in terms of \(n\), for \(n = 1, 2, \ldots\)
Solution:
\begin{align*}
\sum_{r=1}^{m+1} \left (f(r) \sum_{s=r-1}^m g(s) \right) &= \sum_{r=1}^{m+1} \sum_{s=r-1}^m f(r)g(s) \\
&= \sum_{(r,s) \in \{(r,s) : 1 \leq r \leq m+1, 0 \leq s \leq m, s \geq r-1\}} f(r)g(s) \\
&= \sum_{(r,s) \in \{(r,s) : 0 \leq s \leq m, 1 \leq r \leq m+1, r \leq s+1\}} f(r)g(s) \\
&= \sum_{s=0}^m \sum_{r=1}^{s+1} f(r)g(s) \\
&= \sum_{s=0}^m \left ( g(s) \sum_{r=1}^{s+1} f(r) \right)
\end{align*}
\(X_1\) takes the values \(0, 1\) with equal probabilities (since \(X_0 = 0\)). Therefore \(\mathbb{E}(X_1) = \frac12\).
The score shown on a biased \(n\)-sided die is represented by the random variable \(X\) which has distribution \(\mathrm{P}(X = i) = \dfrac{1}{n} + \varepsilon_i\) for \(i = 1, 2, \ldots, n\), where not all the \(\varepsilon_i\) are equal to \(0\).
Find the probability that, when the die is rolled twice, the same score is shown on both rolls. Hence determine whether it is more likely for a fair die or a biased die to show the same score on two successive rolls.
Use part (i) to prove that, for any set of \(n\) positive numbers \(x_i\) (\(i = 1, 2, \ldots, n\)),
\[\sum_{i=2}^{n}\sum_{j=1}^{i-1} x_i x_j \leqslant \frac{n-1}{2n}\left(\sum_{i=1}^{n} x_i\right)^2.\]
Determine, with justification, whether it is more likely for a fair die or a biased die to show the same score on three successive rolls.
In a bag are \(n\) balls numbered 1, 2, \(\ldots\,\), \(n\,\). When a ball is taken out of the bag, each ball is equally likely to be taken.
A ball is taken out of the bag. The number on the ball is noted and the ball is replaced in the bag. The process is repeated once.
Explain why the expected value of the product of the numbers on the two balls is
\[
\frac 1 {n^2} \sum_{r=1}^n\sum_{s=1}^n rs
\]
and simplify this expression.
A ball is taken out of the bag. The number on the ball is noted and the ball is not replaced in the bag. Another ball is taken out of the bag and the number on this ball is noted.
Show that the expected value of the product of the two numbers is
\[
\frac{(n+1)(3n+2)}{12}\;.
\]
Note: \(\displaystyle \sum_{r=1}^n r = \frac12 n(n+1)\) and \(\displaystyle \sum_{r=1}^n r^2 = \frac16 n(n+1)(2n+1)\;\).
Solution:
Since the second draw is independently of the first draw \(\mathbb{P}(F=r, S=s) = \mathbb{P}(F=r)\mathbb{P}(S=s) = \frac{1}{n^2}\) and so
\begin{align*}
&& \E[FS] &= \sum_{r=1}^n \sum_{s=1}^n rs \mathbb{P}(F=r, S = s) \\
&&&= \frac{1}{n^2} \sum_{r=1}^n \sum_{s=1}^n rs \\
&&&= \frac{1}{n^2} \left ( \sum_{r=1}^n r \right)\left ( \sum_{s=1}^n s \right) \\
&&&= \frac{1}{n^2} \left ( \frac{n(n+1)}{2} \right)^2 \\
&&&= \frac{(n+1)^2}{4}
\end{align*}