Sei sulla pagina 1di 27

3.

Random Variables

Let (Ω, F, P) be a probability model for an experiment,


and X a function that maps every ξ ∈ Ω, to a unique
point x ∈ R, the set of real numbers. Since the outcome ξ
is not certain, so is the value X (ξ ) = x . Thus if B is some
subset of R, we may want to determine the probability of
“ X (ξ ) ∈ B ”. To determine this probability, we can look at
the set A = X −1 ( B ) ∈ Ω that contains all ξ ∈ Ω that maps
into B under the function X. Ω
ξ
A
X (ξ )
x B R
1
Fig. 3.1 PILLAI
Obviously, if the set A = X −1 ( B ) also belongs to the
associated field F, then it is an event and the probability of
A is well defined; in that case we can say
Probabilit y of the event " X (ξ ) ∈ B " = P ( X −1 ( B )). (3-1)

However, X −1 ( B ) may not always belong to F for all B, thus


creating difficulties. The notion of random variable (r.v)
makes sure that the inverse mapping always results in an
event so that we are able to determine the probability for
any B ∈ R.
Random Variable (r.v): A finite single valued function X (⋅ )
that maps the set of all experimental outcomes Ω into the
set of real numbers R is said to be a r.v, if the set {ξ | X (ξ ) ≤ x }
is an event (∈ F ) for every x in R.
2
PILLAI
Alternatively X is said to be a r.v, if X −1 ( B ) ∈ F where B
represents semi-definite intervals of the form {−∞ < x ≤ a}
and all other sets that can be constructed from these sets by
performing the set operations of union, intersection and
negation any number of times. The Borel collection B of
such subsets of R is the smallest σ-field of subsets of R that
includes all semi-infinite intervals of the above form. Thus
if X is a r.v, then
{ξ | X (ξ ) ≤ x }= { X ≤ x } (3-2)

is an event for every x. What about { a < X ≤ b }, { X = a }?


Are they also events ? In fact with b > a since { X ≤ a }
and { X ≤ b } are events, { X ≤ a }c = { X > a } is an event and
hence { X > a }∩ { X ≤ b } = {a < X ≤ b} is also an event.
3
PILLAI
 1 
Thus, 

a −
n
< X ≤ a 

is an event for every n.
Consequently

 1  (3-3)
∩  a −
 n
< X ≤ a  = { X = a}

n =1

is also an event. All events have well defined probability.


Thus the probability of the event { ξ | X ( ξ ) ≤ x } must
depend on x. Denote
P {ξ | X (ξ ) ≤ x }= FX ( x ) ≥ 0. (3-4)

The role of the subscript X in (3-4) is only to identify the


actual r.v. FX (x) is said to the Probability Distribution
Function (PDF) associated with the r.v X.

4
PILLAI
Distribution Function: Note that a distribution function
g(x) is nondecreasing, right-continuous and satisfies
g ( +∞) = 1, g ( −∞) = 0, (3-5)

i.e., if g(x) is a distribution function, then


(i) g ( +∞) = 1, g ( −∞) = 0,
(ii) if x 1 < x 2 , then g ( x 1 ) ≤ g ( x 2 ), (3-6)
and
+
(iii) g ( x ) = g ( x ), for all x.

We need to show that FX (x) defined in (3-4) satisfies all


properties in (3-6). In fact, for any r.v X,
5
PILLAI
(i) F X ( +∞ ) = P { ξ | X (ξ ) ≤ +∞ }= P (Ω ) = 1 (3-7)

and F X ( −∞ ) = P { ξ | X (ξ ) ≤ −∞ } = P (φ ) = 0 . (3-8)
(ii) If x 1 < x 2 , then the subset ( −∞, x1 ) ⊂ ( −∞, x2 ).
Consequently the event { ξ | X (ξ ) ≤ x 1 } ⊂ { ξ | X (ξ ) ≤ x 2 },
since X ( ξ ) ≤ x 1 implies X ( ξ ) ≤ x 2 . As a result
F X ( x1 ) =∆ P ( X (ξ ) ≤ x1 ) ≤ P ( X (ξ ) ≤ x 2 ) = F X ( x 2 ),

(3-9)

implying that the probability distribution function is


