4 The continuous random variable \(Y\) has a uniform (rectangular) distribution on \([ a , b ]\), where \(a\) and \(b\) are constants.
- Show that the moment generating function \(\mathrm { M } _ { Y } ( \mathrm { t } )\) of \(Y\) is \(\frac { \left( \mathrm { e } ^ { b t } - \mathrm { e } ^ { a t } \right) } { t ( b - a ) }\).
- Use the series expansion of \(\mathrm { e } ^ { x }\) to show that the mean and variance of \(Y\) are \(\frac { 1 } { 2 } ( a + b )\) and \(\frac { 1 } { 12 } ( b - a ) ^ { 2 }\), respectively.