\documentclass[a4paper,12pt]{article}

\begin{document}

\parindent=0pt

\begin{center}

MA181 INTRODUCTION TO STATISTICAL MODELLING

CONTINUOUS DISTRIBUTIONS

\end{center}

Suppose $X$ is a continuous variable with cumulative distribution
function (cdf) $F(x)=P(X\leq x)$. We can differentiate $F(x)$ to
obtain the \textrm{probability density function} (pdf) of $X$,

$$f(x)=\frac{dF(x)}{dx}=F'(x).$$

Inversely, we may write

$$F(x)=\int_{-\infty}^xf(u)du$$

or,more generally,

$$P(x_1<X<x_2)=\int_{x_1}^{x_2}f(u)du.$$

If $h(X)$ is a function of $X$, we define its expected value to be

$$E[h(X)]=\int_xh(x)f(x)dx.$$

\begin{description}

\item[Example]
The random variable $X$ has pdf

$$f(x)=\frac{3}{(x+1)^4},0\leq x<\infty.$$

The cdf of $X$ is therefore given by

$$F(x)=\int_0^3\frac{1}{(u+1)^4}du=1-\frac{1}{(x+1)^3}.$$

Hence $P(X\leq2)=1-\frac{1}{27}=\frac{26}{27},\ P(1\leq X\leq
2)=\frac{26}{27}-\frac{7}{8}$ etc.

The mean of $X$ is most easily found from

$$E(X+1)=3\int_0^\infty\frac{1}{(x+1)^3}dx=-\frac{3}{2}
\left[\frac{1}{(x+1)^2}\right]_0^\infty=\frac{3}{2},$$

so that $E(X)=\frac{3}{2}-1=\frac{1}{2}$. Similarly

$$E[(X+1)^2]=3\int_0^\infty\frac{1}{(x+1)^2}dx=-3
\left[\frac{1}{(x+1)^2}\right]_0^\infty=3.$$

Since $E[(X+1)^2]=E(X^2)+2E(X)+1$ we have

$$\textrm{var}(X)=E[(X+1)^2]-2E(X)-1-[E(X)]^2=3-2
\left(\frac{1}{2}\right)-1-\left(\frac{1}{2}\right)^2=\frac{3}{4}.$$

\item[The exponential distribution]
If the number of events occurring during a fixed time interval
follows a Poisson distribution, then the time interval $T$ between
two successive events follows an \textit{exponential
distribution}, which has the pdf

$$f(t)=\lambda e^{-\lambda t},\ 0<t<\infty,$$

where $\lambda$ is a positive constant. The cdf of $T$ is given by

$$F(t)=P(T\leq t=\lambda\int_0^t e^{-u}\,du=1-e^{-\lambda t},\
0<t<\infty.$$

The mean of $T$ is

$$E(T)=\lambda\int_0^\infty te^{-\lambda
t}\,dt=\frac{1}{\lambda}$$

while $E(T^2)=\frac{2}{\lambda^2}$, so that
$\textrm{var}(T)=\frac{2}{\lambda^2}-\frac{1}{\lambda^2}=\frac{1}{\lambda^2}$.

\item[Moment generating function]
The probability generating function does not exist for a
continuous distribution. A generating function that does exist,
for both discrete and continuous distributions, is the
\textrm{moment generating function} defined by

$$M(t)=E(e^{tX})=\left\{\begin{array}{ll}\sum_xe^{tx}p(x),&x
\textrm{ discrete,}\\ \int_xe^{tx}f(x)\,dx,&x\textrm{
continuous}.\end{array}\right.$$

Expanding $e^{tx}$ leads, in either case, to

$$M(t)=\sum_{j=0}^\infty\frac{\mu'_jt^j}{j!}$$

so that $\mu_j'$ is the coefficient of $\frac{t^j}{j!}$ in the
expansion of $M(t)$.

\item[Example (Exponential)]
Suppose $X$ follows an exponential distribution with pdf

$$f(x)=\lambda e^{-\lambda x},\ 0<x<\infty.$$

Then

$$M(t)=\lambda\int_0^\infty e^{tx}e^{-\lambda
x}\,dx=\lambda\int_0^\infty
e^{(t-\lambda)x}\,dx=\frac{\lambda}{\lambda-t}=\left[1-\left(\frac{t}{\lambda}\right)\right]^{-1},\
t<\lambda.$$

This can be expanded to give
$M(t)=1+\left(\frac{t}{\lambda}\right)+\left(\frac{t}{\lambda}\right)^2+\ldots$
so that $\mu=\mu_1'=\frac{1}{\lambda},
\mu_2'=\frac{2}{\lambda^2},\ \mu_s'=\frac{6}{\lambda^3},\ldots$

Consequently,
$\textrm{var}(X)=\mu_2=\mu_2'-\mu^2=\frac{1}{\lambda^2}$.

\end{description}

\end{document}
