Skip to content

Continuous Probability ​

Cumulative distribution function ​

The cumulative distribution function of a random variable X is a function F:R→[0,1], where

F(t)=P(X≤t)

holds for every real number t.

Density function ​

A function f:R→R is density function of a random variable X if

P(a<X≤b)=∫_abf(x)dx

holds for every real numbers a<b.

Then (only if the density function exists) we have

F(t)=P(X≤t)=∫_−∞tf(x)dxandf(t)=F′(t),

where the latter equation is for "almost all" real numbers t.

For every density function f we have ∫−∞∞f(x)dx=1 and f(x)≥0 for "almost all" real numbers t.

Expectation ​

Let X be a random variable with density function f. Then the expectation of X is given by

E(X)=∫_−∞∞x⋅f(x)dx.

The variance of X:

Var(X)=E(X2)−(E(X))2.

The standard deviation of X:

s.d.(X)=E(X2)−(E(X))2.

Note: expectation of X2

E(X2)=∫_−∞∞x2⋅f(x)dx.

Exponential distribution ​

A random variable X has exponential distribution with parameter λ if its density function is:

f(x)={0,x<0,λe−λx,x≥0.

If X has exponential distribution with parameter λ, then

E(X)=s.d.(X)=1λ.

Example 1 ​

Problem

We have ordered an item online, and we know that the delivery is between 8:00 and 10:00, at a time which is uniformly distributed on the interval [8,10]: the probability that it is between a and b is proportional to b−a, if 8≤a≤b≤10. Let X be the time of the delivery (it is a random element of [8,10], hence this is a random variable).

a) Calculate P(X≤9)

b) P(8.5<X<9)

c) P(X>9.75)

Solution

a) Since the probabilities are proportional to the length of the interval (a = 8, b = 9):

P(X≤9)=9−810−8=12.

b) Since the probabilities are proportional to the length of the interval (a = 8.5, b = 9):

P(8.5<X<9)=9−8.510−8=14.

c) Since the probabilities are proportional to the length of the interval (a = 9.75, b = 10):

P(X>9.75)=10−9.7510−8=18.

Example 2 ​

Problem

Let the cumulative distribution function of X be given by:

F(t)=P(X≤t)={0,if t≤0;25t2,if 0≤t≤1/5;1,if t≥1/5.

a) Determine the density function of X.

b) What is the probability that X is between 0.1 and 0.15?

c) Determine the expectation of X.

d) Determine the standard deviation of X.

Solution

a) If it exists, the density function is the derivative of the cumulative distribution function:

f(x)={0,if x<0;50⋅x,if 0≤x≤1/5;0,if x≥1/5.

It is easy to check that ∫−∞tf(x)dx=F(t) is satisfied for every t.

b) Based on the definition of the cumulative distribution function:

P(0.1≤X≤0.15)=P(X≤0.15)−P(X≤0.1)==F(0.15)−F(0.1)=25⋅0.152−25⋅0.12=31.25%.

Or:

P(0.1≤X≤0.15)=∫_0.10.15f(x)dx.

c) Based on the definition of expectation:

E(X)=∫∗−∞∞x⋅f(x)dx=∫∗01/550⋅x2dx=50⋅[x33]_x=01/5=50⋅153⋅3=0.13.

d) We first calculate the expectation of X2:

E(X2)=∫∗−∞∞x2⋅f(x)dx=∫∗01/550⋅x2dx=50⋅[x44]_x=01/5=50⋅154⋅4=0.02.

And then calculate the standard deviation:

s.d.(X)=E(X2)−(E(X))2=0.02−0.132=0.06.

Example 3 ​

Problem

Suppose that X has uniform distribution on the interval [0,1], that is, its density function is 1 within [0,1] and 0 otherwise.

a) Find the cumulative distribution function and density function of X2.

b) Find the cumulative distribution function and density function of X5.

c) Determine the expectation and variance of X.

Solution

Since X∼Uniform[0,1], its density function is:

fX(x)={1,0≤x≤1,0,otherwise.

The CDF (cumulative distribution function) of X, which we'll need later, is:

F∗X(x)=P(X≤x)=∫∗0x1dt=xfor 0≤x≤1,

so:

FX(x)={0,x<0,x,0≤x≤1,1,x>1.

a) Find the cumulative distribution function and density function of X2:

P(X2≤t)={0,t≤0;t,0<t<1;1,t≥1.

The density function of X2 can be determined by differentiating it:

fX2(t)={0,t≤0;12t,0<t<1;0,t≥1.

b) Find the cumulative distribution function and density function of X5:

P(X5≤t)={0,t≤0;t1/5,0<t<1;1,t≥1.

The density function of X5 can be determined by differentiating it:

fX5(t)={0,t≤0;15⋅t−4/5,0<t<1;0,t≥1.

c) Because the primitive function of x is x22, and b2−a2=(b−a)(b+a):

E(X)=∫∗−∞∞x⋅f(x)dx==∫∗abx⋅1b−adx==1b−a[x22]_x=ab==1b−a⋅b2−a22==a+b2

Because the primitive function of x2 is x33, and b3−a3=(b−a)(a2+ab+b2):

E(X2)=∫∗−∞∞x2⋅f(x)dx==∫∗abx2⋅1b−adx==1b−a[x33]_x=ab==1b−a⋅b3−a33==a2+ab+b23

And then we find the variance of X is as follows:

Var(X)=E(X2)−[E(X)]2==a2+ab+b23−(a+b2)2==a2+ab+b23−a2+2ab+b24==(b−a)212