Continuous Random Variables, Moments and Moment Generating Function

Continuous random variable

I

Definition: A random variable X is continuous if the CDF FX (x) = P(X ≤ x) is a continuous function of x.

I

Example 1: Weight of a new born baby;

I

Example 2: Waiting time in a bus stop.

Density function

I

Definition: The probability density function fX (x) of a continuous random variable X is the function that satisfies Rx FX (x) = −∞ fX (t)dt.

I

Remark: There exist continuous random variables which do not have densities. We will only discuss the case where the density exists.

CDF and density function

I

If X has a density fX (x), then FX (x) =

Rx

−∞ fX (u)du.

If

FX (x) is differentiable, then d FX (x)|x=x0 = FX0 (x0 ) dx but FX0 (x0 ) is not necessary to be the same as fX (x0 ). I

If fX (x) is continuous at point x0 , then d FX (x)|x=x0 = FX0 (x0 ) = fX (x0 ). dx

Example   2x Define FX (x) =  1x + 2

0≤x < 1 2

   2 0 ≤ x < 13   1 1 fX (x) = 2 3 ≤x ≤1     0 otherwise (a) FX (x) =

Rx

−∞ fX (t)dt

=

1 3

1 3

≤x ≤1   2 0 ≤ x < 31 , x 6=       1 x=1 6 ∗ fX (x) =  1 1   2 3 ≤x ≤1     0 otherwise

Rx

∗ −∞ fX (t)dt.

(b)

dFX (x) dx |x= 13

does not exist but fX ( 13 ) = 12 .

(c)

dFX (x) dx |x= 16

= fX ( 61 ) 6= fX∗ ( 16 ).

1 6

Density is not probability I

Note that fX (t) is not probability. Actually, P(X = t) = 0 for any t if X is a continuous random variable. Because {X = t} ⊂ {t −  < X ≤ t} for any  P(X = t) ≤ P(t −  < X ≤ t) = FX (t) − FX (t − ). Hence 0 ≤ P(X = t) ≤ lim→0 [FX (t) − FX (t − )] = 0 by continuity of FX .

I

Any meaningful statement about probability must consider X lying in some interval. Probability is interpreted as the area under the density function.

Example: Logistic distribution

A random variable X with logistic distribution if FX (x) =

1 . 1+e−x

Then fX (x) =

dFX (x) e−x = dx (1 + e−x )2

P(a < X < b) = FX (b) − FX (a) Z b Z = fX (x)dx − −∞

a

Z fX (x)dx =

−∞

If ∆x is small, P(a ≤ x ≤ a + ∆x) ≈ fX (a)∆x.

b

fX (x)dx. a

Quantile and median I

Definition: Let X be a random variable with CDF FX (x). For any 0 < α < 1, an quantile of X is any number xα satisfying FX (xα ) ≥ α

and FX (xα− ) ≤ α.

The median is x0.5 . I

Quantiles defined above may not be unique. To make it unique, we usually define the quantile as xα = inf{x : FX (x) ≥ α}.

Example

Let X have CDF

F (u) =

  0        u 2 /2   3

4     3   4 +     1

u−2 4

u