Professional Documents
Culture Documents
Econ-2042 - Unit 2-W3-5
Econ-2042 - Unit 2-W3-5
De…nition (2.1)
A random variable ( rv) is a real valued function
de…ned on the elements of a sample space; i.e., if
S is a sample space with probability measure and
X is a real valued function de…ned over the
elements of S, then X is called a random variable.
Alternatively,
F. Guta (CoBE) Econ 2042 March, 2024 3 / 54
A random variable is a real valid function
X : S ! R such that Ax = fω : X (ω ) xg is a
member of F (means P (Ax ) is de…ned).
Example (2.1)
Toss a fair coin, S = fH, T g. De…ne X by
X (ω ) = 0; ω =T and X (ω ) = 1; ω =H
1
Consider, x = 2 and Ax = A1/2 , then
A1/2 = fω : X (ω ) 1/2g = fT g.
Example (2.3)
Consider an experiment of tossing two coins. Let
the random variable X denote the number of
heads, and let the random variable Y denote the
number of tails. Then S = fHH, HT , TH, TT g,
F. Guta (CoBE) Econ 2042 March, 2024 5 / 54
Example (2.3 continued. . . )
and X (ω ) = 2 if ω = HH, X (ω ) = 1 if ω = HT
or TH, X (ω ) = 0 if ω = TT .
Similarly, Y (ω ) = 2 if ω = TT , Y (ω ) = 1 if
ω = HT or TH, Y (ω ) = 0 if ω = HH
ω X Y X +Y
HH 2 0 2
HT 1 1 2
TH 1 1 2
TT 0 2 2
F. Guta (CoBE) Econ 2042 March, 2024 6 / 54
Example (2.3 continued. . . )
We say that the space of the rv X = f0, 1, 2g.
Example (2.4)
The sample space for tossing a die once is
S = f1, 2, 3, 4, 5, 6g.
Let the rv X denote a number on the face that
turns up in a sample point, then we can write
Example (2.5)
The sample space for tossing a coin until a head
turns up is
i). As x ! ∞, FX (x ) ! 0
Proof: As x ! ∞, Ax ! ? but P (?) = 0
As x ! ∞, FX (x ) ! 0.
ii). As x ! ∞, FX (x ) ! 1
F. Guta (CoBE) Econ 2042 March, 2024 10 / 54
Proof: As x ! ∞, Ax ! S but P (S ) = 1
As x ! ∞, FX (x ) ! 1.
fX (x ) = Pr(X = x )
Example (2.6)
In the experiment of tossing an unbiased coin once
we have the sample space, S = fH, T g with
P (H ) = P (T ) = 0.5.
Let the rv X = number of heads in a sample point,
then
x fX (x ) = P (X = x )
0 0.5
1 0.5
F. Guta (CoBE) Econ 2042 March, 2024 14 / 54
Example (2.7)
In an experiment of tossing an unbiased coin twice
we have the sample space,
S = fHH, HT , TH, TT g.
Let the rv X = number of heads in a sample point,
s, then letting P (H ) = p and P (T ) = 1 p, we
can present this as follows:
x f X (x ) = P (X = x )
0 (1 p )2 0.25
1 2p (1 p) 0.50
2 p2 0.25
∞ ∞
) ∑ fX (x ) = ∑ P (X = x ) = ∑ p (1 p )x 1
= 1.
x x =1 x =1
Example (2.9)
In the experiment of rolling a die we have the
F. Guta (CoBE) Econ 2042 March, 2024 18 / 54
Example (2.9 continued. . . )
sample space, S = f1, 2, 3, 4, 5, 6g.
Here, X (ω ) = ω, P (ω ) = 1/6. Such distributions
are known as uniform distributions.
x f X (x ) = P (X = x ) P (X x ) = F X (x )
1 1
1 6 6
1 2
2 6 6
1 3
3 6 6
1 4
4 6 6
1 5
5 6 6
1
6 6 1
F. Guta (CoBE) Econ 2042 March, 2024 19 / 54
Example (2.9 continued. . . )
Probability mass function of the above uniform
distribution is given by:
8
< 1 , x = 1, 2, : : : , 6
6
fX (x ) =
: 0, elsewhere
P (1 < X < 2) = 0.
5/6
4/6
3/6
2/6
1/6
x
0 1 2 3 4 5 6
FX (x ) = P (X x) = ∑ fX (y )
y x
F. Guta (CoBE) Econ 2042 March, 2024 21 / 54
Let R = the space of the random variable X , then
Then
FX (x ) = 0 for x < x1
FX (x1 ) = fX (x1 )
FX (x ) = fX (x1 ) for x1 x < x2
FX (x2 ) = fX (x1 ) + fX (x2 )
FX (x ) = fX (x1 ) + fX (x2 ) for x2 x < x3
F. Guta (CoBE) Econ 2042 March, 2024 22 / 54
FX (x2 ) = fX (x1 ) + fX (x2 ) + fX (x3 ),
..
.
FX (x ) = 1 when x xk
a). 0 FX (x ) 1
b). FX (x ) is non-decreasing
c). FX (x ) = 0 for x < x1 , x1 being the minimum of
the values of the random variable X .
F. Guta (CoBE) Econ 2042 March, 2024 23 / 54
d). FX (x ) = 1 for x xn , xn being the largest value of
X.
e). P (x < X x 0 ) = P (X x 0) P (X x) =
FX (x 0 ) FX (x )
= FX (b) FX (a)
P (x < X < x + ∆x ) = FX (x + ∆x ) FX (x )
) FX ( x + ∆ x ) FX ( x ) = f X ( x ) ∆ x
F. Guta (CoBE) Econ 2042 March, 2024 28 / 54
FX (x +∆x ) FX (x )
) lim∆x!0 ∆x = fX (x )
dFX (x )
) = fX (x )
dx
The function fX (x ) is known as the pdf of the rv
X and measures the density of the function at a
point. As ∆x ! 0, x + ∆x ! x, P (x < X < x + ∆x ) ! 0.
dFX (x ) Rx
vi). dx = fX (x ) ) FX (x ) FX ( ∞) = ∞ fX (u ) du
vii). Since FX (x ) is non-decreasing it follows that
a). fX (x ) 0
Z +∞
b). fX (x ) dx = 1
∞
F. Guta (CoBE) Econ 2042 March, 2024 29 / 54
viii). Note, however, that fX (a) 6= P (X = a), and fX (a)
could actually be greater than 1. For a continuous
rv X , P (X = a) = lim∆a!0 P (a X < a + ∆a) = 0.
E (X ) = ∑i xi fX (xi )
E (X ) = ∑ xi fX (xi )
i
E (X ) is also denoted by µ.
Bernoulli Random Variable: A random variable
with only two outcomes (0 and 1) is known as a
Bernoulli random variable.
F. Guta (CoBE) Econ 2042 March, 2024 32 / 54
Example (2.10)
Let X be a rv with probability p of success and
(1 p ) of failure:
x fX (x )
Failure 0 1 p
Success 1 p
E ( X ) = 0( 1 p ) + 1(p ) = p.
Example (2.11)
Let X be the number of trials required to produce
the 1st success, say a head in a toss of a fair coin.
This is described by a geometric rv and is given as
x fX (x )
1 p
F. Guta (CoBE) Econ 2042 March, 2024 34 / 54
Example (2.11 continued. . . )
x fX ( x )
2 (1 p) p
3 (1 p )2 p
4 (1 p )3 p
.. ..
. .
E (X ) = 1 p+2 (1 p) p + 3 (1 p )2 p + 4 (1 p )3 p +
h i
= p 1 + 2 (1 p ) + 3 (1 p )2 + 4 (1 p )3 +
S = 1 + 2 (1 p ) + 3 (1 p )2 + 4 (1 p )3 + then
(1 p ) S = (1 p ) + 2 (1 p )2 + 3 (1 p )3 + 4 (1 p )4 +
S (1 p ) S = 1 + (1 p ) + (1 p )2 + (1 p )3 +
1
pS =
p
1
S=
p2
1 1
) E (X ) = p =
p2 p
F. Guta (CoBE) Econ 2042 March, 2024 36 / 54
Example (2.11 continued. . . )
Alternatively,
8
>
>
>
< p (1 p )x 1
, if x = 1, 2, 3, : : :
fX ( x ) = P ( X = x ) =
>
>
>
: 0, otherwise
∞ ∞ ∞
E (X ) = ∑ xfX (x ) = ∑ xp (1 p )x 1
=p ∑ x (1 p )x 1
x =1 x =1 x =1
∞
d d
= p ∑ dp (1 p )x , as
dp
(1 p )x = x (1 p )x 1
x =1
" # " #
d ∞ d ∞
dp x∑ dp x∑
= p (1 p )x = p (1 p )x
=1 =0
d 1 1 1
= p =p 2
=
dp p p p
F. Guta (CoBE) Econ 2042 March, 2024 37 / 54
1 1
Note: If p = 2 then E (x ) = 2; if p = 3 then E (x ) = 3; if
1 1
p= 4 then E (x ) = 4 if p = 5 then E (x ) = 5; if
1
p= 10 then E (x ) = 10.
E (g (x )) = ∑ g (x )fX (x )
x
F. Guta (CoBE) Econ 2042 March, 2024 38 / 54
Example (2.12)
Let g (X ) = X 2 , then
E (g (X )) = E X 2 = ∑x x 2 fX (x )
σ 2 = E (x µ )2 = ∑(x µ )2 fX (x ) where µ = E (X )
µ 0m = E (X m ) = ∑ x m fX (x ); m = 1, 2, 3, : : : (Discrete)
Z ∞
m
0
µ m = E (X ) = x m fX (x ); m = 1, 2, 3, : : : (Continuous)
∞
de…ned as:
µ m = E (X µ )m = ∑ (x µ )m fX (x ); m = 1, 2, 3, : : : or
Z ∞
m
µ m = E (X µ) = (x µ )m fX (x ); m = 1, 2, 3, : : :
∞
Propositions:
a). µ 0 = 1.
b). µ 1 = 0.
F. Guta (CoBE) Econ 2042 March, 2024 42 / 54
Proof of proposition (a) is trivial, while proof of
(b) goes as follows:
h i
1
µ 1 = E (X µ ) = E (X µ ) = E (X ) µ = 0.
De…nition (2.5)
h i
2
a). µ 2 = E (X µ) = σ 2 is de…ned as the variance
of a rv, and is also denoted by var (X ) or V (X ).
h i
µ2 = E (X µ )2 = E X 2 2X µ + µ 2
= E X2 2E (X ) µ + µ 2 = E X 2 2µ 2 + µ 2
F. Guta (CoBE) Econ 2042 March, 2024 43 / 54
De…nition (2.5 continued. . . )
µ2 = E X 2 µ2
= µ 02 ( µ 01 )2 = E X 2 µ2
h i
b). µ 3 = E (X µ )3 = E X 3 3X 2 µ + 3X µ 2 µ3
= E X3 3E X 2 µ + 3E (X ) µ 2 µ3
= E X4 4E X 3 µ + 6E X 2 µ 2 4E (X ) µ 3 + µ 4
= µ 04 4µ 03 µ + 6µ 02 µ 2 4µ 4 + µ 4
= µ 04 4µ 03 µ + 6µ 02 µ 2 3µ 4
Interpretations
Thus
σ 2 = E (X 2 ) [E (X )]2 = p p 2 = p (1 p)
Thus
q p
p (1 p)
σ= p (1 p ) and cv =
p
F. Guta (CoBE) Econ 2042 March, 2024 50 / 54
2.5 Moment Generating Function (MGF.)
De…nition (2.6)
Moment generating function of a rv X , MX (θ ), is
de…ned as MX (θ ) = E e θ x , generates moments.
Example (2.14)
Let f (x ) = e x , then
x2 x3 x4
f (x ) = 1 + x + + + +
2! 3! 4!
Similarly,
θx (θ x )2 (θ x )3 (θ x )4
e = 1+ θx + + + +
2! 3! 4!
F. Guta (CoBE) Econ 2042 March, 2024 52 / 54
Example (2.14 continued. . . )
Hence,
θ2 θ3 θ4
MX (θ ) = E e θ X = 1 + θ E (X ) + E X2 + E X3 + E X4 +
2! 3! 4!
d θ2 θ3 θ4
MX (θ ) = E (X ) + θ E X 2 + E X 3 + E X 4 + E X 5 +
dθ 2! 3! 4!
d d
) MX (θ ) = MX (0) = E (X ) , the …rst moment about zero.
dθ θ =0 dθ
Similarly,
d2 2 3 θ2 4 θ3
MX ( θ ) = E X + θ E X + E X + E X5 +
dθ2 2! 3!
F. Guta (CoBE) Econ 2042 March, 2024 53 / 54
Example (2.14 continued. . . )
d2 d2
dθ2
MX (θ ) = dθ2
MX (0) = E (X 2 ) , the second moment about zero.
θ =0
Note:
1). Taking higher order derivative of the MGF and
then evaluating the resulting function at the origin
(θ = 0) generate all higher order moments about
zero of a rv.
2). There is a one-to-one correspondence between the
pdf of a rv and its MGF function, if exists.
F. Guta (CoBE) Econ 2042 March, 2024 54 / 54