nonnegative and monotone nondecreasing.
(iii) Let x < x n < x n −1 < < x 2 < x1 , and consider the event
Ak = { ξ | x < X (ξ ) ≤ x k }. (3-10)
since
{x < X (ξ ) ≤ x k }∪ { X (ξ ) ≤ x } = { X (ξ ) ≤ x k }, (3-11) 6
PILLAI
using mutually exclusive property of events we get
P ( Ak ) = P ( x < X (ξ ) ≤ x k ) = F X ( x k ) − F X ( x ). (3-12)

But Ak +1 ⊂ Ak ⊂ Ak −1 , and hence



lim Ak = ∩ Ak = φ and hence lim P ( Ak ) = 0 . (3-13)
k →∞ k →∞
k =1
Thus
lim P ( Ak ) = lim FX ( x k ) − FX ( x ) = 0 .
k →∞ k →∞

But lim x k = x + , the right limit of x, and hence


k →∞

FX ( x + ) = FX ( x ), (3-14)

i.e., FX (x) is right-continuous, justifying all properties of a


distribution function.
7
PILLAI
Additional Properties of a PDF
(iv) If FX ( x0 ) = 0 for some x 0 , then FX ( x ) = 0, x ≤ x0 . (3-15)

This follows, since FX ( x0 ) = P ( X (ξ ) ≤ x0 ) = 0 implies {X (ξ ) ≤ x 0 }


is the null set, and for any x ≤ x0 , { X (ξ ) ≤ x } will be a subset
of the null set.
(v) P { X (ξ ) > x } = 1 − FX ( x ). (3-16)

We have { X (ξ ) ≤ x }∪ { X (ξ ) > x } = Ω , and since the two events


are mutually exclusive, (16) follows.
(vi) P{ x1 < X (ξ ) ≤ x2 } = FX ( x2 ) − FX ( x1 ), x2 > x1. (3-17)

The events { X (ξ ) ≤ x1 } and { x1 < X (ξ ) ≤ x 2 } are mutually


exclusive and their union represents the event { X (ξ ) ≤ x 2 }.
8
PILLAI
(vii) P ( X (ξ ) = x ) = FX ( x ) − FX ( x − ). (3-18)

Let x1 = x − ε , ε > 0, and x 2 = x . From (3-17)


lim P{ x − ε < X (ξ ) ≤ x } = FX ( x ) − lim FX ( x − ε ), (3-19)
ε →0 ε →0

or
P { X (ξ ) = x } = FX ( x ) − FX ( x − ). (3-20)

According to (3-14), FX ( x0+ ), the limit of FX ( x ) as x → x0


from the right always exists and equals FX ( x0 ). However the
left limit value FX ( x0− ) need not equal FX ( x0 ). Thus FX ( x )
need not be continuous from the left. At a discontinuity
point of the distribution, the left and right limits are
different, and from (3-20)
P { X (ξ ) = x0 } = FX ( x0 ) − FX ( x0− ) > 0 . (3-21) 9
PILLAI
Thus the only discontinuities of a distribution function F X ( x )
are of the jump type, and occur at points x 0 where (3-21) is
satisfied. These points can always be enumerated as a
sequence, and moreover they are at most countable in
number.
Example 3.1: X is a r.v such that X (ξ ) = c , ξ ∈ Ω. Find FX (x).
Solution: For x < c, { X (ξ ) ≤ x } = {φ }, so that FX ( x) = 0, and
for x > c, {X (ξ ) ≤ x} = Ω, so that FX ( x) = 1. (Fig.3.2)
FX (x)
1

x
c
Fig. 3.2

Example 3.2: Toss a coin. Ω = {H , T }. Suppose the r.v X is


such that X (T ) = 0 , X ( H ) = 1 . Find FX (x). 10
PILLAI
Solution: For x < 0, { X (ξ ) ≤ x } = { φ }, so that FX ( x ) = 0.
0 ≤ x < 1, { X (ξ ) ≤ x } = { T }, so that F X ( x ) = P{ T } = 1 − p ,
x ≥ 1, { X (ξ ) ≤ x } = { H , T } = Ω , so that F X ( x ) = 1. (Fig. 3.3)
FX (x)

