Chapitre 2
Chapitre 2
CHAPTER 2
Random Variables
Definition: A random variable, X is defined as a function from the sample space to the real
numbers: X: Ω → R.
A random variable therefore assigns a real number to every possible outcome of
a random experiment.
The distribution function:
Definition: The cumulative distribution function of a random variable X is given by
FX(x) = P(X ≤x)
FX(x) is often referred to as simply the distribution function.
1. ∀𝑡 ∈ 𝑅: 0 ≤ 𝐹𝑋 ≤ 1.
2. FX(x) is a non-decreasing function of x: if x 1< x2 then FX(x 1) ≤ FX(x2).
3. lim FX (t) = 0 and lim FX (t) = 1.
𝑡→−∞ 𝑡→+∞
4. If a ≤ b then P (a ≤ X ≤ b) = FX (b) - FX (a).
The probabilities in the probability distribution of a random variable X must satisfy the
following two conditions:
Example1: we roll a coin 3 times; the random variable X represents the number of piles
Xi X1= 0 X2 = 1 X3 = 2 X4 =3 Total
P [X=xi] 1/8 3/8 3/8 1/8 ∑4𝑖=1 P(xi)
=1
Si x<0 →F(X) = 0
Si 0≤X<1 → F(X) = 1/8
Si 1≤X<2 → F(X) = 1/8+3/8 = 4/8
Si 2≤X<3 → F(X) = 4/8+3/8 =7/8
Si x≥3 → F(X) = 7/8+1/8 =1
Definition: The mean (also called the expected value) of a discrete random variable X is
the number
E(X) = ∑𝑛𝑖=1 xi P(X = xi)
The mean of a random variable may be interpreted as the average of the values assumed by
the random variable in repeated trials of the experiment.
Badji Mokhtar University - Annaba
Faculty of Technology كلية التكنولوجيا
Definition: The variance (we note it V(X) or σ2) of a discrete random variable X is the
number
V(X) = E(X2) – [E(X)] 2
V(X) = ∑𝑛 2 𝒏
𝑖=1 xi P(X = xi) - [ ∑𝒊=𝟏 𝐱 𝐢 𝐏(𝐗 = 𝐱𝐢)]
2
Definition: The standard deviation, σ, of a discrete random variable X is the square root of its
variance, hence is given by the formulas
σ(X) = √𝑉(𝑋)
The variance and standard deviation of a discrete random variable X may be interpreted as
measures of the variability of the values assumed by the random variable in repeated trials of
the experiment. The units on the standard deviation match those of X.
Xi X1= -1 X2 = 0 X3 = 1 X4 = 4
P [X=xi] 0.2 0.5 a 0.1
Example: A pair of fair dice is rolled. Let X denotes the sum of the number of dots on the top
faces.
Answer:
1. X(Ω) = {2,3,4,5,6,7,8,9,10,11,12}
Xi 2 3 4 5 6 7 8 9 10 11 12
P [X=xi] 1/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36
Every density function f(x) must satisfy the following two conditions:
In practice, this means that a continuous random variable takes values in a continuous subset
of R
Badji Mokhtar University - Annaba
Faculty of Technology كلية التكنولوجيا
Definition: the function f is said to be the probability density of X if and only if:
∗ 𝑓 ≥ 0 , ∀𝑥 ∈ 𝑅
∗ 𝑓 𝑖𝑠 𝑐𝑜𝑛𝑡𝑖𝑛𝑢𝑜𝑢𝑠
+∞
∗ ∫ 𝑓 (𝑥)𝑑𝑥 = 1
{ −∞
The distribution function FX(x) : It can be written in terms of the probability density
function, f(x), as follows:
𝑋
∀𝑥 ∈ 𝑅: 𝐹(𝑋) = ∫ 𝑓(𝑡)𝑑𝑡
−∞
Remark
For continuous random variables, every point x has P(X = x) = 0. This means that the
endpoints of intervals are not important for continuous random variables.
Thus, P (a ≤ X ≤ b) = P (a < X ≤ b) = P (a ≤ X < b) = P (a < X < b). This is only true for
continuous random variables.
+∞ +∞
V(X) = ∫−∞ 𝑥 2 𝑓 (𝑥 )𝑑𝑥 – [∫−∞ 𝑥𝑓(𝑥 )𝑑𝑥]2
Example 2.
Badji Mokhtar University - Annaba
Faculty of Technology كلية التكنولوجيا