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\).
A frog jumps towards a large pond. Each jump takes the frog either \(1\,\)m or \(2\,\)m nearer to the pond. The probability of a \(1\,\)m jump is \(p\) and the probability of a \(2\,\)m jump is \(q\), where \(p+q=1\), the occurence of long and short jumps being independent.
Solution: