\documentclass[a4paper,12pt]{article}
\begin{document}

QUESTION
 The variable X has pdf $f(x)=\frac{1}{8}(6-x)\ \ 2 \leq x \leq
  6$. A sample of two values of X is taken. Denoting the lesser of
  the two values by Y, use the cdf of X to write down the cdf of
  Y. Obtain the pdf of Y and the mean of Y. Show that its median
  is approximately 2.64.

ANSWER $f(x)=\frac{1}{8}(6-x)\ \ 2 \leq x \leq 6\\
  Y=\min (X_1,X_2)$ where $X_1$ and$X_2$ are independent.\\
  $P(Y>y)-P(X_1\textrm{ and }X_2>y)=P(X_1>y)P(X_2>y)=[1-F(y)]^2\\
  F(y)=\int_2^y\frac{1}{8}(6-x)\,dx=[-\frac{1}{8}(6-x)^2\frac{1}{2}]_2^y=1-\frac{1}{16}(6-y)^2\\
  P(Y>y)=\frac{1}{16^2}(36-12y+y^2)^2=\frac{1}{64}(18-6y+\frac{y^2}{1})^2\\
  F_Y(y)=1-\frac{1}{64}(19-6y+\frac{y^2}{2})^2\\
  f_Y(y)=\frac{1}{32}(18-6y+\frac{y^2}{2})(6-y),\ \ 2\leq y \leq
  6$\\

  \begin{eqnarray*}
  \mu_y&=&\int_2^6\frac{y}{32}(6-y)(18-6y+\frac{y^2}{2})\,dy\\
  &=&\frac{1}{32}\int_2^6(108y-36y^2+3y^3-18y^2+6Y^3-\frac{y^4}{2})\,dy\\
  &=&\frac{1}{32}[54y^2-18y^3+\frac{9}{4}y^4-\frac{y^5}{10}]_2^6\\
  &=&\frac{1}{32}[1944.4-104.8]=2.8
  \end{eqnarray*}

  To find median M need to find when cdf=$\frac{1}{2}$, so
  $\frac{1}{64}(18-6y+\frac{y^2}{2})^2=\frac{1}{2} \Rightarrow
  (18-6y+\frac{y^2}{2})^2=32$\\

  \begin{tabular}{cc}
  y&$(18-6y+\frac{y^2}{2})^2$\\
  2.5&37.52\\
  2.6&33.41\\
  2.7&29.65\\
  2.63&32.42\\
  2.635&32.05\\
  2.64&31.86
  \end{tabular}\\

  Hence we take M to be 2.64.

\end{document}
