\documentclass[a4paper,12pt]{article}
\begin{document}

QUESTION The length of time a customer is in a queue waiting to be
served
  at a certain cash point has cdf $F(x)=1-pe^{-\lambda x}, x \geq
  0, \lambda >0,0<p<1$. Find P(x=0) and the pdf for x$>$0. Hence
  find the mean and the variance of the queueing time.

ANSWER
 $F(x)=1-pe^{-\lambda x}\ \ x \geq 0, \lambda >0, 0<p<1\\
  P(X=0)=F(0)=1-p\\
  f(x)=\frac{dF(x)}{dx}=\lambda p e^{-\lambda x}\\
  \mu=0 \times(1-p)+\int_0^\infty\lambda pxe^{-\lambda
  x}\,dx=\frac{p}{\lambda}$\ \ \ \ (Since $\int_0^\infty\lambda
  pxe^{-\lambda x}\,dx=\frac{1}{\lambda}$)\\
  $E(X^2)=0^2 \times(1-p)+\int_0^\infty \lambda px^2 e^{-\lambda
  x}\,=\frac{2p}{\lambda^2}$\ \ \ \ (Since $\int_0^\infty\lambda
  px^2e^{-\lambda x}\,dx=\frac{2}{\lambda^2}$)\\
  Therefore
  $\sigma^2=\frac{2p}{\lambda^2}-\frac{p^2}{\lambda^2}=\frac{p(2-p)}{\lambda^2}$\\
  Note that this is an example of a mixed discrete and continuous
  distribution.

\end{document}
