1

### Continuous Distributions

1 Random Variables of theContinuous Type

2

### Density Curve

Percent

A smooth curve that fit
the distribution
10 20 30 40 50 60 70 80 90 100 110
Test scores
**Density **
**function, ****f ****(****x****)**
* f*(*x*)
3

### Density Curve

A smooth curve that fit the distribution

Percent

Use a mathematical model to describe the variable.

10 20 30 40 50 60 70 80 90 100 110

Test scores

Shows the
probability
density for all
values of *x. *

Probability density is not probability!
**Probability **
**Density **
**Function, ****f ****(****x****)**
* f*(*x*)
4

### Continuous Distribution

1.*f*(

*x*) 0,

*x*

*S,*

2.*S f*(*x*)* dx = *1, (Total area under curve is 1.)

3. For *a* and *b* in *S*,

Probability Density Function (*p.d.f.*)of a random
variable *X* of continuous type with a space *S* is an
integrable function, *f*(*x*), that satisfying the following
conditions:

###

*b*

*a*

*f*

*xdx*

*b*

*X*

*a*

*P*( ) ( )

**f****(**

**x****)**

**x***5*

**a b**### Meaning of Area Under Curve

### Example: What percentage of the

### distribution is in between 72 and 86?

** f****(****x****) **

**X**** (Height) **
**72 86 **

*P*(*X *= 72) =

*P*(72 *X * 86)

0, density is not probability. 6

### Meaning of Area Under Curve

### Example: What percentage of the

### distribution is in between 72 and 86?

** f****(****x****) **

**X**** (Height) **
**72 86 **

*P(72 * X 86) =*P(72 < X < 86) *
=*P(72 * X <86) =*P(72 < X * 86)

