Page 1

Integrating probability density functions

The general shape of a density function is determined by the simplest function of Other factors such as the

Îť

in the exponential distribution or the

Ν/Γ(r)

x

within the density.

in the gamma distribution control

the severity of the peak or derivative and are included simply so the density will integrate to 1 over the support of the random variable. Because of the primary reliance on the simplest function of

x

x,

is it often useful to be able to identify

in a density. The examples we have seen are in the table below:

Distribution

Density function

Exponential

Îťeâˆ’Îťx , x ≼ 0

Simplest function of

x

e−x

.

√1 Ďƒ 2Ď€

Normal

exp

n

o

−(xâˆ’Âľ)2 2Ďƒ 2

e−x

, x∈R

2

.

Îťeâˆ’Îťx (Îťx)r−1 , Γ(r)

Gamma

x≼0

e−kx xs

â&#x2C6;&#x2019; x)βâ&#x2C6;&#x2019;1 , 0 < x < 1

xa (1 â&#x2C6;&#x2019; x)b

.

1 Îąâ&#x2C6;&#x2019;1 (1 B(Îą, β) x

Beta

All the above parameters, with the exception of normal distribution, must be positive;

Âľ

Âľ

in the

can be any real number.

By identifying a simplest function within an integral, we can usually compute the integral without expliticly going through the steps of symbolic integration. You should also make sure the bounds on the integral match those of the relevant density function. Example. If you are asked to integrate

嫉&#x2C6;&#x17E; 0

8eâ&#x2C6;&#x2019;2x x5 dx,

gamma distribution. Specically, we see

Îť=2

you should see the integrand has the form of a

r = 6.

and

Now, we multiply by the correct constants

so the integrand becomes a gamma density:

Ë&#x2020;

Ë&#x2020; â&#x2C6;&#x17E; 6 2 Î&#x201C;(6) eâ&#x2C6;&#x2019;2x x5 dx 8Ă&#x2014; 6 Ă&#x2014; 2 Î&#x201C;(6) 0 Ë&#x2020; â&#x2C6;&#x17E; â&#x2C6;&#x2019;2x 5 5 8 Ă&#x2014; Î&#x201C;(6) 2e 2 x Ă&#x2014; dx 26 Î&#x201C;(6) 0 Ë&#x2020; â&#x2C6;&#x17E; â&#x2C6;&#x2019;2x 8 Ă&#x2014; Î&#x201C;(6) 2e (2x)5 Ă&#x2014; dx 26 Î&#x201C;(6) 0 8 Ă&#x2014; Î&#x201C;(6) Ă&#x2014;1 26 8 Ă&#x2014; 5! = 5 Ă&#x2014; 3 = 15 26

â&#x2C6;&#x17E;

8e

â&#x2C6;&#x2019;2x 5

x dx

=

0

= = = =

Example. Suppose you are asked to integrate

嫉&#x2C6;&#x17E;

2

â&#x2C6;&#x2019;â&#x2C6;&#x17E;

eâ&#x2C6;&#x2019;6x dx.

This looks like it could be a normal distribu-

tion:

Ë&#x2020;

â&#x2C6;&#x17E;

e

â&#x2C6;&#x2019;6x2

Ë&#x2020; dx

â&#x2C6;&#x17E;

=

 exp

â&#x2C6;&#x2019;â&#x2C6;&#x17E; Ë&#x2020; â&#x2C6;&#x17E;

â&#x2C6;&#x2019;â&#x2C6;&#x17E;

=

exp â&#x2C6;&#x2019;â&#x2C6;&#x17E;

1



x2 1/6



x2 1 2( 12 )

dx  dx


Now, we see

Ď&#x192; 2 = 1/12 Ë&#x2020;

and

â&#x2C6;&#x17E;

e

Âľ = 0:

â&#x2C6;&#x2019;6x2

r dx

=

â&#x2C6;&#x2019;â&#x2C6;&#x17E;

r =

Example. Integrate

´1 0

x5 (1 â&#x2C6;&#x2019; x2 )9 dx.

1â&#x2C6;&#x161; 2Ď&#x20AC; 12

Ë&#x2020;

â&#x2C6;&#x2019;â&#x2C6;&#x17E;

r

2Ď&#x20AC; = 12

â&#x2C6;&#x17E;

q

1 â&#x2C6;&#x161; 1 12

 exp 2Ď&#x20AC;

x2 1 ) 2( 12

 dx

Ď&#x20AC; = 0.724 6

To use the beta distribution, we need to get rid of

x2

in the second

factor:

Ë&#x2020;

Ë&#x2020;

1 5

2 9

x (1 â&#x2C6;&#x2019; x ) dx

1

(x2 )5/2 (1 â&#x2C6;&#x2019; x2 )9 dx

=

0

0

y = x2

let

dy = 2x dx Ë&#x2020;

1

= 0

= = = =

1 2

Ë&#x2020;

y 5/2 (1 â&#x2C6;&#x2019; y)9 dy â&#x2C6;&#x161; 2 y 1

y 2 (1 â&#x2C6;&#x2019; y)9 dy 0

Ë&#x2020; 1 1 1 B(3, 10) y 2 (1 â&#x2C6;&#x2019; y)9 dy 2 0 B(3, 10) 1 Î&#x201C;(3)Î&#x201C;(10) 2 Î&#x201C;(13) 1 1 1 2!9! = = 2 12! 12 Ă&#x2014; 11 Ă&#x2014; 10 1, 320

Note These tricks will work in any application outside the eld of probability. Any time you are asked to

integrate a function of the form as many as

s

eâ&#x2C6;&#x2019;kx xs ,

you can follow the steps above to avoid integrating by parts

times.

2

integrating densities  

integrating densities

Advertisement