A railway truck, initially at rest, can move forwards without friction on a long straight \mbox{horizontal} track. On the truck, \(n\) guns are mounted parallel to the track and facing backwards, where \(n>1\). Each of the guns is loaded with a single projectile of mass \(m\). The mass of the truck and guns (but not including the projectiles) is \(M\). When a gun is fired, the projectile leaves its muzzle horizontally with a speed \(v-V\) relative to the ground, where~\(V\) is the speed of the truck immediately before the gun is fired.
The discrete random variables \(X\) and \(Y\) can each take the values \(1\), \(\ldots\,\), \(n\) (where \(n\ge2\)). Their joint probability distribution is given by \[ \P(X=x, \ Y=y) = k(x+y) \,, \] where \(k\) is a constant.
Solution:
The random variable \(X\) has mean \(\mu\) and variance \(\sigma^2\), and the function \({\rm V}\) is defined, for \(-\infty < x < \infty\), by \[ {\rm V}(x) = \E \big( (X-x)^2\big) . \] Express \({\rm V}(x)\) in terms of \(x\), \( \mu\) and \(\sigma\). The random variable \(Y\) is defined by \(Y={\rm V}(X)\). Show that \[ \E(Y) = 2 \sigma^2 %\text{ \ \ and \ \ } %\Var(Y) = \E(X-\mu)^4 -\sigma^4 . \tag{\(*\)} \] Now suppose that \(X\) is uniformly distributed on the interval \(0\le x \le1\,\). Find \({\rm V}(x)\,\). Find also the probability density function of \(Y\!\) and use it to verify that \((*)\) holds in this case.
Solution: \begin{align*} {\rm V}(x) &= \E \big( (X-x)^2\big) \\ &= \E \l X^2 - 2xX + x^2\r \\ &= \E [ X^2 ]- 2x\E[X] + x^2 \\ &= \sigma^2+\mu^2 - 2x\mu + x^2 \\ &= \sigma^2 + (\mu - x)^2 \end{align*} \begin{align*} \E[Y] &= \E[\sigma^2 + (\mu - X)^2] \\ &= \sigma^2 + \E[(\mu - X)^2]\\ &= \sigma^2 + \sigma^2 \\ &= 2\sigma^2 \end{align*} If \(X \sim U(0,1)\) then \(V(x) = \frac{1}{12} + (\frac12 - x)^2\). \begin{align*} \P(Y \leq y) &= \P(\frac1{12} + (\frac12 - X)^2 \leq y) \\ &= \P((\frac12 -X)^2 \leq y - \frac1{12}) \\ &= \P(|\frac12 -X| \leq \sqrt{y - \frac1{12}}) \\ &= \begin{cases} 1 & \text{if } y - \frac1{12} > \frac14 \\ 2 \sqrt{y - \frac1{12}} & \text{if } \frac14 > y - \frac1{12} > 0 \\ \end{cases} \\ &= \begin{cases} 1 & \text{if } y> \frac13 \\ \sqrt{4y - \frac1{3}} & \text{if } \frac13 > y > \frac1{12} \\ \end{cases} \end{align*} Therefore $f_Y(y) = \begin{cases} \frac{2}{\sqrt{4y-\frac{1}{3}}} & \text{if } \frac1{12} < y < \frac13 \\ 0 & \text{otherwise} \end{cases}$ \begin{align*} \E[Y] &= \int_{1/12}^{1/3} \frac{2x}{\sqrt{4x-\frac13}} \, dx \\ &= 2\int_{u = 0}^{u=1} \frac{\frac{1}{4}u +\frac1{12}}{\sqrt{u}} \,\frac{1}{4} du \tag{\(u = 4x - \frac13, \frac{du}{dx} = 4\)}\\ &= \frac{1}{2 \cdot 12}\int_{u = 0}^{u=1} 3\sqrt{u} +\frac{1}{\sqrt{u}} \, du \\ &= \frac{1}{2 \cdot 12} \left [2 u^{3/2} + 2u^{1/2} \right ]_0^1 \\ &= \frac{1}{2 \cdot 12} \cdot 4 \\ &= \frac{2}{12} \end{align*} as required