1
q
x
1
Fig.3.3
•X is said to be a continuous-type r.v if its distribution
function FX (x ) is continuous. In that case F X ( x − ) = F X ( x ) for
all x, and from (3-21) we get P {X = x} = 0 .
•If F X ( x ) is constant except for a finite number of jump
discontinuities(piece-wise constant; step-type), then X is
said to be a discrete-type r.v. If xi is such a discontinuity
point, then from (3-21)
p i = P {X = x i } = F X ( x i ) − F X ( x i− ). (3-22) 11
PILLAI
From Fig.3.2, at a point of discontinuity we get
P { X = c } = FX ( c ) − FX ( c − ) = 1 − 0 = 1 .

and from Fig.3.3,


P { X = 0 } = FX ( 0 ) − FX ( 0 − ) = q − 0 = q.

Example:3.3 A fair coin is tossed twice, and let the r.v X


represent the number of heads. Find FX ( x ).
Solution: In this case Ω = { HH , HT , TH , TT }, and
X ( HH ) = 2 , X ( HT ) = 1, X ( TH ) = 1, X ( TT ) = 0 .
x < 0, {X (ξ ) ≤ x } = φ ⇒ F X ( x ) = 0 ,
1
0 ≤ x < 1, {X ( ξ ) ≤ x } = { TT } ⇒ F X ( x ) = P { TT }= P (T ) P (T ) = ,
4
3
1 ≤ x < 2 , {X ( ξ ) ≤ x } = { TT , HT , TH }⇒ F X ( x ) = P { TT , HT , TH }= ,
4
x ≥ 2, {X ( ξ ) ≤ x } = Ω ⇒ F X ( x ) = 1 . (Fig. 3.4)
12
PILLAI
From Fig.3.4, P {X = 1} = F X (1) − F X (1− ) = 3 / 4 − 1 / 4 = 1 / 2 .
FX (x)
1
3/ 4
1/ 4
x
1 2
Fig. 3.4

Probability density function (p.d.f)


The derivative of the distribution function FX (x ) is called
the probability density function f X ( x ) of the r.v X. Thus
∆ dFX ( x )
f X ( x) = . (3-23)
dx
Since
dF X ( x ) F ( x + ∆ x ) − FX ( x )
= lim X ≥ 0, (3-24)
dx ∆ x → 0 ∆x
from the monotone-nondecreasing nature of F X ( x ), 13
PILLAI
it follows that f X ( x ) ≥ 0 for all x. f X ( x ) will be a
continuous function, if X is a continuous type r.v.
However, if X is a discrete type r.v as in (3-22), then its
p.d.f has the general form (Fig. 3.5) f (x )X
p i

f X (x) = ∑ p iδ ( x − x i ) , (3-25) xi x
i Fig. 3.5
where xi represent the jump-discontinuity points in FX ( x ).
As Fig. 3.5 shows f X ( x ) represents a collection of positive
discrete masses, and it is known as the probability mass
function (p.m.f ) in the discrete case. From (3-23), we
also obtain by integration
x
FX (x) = ∫−∞
f x ( u ) du . (3-26)
Since F X ( +∞ ) = 1, (3-26) yields
+∞
(3-27)
∫ −∞
f x ( x ) dx = 1 ,
14
PILLAI
which justifies its name as the density function. Further,
from (3-26), we also get (Fig. 3.6b)
P { x 1 < X (ξ ) ≤ x 2 }=
x2
F X ( x 2 ) − F X ( x1 ) = ∫ x1
f X ( x ) dx . (3-28)
Thus the area under f X ( x ) in the interval ( x1 , x 2 ) represents
the probability in (3-28).
FX (x) fX (x)
1

x1 x2 x x1 x2 x
(a) (b)
Fig. 3.6

Often, r.vs are referred by their specific density functions -


both in the continuous and discrete cases - and in what
follows we shall list a number of them in each category.
15
PILLAI
Continuous-type random variables
1. Normal (Gaussian): X is said to be normal or Gaussian
r.v, if
1 2 2
f X (x) = e −(x−µ ) / 2σ
. (3-29)
2 πσ 2

This is a bell shaped curve, symmetric around the


parameter µ , and its distribution function is given by
x 1 x−µ  (3-30)

− ( y − µ ) 2 / 2σ 2 ∆
FX (x) = e dy = G  ,
−∞
2 πσ 2
 σ 
where G ( x ) = ∫ 21π e dy is often tabulated. Since f X (x)
x

−∞
− y2 / 2

depends on two parameters and , the notation X ∼N (µ,σ 2 )


µ σ 2

will be used to represent (3-29). f (x) X

x
µ
16
Fig. 3.7
PILLAI
2. Uniform: X ∼ U(a, b), a < b, if (Fig. 3.8)
 1
fX (x) =  b − a
, a ≤ x ≤ b, (3.31)
 0, otherwise.

3. Exponential: X ∼ ε (λ) if (Fig. 3.9)


 1 − x / λ
e , x ≥ 0,
fX (x) =  λ (3-32)
 0, otherwise.

f X (x) f X (x)
1
b−a
x x
a b
Fig. 3.8 Fig. 3.9
17
PILLAI
4. Gamma: X ∼ G(α, β ) if (α > 0, β > 0) (Fig. 3.10)
f X ( x)
 x α −1
−x/β
 e , x ≥ 0,
f X ( x ) =  Γ (α ) β α (3-33)
 0, otherwise. x
Fig. 3.10
If α = n an integer Γ ( n ) = ( n − 1 )!. f X ( x)

5. Beta: X ∼ β (a, b) if (a > 0, b > 0) (Fig. 3.11)


x
0 1
 1 a −1 b −1 Fig. 3.11
 x ( 1 − x ) , 0 < x < 1 ,
f X ( x ) =  β (a , b)
 (3-34)
0, otherwise.
where the Beta function β (a, b) is defined as
1
β (a , b) = ∫
0
u a − 1 (1 − u ) b − 1 du . (3-35)

18
PILLAI
6. Chi-Square: X ∼ χ 2 (n), if (Fig. 3.12)
f X ( x)
 1
 n/2 x n / 2 −1e − x / 2 , x ≥ 0 ,
f X ( x ) =  2 Γ (n / 2)
 0, otherwise. (3-36) x
Fig. 3.12

Note that χ 2 (n) is the same as Gamma (n / 2, 2).


7. Rayleigh: X ∼ R(σ 2 ), if (Fig. 3.13) f X ( x)

 x − x 2 / 2 σ 2
e , x ≥ 0,
f X ( x) = σ 2
 0, otherwise. (3-37) x
Fig. 3.13

8. Nakagami – m distribution:
 2  m  m 2 m −1 − mx 2 / Ω
   x e , x≥0
f X ( x ) =  Γ( m )  Ω 
(3-38)
 0 otherwise
 19
PILLAI
f X ( x)

9. Cauchy: X ∼ C(α, µ), if (Fig. 3.14)


α /π µ
x
fX (x) = 2 , − ∞ < x < +∞ . (3-39)
α + (x − µ) 2
Fig. 3.14
10. Laplace: (Fig. 3.15)
1 − | x |/ λ
fX (x) = e , − ∞ < x < +∞ . (3-40)

11. Student’s t-distribution with n degrees of freedom (Fig 3.16)

Γ (( n + 1 ) / 2 ) 
− ( n +1 ) / 2
t 
2
fT (t ) =  1 +  , − ∞ < t < +∞ . (3-41)
πn Γ (n / 2)  n 

fX (x) fT ( t )

x t
Fig. 3.15 Fig. 3.16 20
PILLAI
12. Fisher’s F-distribution
Γ{( m + n ) / 2} m m / 2 n n / 2 z m / 2 −1
 , z≥0
f z ( z) =  Γ( m / 2) Γ( n / 2) ( n + mz ) (m+n) / 2
(3-42)
 0 otherwise

21
PILLAI
Discrete-type random variables
1. Bernoulli: X takes the values (0,1), and
P ( X = 0) = q, P ( X = 1) = p . (3-43)

2. Binomial: X ∼ B(n, p), if (Fig. 3.17)


 n  k n−k
P ( X = k ) =   p q , k = 0 ,1 , 2 , ,n. (3-44)
k
 
3. Poisson: X ∼ P(λ) , if (Fig. 3.18)
λk
P ( X = k ) = e −λ , k = 0 ,1 , 2 , ,∞. (3-45)
k!

P(X = k) P(X = k)

k
12 n
22
Fig. 3.17 Fig. 3.18 PILLAI
4. Hypergeometric:
m  N −m 
   
k   n −k 
P( X = k ) =   
N 

, max(0, m + n − N ) ≤ k ≤ min( m, n ) (3-46)
 
n 
 

5. Geometric: X ∼ g ( p ) if
P ( X = k ) = pq k , k = 0 ,1 , 2 , ,∞, q = 1 − p. (3-47)
6. Negative Binomial: X ~ NB (r, p), if
 k − 1 r k−r
P(X = k) =   p q , k = r , r + 1, . (3-48)
 r −1
7. Discrete-Uniform:
1
P(X = k) = , k = 1, 2 , ,N. (3-49)
N
We conclude this lecture with a general distribution due 23
PILLAI
to Polya that includes both binomial and hypergeometric as
special cases.

Polya’s distribution: A box contains a white balls and b black


balls. A ball is drawn at random, and it is replaced along with
c balls of the same color. If X represents the number of white
balls drawn in n such draws, X = 0, 1, 2, , n, find the
probability mass function of X.
Solution: Consider the specific sequence of draws where k
white balls are first drawn, followed by n – k black balls. The
probability of drawing k successive white balls is given by
a a+c a + 2c a + ( k − 1)c
pW = (3-50)
a + b a + b + c a + b + 2c a + b + ( k − 1)c
24
Similarly the probability of drawing k white balls PILLAI
followed by n – k black balls is given by
b b+c b + ( n − k − 1)c
pk = p w
a + b + kc a + b + ( k + 1)c a + b + ( n − 1)c
k −1 n − k −1
b + jc
= ∏ a a++b +icic ∏ a +b+( j + k )c
. (3-51)
i =0 j =0

Interestingly, pk in (3-51) also represents the probability of


drawing k white balls and (n – k) black balls in any other
specific order (i.e., The same set of numerator and
denominator terms in (3-51) contribute to all other sequences
n
as well.) But there are  k  such distinct mutually exclusive
 
sequences and summing over all of them, we obtain the Polya
distribution (probability of getting k white balls in n draws)
to be  n  k −1 n − k −1
n
a +ic b + jc
P( X = k ) =  

k 
pk =  
 ∏
 k  i =0 a + b +ic ∏ a +b+( j + k )c
, k = 0,1, 2, , n.
25
j =0
(3-52) PILLAI
Both binomial distribution as well as the hypergeometric
distribution are special cases of (3-52).

For example if draws are done with replacement, then c = 0


and (3-52) simplifies to the binomial distribution
n
P( X = k ) =  
k 
p k qn −k , k = 0,1, 2, ,n (3-53)
 
where
a b
p= , q= = 1 − p.
a+b a+b
Similarly if the draws are conducted without replacement,
Then c = – 1 in (3-52), and it gives
n a ( a − 1)( a − 2) ( a − k + 1) b(b − 1) (b − n + k + 1)
P( X = k ) =  
k 
  ( a + b)( a + b − 1) ( a + b − k + 1) ( a + b − k ) ( a + b − n + 1)
26
PILLAI
a  b 
   
n! a !( a + b − k )! b !( a + b − n )!  k   n −k 
  
P( X = k ) = =  a +b 

k !( n − k )! ( a − k )!( a + b)! (b − n + k )!( a + b − k )!  
 n 
 

(3-54)
which represents the hypergeometric distribution. Finally
c = +1 gives (replacements are doubled)
n ( a + k − 1)! ( a + b + 1)! (b + n − k − 1)! ( a + b + k − 1)!
P( X = k ) =  
k 
  ( a − 1)! ( a + b + k − 1)! (b − 1)! ( a + b + n − 1)!
 a + k −1  b + n − k −1
   

 k  
  n − k 

=  a + b + n −1
. (3-55)
 
 n 
 

we shall refer to (3-55) as Polya’s +1 distribution. the general


Polya distribution in (3-52) has been used to study the spread
of contagious diseases (epidemic modeling). 27
PILLAI

Potrebbero piacerti anche