next up previous index
Next: Combinatorics Up: Continuous random variables 9/30 Previous: Cumulative Distribution Function 10/5

Examples with functions of Uniform Random Numbers 10/5

Example 1:
The cdf of a uniform random variable is:

\begin{displaymath}F_U(u)=\left\{
\begin{array}{llr}
0 &\mbox{ for } & u<0\\
u...
...x{ for } & 0<u<1\\
1 &\mbox{ for } & u>1\\
\end{array}\right.\end{displaymath}

Thus by computing the derivative we have the density of the uniform random variable to be:

\begin{displaymath}f_U(u)=\left\{
\begin{array}{llr}
0 &\mbox{ for } & u<0\\
1...
...x{ for } & 0<u<1\\
0 &\mbox{ for } & u>1\\
\end{array}\right.\end{displaymath}

The box shape we already knew!

Example 2:
The square of a random variable:

\begin{displaymath}Z=U^2, \mbox{ with } U \; \; Uniform(0,1) \end{displaymath}

We start by computing the cdf by

\begin{displaymath}For\; 0<z<1\;\; P(Z \leq z)=P(U^2 <z)=P(U<\sqrt{z})=\sqrt{z}\end{displaymath}


\begin{displaymath}F_Z(z)=\left\{
\begin{array}{llr}
0 &\mbox{ for } & z<0\\
\...
...} &\mbox{ for } & 0<z<1\\
1 &\mbox{ for } & z>1\\
\end{array}\end{displaymath}

We obtain the density by just deriving this cdf:

\begin{displaymath}f_Z(z)=\left\{
\begin{array}{llr}
0 &\mbox{ for } & z<0\\
\...
...} &\mbox{ for } & 0<z<1\\
0 &\mbox{ for } & z>1\\
\end{array}\end{displaymath}

Example 3:
The sum of two uniform random variables:

Z=U1+U2


\begin{displaymath}For\; z<0\;\; P(Z \leq z)=0\end{displaymath}


\begin{displaymath}For\; 0<z<1\;\; P(Z \leq z)=P(U_1+U_2 <z)=\frac{z^2}{2}\end{displaymath}


\begin{displaymath}For\; 1<z<2\;\; P(Z \leq z)=P(U_1+U_2 <z)=1-\frac{(2-z)^2}{2}\end{displaymath}

We obtain the density by just deriving this cdf:

\begin{displaymath}f_Z(z)=\left\{
\begin{array}{llr}
0 &\mbox{ for } & z<0\\
z...
...) &\mbox{ for } & 1<z<2\\
0 &\mbox{ for } & z>2\\
\end{array}\end{displaymath}

This the triangle shaped density that we found by simulation.


next up previous index
Next: Combinatorics Up: Continuous random variables 9/30 Previous: Cumulative Distribution Function 10/5
Susan Holmes
1998-12-07