7
4
/
1
0
2
2
8*x*
1/4
0
2
4*x*
elsewhere
,
0
0.5
0
for
,
8
)
(*x* *x* *x*
*f*
0.5
* f *(*x*) = 8*x* is a line with
a slope 8 and passes
through (0,0)

0 **x**

**f ****(****x****) = ****y**

**Example: **

If the density function of a continuous distribution is

Find the proportion of values in this distribution that is less than 1/4.

= 4(1/4)2_{ – 4(0)}2_{ = 4/16 = 1/4. }

###

1/4 0 8*xdx*The area under the

*f*(

*x*) between 0 and 1/4 =

8

### Review of Calculus

*c*

*x*

*n*

*dx*

*xn*

*n*

###

1 1 1*c*

*e*

*a*

*adx*

*du*

*ax*

*u*

*du*

*a*

*e*

*dx*

*e*

*u*

*u*

*ax*

_{}

###

1 , 1###

*e*2

*xdx*

*e*2

*x*

*c*2 1

###

*c*

*x*

*c*

*x*

*dx*

*x*3 31 4 4 1 1 3 1 9

*b*

*x*

*b*

*e*

_{3}5 / ) ( lim 0 for , 5 1 ) (

**

_{x}*5*

_{e}**

_{x}*f*

*x*

**Example:**

If the density function of a continuous distribution *X*, waiting time
between arrivals of cars at a intersection, is

###

3 5 5 1*e*

*dx*

*x*

-The area under the *f* (*x*) and *x* > 3 =

5488
.
0
)
5488
.
0
(
0
)
(
)
(
lim_{} /5 _{}_{} 3/5 _{} _{} _{} _{}
*e* *e*
*b*
*b*

Find the probability that the waiting time (in seconds) till the next arrival of car at this intersection is more than 3 seconds.

3
0
**x****f ****(****x****) = *** y*
.2
10
3
0
5
/

_{)}(

_{}

**

_{e}*x* 0 for , 5 1 ) (

**

_{x}*5*

_{e}**

_{x}*f*

*x*

**Example:**

If the density function of a continuous distribution *X*, waiting time
between arrivals of cars at a intersection, is

###

3 0 5 5 1*e*

*dx*

*x*

-The area under the *f* (*x*) below 3 =

4522
.
0
5488
.
0
1
1
)
(
)
(_{} 3/5 _{}_{} 0/5 _{} _{} 3/5_{} _{} _{}
*e*
*e*
*e*

Find the probability that the waiting time (in seconds) till the next arrival of car at this intersection is less than 3 seconds.

3
0
**x****f ****(****x****) = *** y*
.2
11

### Cumulative Distribution Function

The cumulative distribution function (c.d.f. or distribution function, d.f.) of a continuous random variable is defined as##

###

###

###

*x*

*dt*

*t*

*f*

*x*

*X*

*P*

*x*

*F*

### (

### )

### (

### )

### (

### )

•*F*( )

*=*0

*, F*()

*=*1 •

*P*(

*a < X < b*)

*= F*(

*b*)

*– F*(

*a*) •

*F′*(

*x*) =

*f*(

*x*), if derivative exists 12 / 0 / 1 ) (

*t*

*x*

*x*

*e*

*e* 0 for , 1 ) (

*x*

*e*

*x*

*f*

*x*

**Example:**

If the *p.d.f.* of a continuous distribution *X*, waiting
time between arrivals of cars at a intersection, is,
where is a constant parameter of this distribution,

###

*x*

*dt*

*t*

*f*

*x*

*F*( ) ()

Find the distribution function.

###

*x*

*-t*

*dt*

*e*0 1

_{}

*x*

*e*

*x*

*x*

*F*

*0 , 1 0 , 0 ) (*

_{x}_{/}

_{}

13

### Measure of Center for a

### Continuous Distribution

The mean value (expected value) of a continuous random variable (distribution)*X*, denoted by * _{X}*or just(

*or E*[

*X*]) is defined as

##

###

###

*x*

*f*

### (

*x*

### )

*dx*

*X*

###

14### Measure of Spread for a

### Continuous Distribution

The**variance**of a continuous random variable (distribution)

*X*, denoted by

*2 or just2*

_{X}_{(}

_{or Var}_{[}

_{X}_{]) is defined as }

###

2 2 2 ) ( ) ( ] ) [(*X*

*x*

*f*

*xdx*

*E*

The standard deviation of *X* is
]
)
[( 2
2
*E* *X*
15

### Moment Generating Function

### for a Continuous Distribution

The moment generating function, if exists, of a continuous random variable (distribution)*X*, denoted by

*M*(

*t*) is defined as

*h*

*t*

*h*

*dx*

*x*

*f*

*e*

*e*

*E*

*t*

*M*

###

*tX*

###

*tx*

###

###

###

##

### (

### )

### ,

### ]

### [

### )

### (

16 elsewhere , 0 0.5 0 for , 8 ) (*x*

*x*

*x*

*f*

**Example:**

If the density function of a continuous distribution is

Find the mean and variance of this distribution

3 1 ) 0 125 (. 3 8 3 8 8 5 . 0 0 3 0.5 0

_{}

*x*

*x dx*

*x*The mean is

###

###

0.5 0 ( ) ) ( ) (*X*

*x*

*f*

*x dx*

*x*

*f*

*x dx*

*E* 17 elsewhere , 0 0.5 0 for , 8 ) (

*x*

*x*

*x*

*f*

**Example:**

If the density function of a continuous distribution is

Find the mean and variance of this distribution

The variance is 2 2 2
])
[
(
]
[
)
(*X* *E* *X* *E* *X*
*Var*
8
1
)
0
0625
(.
4
8
4
8
8
)
(
)
(
]
[
5
.
0
0
4
0.5
0
2
0.5
0
2
2
2

###

###

###

*x*

*x dx*

*x*

*dx*

*x*

*f*

*x*

*dx*

*x*

*f*

*x*

*X*

*E*72 1 3 1 8 1 ]) [ ( ] [ 2 2 2 2

_{}

_{}

*EX*

*EX*

*M*″(0)

*M*′(0)2 18

### The Percentile

The **(100****p****)th percentile** (**quantile of order *** p*)
is the number p

*such that the area under*

_{p}*f*(

*x*) to the left of p

*is*

_{p }*p*.

### )

### (

### )

### (

*x*

*dx*

*F*

_{p}*f*

*p*

###

##

p*p*

###

### p

p*p*

*p*

19

**Median of a distribution **
**Example:**

If the density function of a continuous distribution is

Find the median of this distribution.
elsewhere
,
0
0.5
0
for
,
8
)
(*x* *x* *x*
*f*
0.5
* x *
0

**f****(**

**x****) =**

*20 Median is*

**y***c*such that

What is *c*?

### 5

### 8

0*x*

*dx*

*.*

*c*

###

##

354 . 8 1 4 / 5 . 5 . 0 4 5 . 2 8 8 2 2 0 2 0 ###

*c*

*c*

*c*

*x*

*dx*

*x*

*c*

*c*21

**Percentile**

**Example:**

If the density function of a continuous distribution is

Find the 25th_{ percentile of this distribution. }

elsewhere
,
0
0.5
0
for
,
8
)
(*x* *x* *x*
*f*
0.5
0
**x **** f ****(****x****) = *** y*
22
25th

_{ percentile is }

_{c}_{ such that }

What is *c*?

### 25

### .

### 8

0###

##

*c*

*dx*

*x*

25
.
16
1
4
/
25
.
25
.
0
4
25
.
2
8
8
2
2
0
2
0
###

*c*

*c*

*c*

*x*

*dx*

*x*

*c*

*c*23

### Sample Quantile

Let*y*

_{1 }

*y*

_{2 }

*...*

*y*be the order statistics associated with the sample

_{n}*x*

_{1},

*x*

_{2}, ···,

*x*then

_{n },*y _{r}* is called the

**sample quantile of order**

* * as well as **percentile**.
1
*n*
*r*
1
100
*n*
*r*
**Example**: 1, 3, 7, 8, 9, 13

*n* = 6, and the value 8, *y*4 ,

is the [4/(6+1)]th quantile of the distribution of the sample, i.e. 0.571 sample quantile or 57.1 percentile.

*n*
*r*.5
25
.
375
.
*n*
*r*
Other
options:
24

### Examine Distribution with

### Quantile-Quantile Plot

Good model for the observations

Not a good model for
the observations
Theoretical
Distribution,
p*p*
Sample, *yr* Sample, *yr *
Theoretical
Distribution,
p*p *

25

### Continuous Distributions

2 The Uniform and ExponentialDistributions

26

### Uniform Distribution

The continuous random variable*X*has a

**uniform distribution**if its

*p.d.f.*is equal to a constant on its support. If the support is the interval [

*a*,

*b*], then its

*p.d.f.*is

### .

### ,

### 1

### )

### (

*a*

*x*

*b*

*a*

*b*

*x*

*f*

###

###

###

###

It is usually denoted as*U*(

*a*,

*b*).

*a b*

*a*

*b* 1

*f*(

*x*) 0

*a b*

*F*(

*x*) 1 0 27

### Uniform Distribution

The mean, variance, and m.g.f. of a continuous random variable*X*that has a

**uniform distribution**are:

.
0
,
1
,
0
,
)
(
)
(
,
12
)
(
,
2
2
2
*t*
*t*
*a*
*b*
*t*
*e*
*e*
*t*
*M*
*a*
*b*
*b*
*a*
*ta*
*tb*

Pseudo-Random Number Generator on most computers *U*(0, 1)

28

### Uniform Distribution

Example: Let*X*be

*U*(0,10), find the mean and the variance, and the m.g.f. of

*X*.

.
0
,
1
,
0
,
10
1
)
(
,
3
25
12
)
0
10
(
,
5
2
10
0
10
2
2
*t*
*t*
*t*
*e*
*t*
*M*
*t*
29

### Exponential Distribution

The continuous random variable*X*has an

**exponential distribution**if its p.d.f. is

_{}
elsewhere
,
0
0
for
,
1
)
(
/ _{x}*x*
*x*
*f*
*x*

where is the mean of the distribution.
** X* can be the waiting time until next success in a Poisson process.

30

### Exponential Distribution

The mean, variance, and m.g.f. of a continuous random variable*X*that has an

**exponential distribution**are:

1
,
1
1
)
(
,
, 2 2
*t*
*t*
*t*
*M*
_{}
*x*
*e*
*x*
*x*
*F* * _{x}*
0
,
1
0
,
0
)
(

_{/}

_{}

*c.d.f*.

31

### Exponential Distribution

**Example**: Let

*X*have an exponential distribution with a mean of 30, what is the first quartile of this distribution?

_{}

*x*

*e*

*x*

*x*

*F*

*0 , 1 0 , 0 ) (*

_{x}_{/}

_{30}p

*/ = ln(.75) p*

_{.25}*= ·ln(.75) p*

_{.25}*.25*= 30·ln(.75) {= 30} p

*.25*=

**8.63**75 . 25 . 1 ) ( .25 / / 2 5 . 2 5 . p p p

*e*

*e*

*F*p

**p****=**

**· ln(1 –**

**p****)**32

### Exponential Distribution

Let*W*be the waiting time until next success in a Poisson process in which the average number of success in unit interval is l, then, for

*w* 0

*F*(*w*) = *P*(*W**w*) = 1 – *P*(*W* > *w*)
= 1 – *P*(*W* > *w*)
= 1 – *P*(nosuccess in[*0,w*])
= 1 – *e-*l*w*_{d.f. of exponential distribution. }
*F *(*w*) = *f*(*w*) = l*e-*l*w *_{p.d.f. of exponential distribution. }
/
1 *x*
*e*
33

### Exponential Distribution

Let*W*be the waiting time until next success in a Poisson process in which the average number of success in unit interval is l, then, l

**= 1/**, where

**is**

**the average waiting time until next**

**success**, for

*w* 0

*F*(

*w*) = 1 –

*e-*l

*w*

_{ =}_{1 – }

**

_{e}-w/

_{ }*f*(

*w*) = p.d.f. of exponential distribution. / 1

**

_{e}*w*d.f. of exponential distribution. 34

### Exponential Distribution

Suppose that number of arrivals ofcustomers follows a Poisson process with a mean of 10 per hour. What is the probability that the next customer will arrive within 15 minutes? (15 min. = 0.25 hour)

l= 10 = 0.1
*P*(*X ** x*) = *F *(*x*) = 1 – *e-x/*
*P*(*X *0.25) = *F *(0.25) = 1 – *e-*0.25*/** *
*F *(0.25) = 1 – *e-*0.25/0.1_{= }** _{.918 }**
35

### Continuous Distributions

3 The Gamma and Chi-squareDistributions

36

### Gamma Distribution

The continuous random variable*X*has a

**Gamma distribution**,Gamma(a, ). if its p.d.f. is

_{} elsewhere. , 0 0 for , ) ( 1 ) ( / 1

_{e}

_{x}*x*

*x*

*f*

*x* a a a

** X* can be the waiting time until ath success in a Poisson process.

37

### Graphs of Gamma Distributions

a = 1/4
a = 1
a = 2
a = 3 _{a}
= 4
= 5/6
= 2
= 4
= 4 a = 4
= 1
= 3
0 10 20 30
0 10 20 30
38

### Gamma Distribution

The mean, variance, and m.g.f. of a continuous random variable*X*that has an

**Gamma distribution**are:

a
a
a
1
,
)
1
(
1
)
(
,
, 2 2
*t*
*t*
*t*
*M*

•Gamma(1, ) Exponential Distribution
•Gamma(2, *r*/2 ) Ch-square with d.f. = *r*.

39 40

### Special Notation

### c

2 a### (

*r*

### )

c2 a(r) Probability of*X*greater than or equal to c2

_{a}

_{(}

_{r}_{) }

_{is }a.

### a

### c

_{a}

###

###

_{}

### (

### )]

### [

2 1*r*

*X*

*P*

Example: Findc2
*.*05(3) = ? Tail area

### a

### c

a###

###

### (

### )]

### [

*X*

2 *r*

*P*

Let *X* be a random that has Chi-square distribution with
degrees of freedom *r*,
**7.815 **
41

### Try This!

• Findc2*.*01(7) = ? • Findc2

*.*025(4) = ?

• Find the 10th_{ percentile from a }c2
distribution with degrees of freedom 6.

42

### Continuous Distributions

4 Distributions of Functions ofRandom Variable

43

**A Good Generator **

• Simple

• Widespread use

• Long cycle length 231_{ – 2 (all number }
besides 1 and 231_{ – 1 can be generated.) }
• *U _{i}*=

*X*/(231

_{i}_{ – 1), }

_{U}*i* ~ U(0,1)

*X _{i}* = (397,204,094

*X*

_{i-}_{1}) mod (231

_{ – 1) }

Starts with a **Seed** number

44

**Methods for Generating **

**Non-Uniform RN’s **

• CDF Inversion
• Transformations
• Accept/Reject Methods
• …
45
### CDF Inversion

**Theorem: ** Let *U * have a distribution that is

*U*(0,1). Let *F*(*x*) have the properties of a
distribution function of the continuous type with

*F*(*a*) = 0 and *F*(*b*) = 1, and suppose that *F*(*x*) is
strictly increasing on the support *a < x < b*,
where *a* and *b* could be and ,

respectively. Then the random variable *X*

defined by *X* = *F *1_{(}_{U}_{) is a continuous }
random variable with distribution function *F*(*x*).

46

### Proof:

Let *X* = *F *1_{(}_{U}_{) , the distribution function of }_{X}_{ is}

*P* (*X**x* ) = *P* [ *F*1_{(}_{U}_{) }_{ }_{x}_{ ], }_{a}_{ < }_{ x }_{< }_{b .}

Since* F *(*x*) is strictly increasing, {* F*1_{(}_{U}_{) }_{ }_{x }_{} is }

equivalent to { *U**F *(*x*) } and hence

*P* ( *X* *x* ) = *P* [ *U* *F *(*x*) ], *a* < * x *< *b .*

But *U * is *U*(0, 1); so *P* ( *U* *u* ) = *u * for 0 < *u *<
1, and accordingly,

*P* ( *X* *x* ) = *P* [ *U**F* (*x*) ] = *F* (*x*) , 0 *F*(*x*) < 1*.*

That is the distribution function of *X *is *F*(*x*).

47

**Generate random numbers from **

**Exponential distribution, **

###

**= 10 **

• *F*(*x*) = 1 *e**x/10*_{ and }* _{x =F}*1

_{(}

_{y}_{) = }

_{10·}

_{ln}_{(1}

_{y}_{) }

• Use uniform *U*(0, 1) random number generator to
generate random numbers *y*1, *y*2, ..., *yn* .

• The exponentially distributed random numbers *xi*'s

would be *xi*= 10·*ln*(1*yi*) , *i = *1, ..., *n*.

• Therefore, if the uniform random number generator
generates a number **0.1514**, then **1.6417** = 10·*ln*(1
0.1514) would be a random observation from
exponential distribution with = 10.

48

### Try this!!!

1. Use the CDF Inversion method to convert this

*U*(0,1) random number to simulate an observation
from an **exponential distribution with **** = 12**.

*xi*= *F*1(*yi*) = 12·*ln*(1*yi*)

2. Use CDF Inversion method to generate a random
number from the continuous random variable that has
the following p.d.f.
elsewhere
,
0
0.5
0
for
,
8
)
(*x* *x* *x*
*f*

An *U*(0,1) random number generator has
generated a value of **0.26**.