You are on page 1of 15

Random Variables and CDF

Giulia Giantesio
giulia.giantesio@unicatt.it
Motivation

A random variable is an abstract way to talk about experimental outcomes, which makes it
possible to flexibly apply probability theory.
Random variable

Definition (Random variable)


Let (Ω, A) a measurable space. A function X : Ω → R such that ∀x ∈ R :

{ω ∈ Ω : X (ω) ≤ x} ∈ A

is called random variable.


Random variable

Definition
A random variable is discrete if its domain consists of a finite (or countably infinite) set of
values. A random variable is continuous if its domain is uncountably infinite.
Example

Suppose that a coin is tossed twice.


Let X represent the number of heads that can come up.
CDF

Definition (Cumulative distribution function)


Let (Ω, A, p) a probability space and X a random variable. The cumulative distribution
function (c.d.f.) or more simply the distribution function FX : R → [0, 1] of the random
variable X is defined by

FX (x) = p (AX (x)) = p ({ω ∈ Ω : X (ω) ⩽ x}) = p ([X ⩽ x]) .


CDF: properties

Theorem
Let (Ω, A, p) probability space and X random variable. The cdf FX satisfies
1 FX is a non-decreasing function: x < y ⇒ FX (x) ⩽ FX (y );
2 lim FX (x) = 0;
x→−∞
3 lim FX (x) = 1;
x→+∞
4 FX is continuous from the right: lim+ FX (x + h) = FX (x).
h→0
CDF properties: example



 0 if x < 0

2x if 0 ⩽ x < 1
a) FX (x) =


 −x + 3 if 1 ⩽ x < 2

1 if x ⩾ 2

0 if x < 0

b) FX (x) = x if 0 ⩽ x < 12

1 if x ⩾ 12

(
0 if x < 0
c) FX (x) = −λx
with λ > 0
1−e if x ⩾ 0
CDF: example

Suppose that a coin is tossed twice. Let X represent the number of heads that can come up.
CDF: example

Suppose that a coin is tossed twice. Let X represent the number of heads that can come up.
CDF: discrete random variable

Let X be a discrete random variable.


Theorem
The cdf FX is a step function. The size of the steps in the points xn ∈ X (Ω) such that
p [X = xn ] > 0 is equal to p [X = xn ].
CDF: discrete random variable

Let X be a discrete random variable.


Theorem
The cdf FX is a step function. The size of the steps in the points xn ∈ X (Ω) such that
p [X = xn ] > 0 is equal to p [X = xn ].

Let’s compute p[X = a]


CDF: discrete random variable

Proposition
We have:
a) p[X = xn ] = FX (xn ) − lim FX (x);
x→xn−
b) p[X > xn ] = 1 − p[X ⩽ xn ];
c) p[xn ⩽ X ⩽ xn+1 ] = FX (xn+1 ) − lim FX (x).
x→xn−
CDF: continuous random variable

Let X be a continuous random variable.


Proposition
If a, b ∈ R with a < b, then
a) p[X = a] = 0;
b) p[X > a] = 1 − FX (a);
c) p[a ⩽ X ⩽ b] = FX (b) − FX (a).
Continuous r. v. : example

Let X a random
( variable describing the life time in years of a machinery and let FX the cdf:
0 if x < 0
FX (x) = −λx
with λ > 0.
1−e if x ⩾ 0
Compute the probability that the machinery will work
a) less than 1 year;
b) between 2 and 4 years;
c) more than 6 years.

You might also like