

Every continuous random variable has a probability density function (PDF) f. Probability density function has probability distribution and definite integralfollowing properties:

  1. `f(x)>=0` for all x, (probability must be negative).
  2. `int_(-oo)^(oo)f(x)dx=1`, (probabilities of all possible outcomes must add up to 1).

So, to calculate probability that random variable X lies in interval [a,b], we need to evaluate following integral: `P(a<=X<=b)=int_a^b f(x)dx`.

Example 1. Let `f(x)={(Ae^(-cx) if x>=0),(0 if x<0):}` .

Find constant A, so that f(x) is probability density function.

Let c=0.2. Find probability that X is less than 3, probability that X lies in interval [4,6] and probability that X greater then 7.


Clearly, `f(x)>=0`, therefore we need to find such A that `int_(-oo)^(oo)f(x)dx=1` .

Note, that since `f(x)=0` for `x<0` then we change limits of integration to `0,oo` .

This integral is improper, so we use definition of improper integral:


`=-A/clim_(t->oo)(e^(-ct)-1)=-A/c(-1)=A/c` .

This value must equal 1. therefore `A=c` .

`f(x)={(ce^(-cx) if x>=0),(0 if x<0):}` is probability density function of exponentially distributed random variable

If c=0.2 then `f(x)={(0.2e^(-0.2x) if x>=0),(0 if x<0):}`.

First of all note that there is no difference between `P(X<=3)` and `P(X<3)` , because `P(X=3)=0`: `P(X<=3)=P(X<3)+P(X=3)=P(X<3)+0=P(X<3)`.

`P(X<=3)=int_(-oo)^3 f(x)dx=int_0^3 0.2e^(-0.2x)dx=-e^(-0.2x)|_0^3=1-e^(-0.6)~~0.4512`.

`P(4<=X<=6)=int_4^6f(x)dx=int_4^6 0.2e^(-0.2x)dx=-e^(-0.2x)|_4^6=e^(-0.8)-e^(-1.2)~~`




The mean of any probability density function is defined to be `mu=int_(-oo)^(oo)xf(x)dx`.

The expression for the mean resembles an integral we have seen before in the Moments and Centers of Mass note. If R is the region that lies under the graph of f, we know that x-coordinate of the centroid of R is `(int_(-oo)^(oo)xf(x)dx)/(int_(-oo)^(oo)f(x)dx)=(int_(-oo)^(oo)xf(x)dx)/(1)=int_(-oo)^(oo)xf(x)dx=mu`.

So a thin plate in the shape of R balances at a point on the vertical line `x=mu`.

Example 2. Find the mean of exponentially distributed random varible.

We know that exponentially distributed random variable has PDF `f(x)={(ce^(-cx) if x>=0),(0 if x<0):}`.

Therefore, `mu=int_(-oo)^(oo)xf(x)dx=int_0^(oo)xce^(-cx)dx=lim_(t->oo)int_0^txce^(-cx)dx`.

On this stage we use integration by parts: let `u=x` and `dv=ce^(-cx)dx` then `du=dx` and `v=int ce^(-cx)dx=-e^(-cx)` .

Now, we have `lim_(t->oo)int_0^t xce^(-cx)dx=lim_(t->oo)(x(-e^(-cx))|_0^t-int_0^t(-e^(-cx))dx)=lim_(t->oo)(-te^(-ct)-1/c e^(-cx)|_0^t)=`

`=lim_(t->oo)(-te^(-ct)-1/c e^(-ct)+1/c)=1/c`.

Therefore, `mu=1/c` and PDF can be rewritten as `f(x)={(1/mu e^(-x/mu) if x>=0),(0 if x<0):}`.