0% found this document useful (0 votes)
7 views32 pages

2.random Variables

The document discusses random variables, defining them as functions that map outcomes from a sample space to real numbers, enabling the analysis of various random phenomena. It explains the importance of probability distribution functions (PDFs) and probability density functions, detailing their properties and providing examples of different types of random variables, including continuous, discrete, and mixed. Additionally, it covers specific probability distributions such as Normal, Exponential, and Uniform, along with their applications in various fields.

Uploaded by

arriehy
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views32 pages

2.random Variables

The document discusses random variables, defining them as functions that map outcomes from a sample space to real numbers, enabling the analysis of various random phenomena. It explains the importance of probability distribution functions (PDFs) and probability density functions, detailing their properties and providing examples of different types of random variables, including continuous, discrete, and mixed. Additionally, it covers specific probability distributions such as Normal, Exponential, and Uniform, along with their applications in various fields.

Uploaded by

arriehy
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

2.

Random Variables
1
2.1 Introduction
Many random phenomena have outcomes that are sets of
real numbers:
➢ the voltage at time, across a noisy resistor
➢ the arrival time of the next customer at a movie theatre
➢ the brightness level at a particular point on the TV
screen
➢ the number of times a light bulb will switch on before
failing
➢ the lifetime of a given living person
➢ the number of people on a New York to Chicago train
➢ and so forth.
In all these cases the sample description spaces are sets of
numbers on the real line. 2
Even when a sample space Ω is not numerical, we might
want to generate a new sample space from Ω that is
numerical, that is,
➢ converting random speech color, gray tone, and so forth, to numbers,
➢ or converting the physical fitness profile of a person chosen at
random into a numerical “fitness” vector consisting of weight, height,
blood pressure, heart rate, and so on,
➢ or describing the condition of a patient afflicted with, say, black lung
disease by a vector whose components are the number and size of
lung lesions and the number of lung zones affected.
In science and engineering, we are in almost all instances
interested in numerical outcomes, whether the underlying
experiment is numerical-valued or not.
To obtain numerical outcomes, we need a role or mapping
from the original sample description space Ω to the real line
R. Such a mapping is what a random variable fundamentally is and we discuss
3
it in the next several sections.
Let us, however, make a remark or two. The concept of a
random variable will enable us to replace the original
probability space with one in which events are sets of
numbers. Thus on the induced probability space of a
random variable every event is a subset of R.
But is every subset of R always an event?
Are there subsets of R that could get us into trouble via
violating the axioms of probability.
The answer is yes.
We say that they are nonmeasurable
We can define more than one random variable on the same
underlying sample space Ω.
For example,
➢ suppose that Ω consists of a large, representational group of people in the
Unite States.
➢ Let the experiment consist of choosing a person at random.
➢ Let X denote the person’s lifetime and Y denote that person’s daily
consumption of cigarettes.
➢ We can now ask: Are X and Y related? That is, can we predict X from
observing Y?
➢ Suppose we define a third random variable Z that denotes the person’s
weight. Is Z related to X or Y?
The main advantage of dealing with random variables is
that we can define certain probability functions that make it
both convenient and easy to compute the probabilities of
various events. 5
2.2 Definition of a Random Variable

➢ Experiment: 
➢ Sample description space: 
➢ Sample (the elements or points of ): 

we assign a real number X ( ) , we establish a


If to every
correspondence rule between and R, the real line.

6
Thus, a random variable X(·) or
simply X is not really a variable but Such a rule,
a function whose domain is Ω subject to certain constraints,
and whose range is some subset is called a random variable.
of the real line.
Now consider an event
Example 2.2-1
A person, chosen at random in the street, is asked if he or she has a
younger brother.
If the answer is no, the data is encoded as zero; if the answer is yes,
the data is encoded as one.
The underlying experiment has sample description space Ω= {no,
yes}, probabilities P[Φ]=0, P[Ω]=1, P[no]=3/4(an assumption),
P[yes]=1/4. 
Take any x1, x2 and consider, for example, the probabilities that X lies
in sets of' the type [x1, x2], [x1, x2) or (x1, x2].
Thus P[3  X  4] = P[ ] = 0 Thus every set {X= x}, {x1≤X≤x2} ,
3 {X≤x2}, and so forth, is related to an
P[0  X  1] = P[no] =
4 event define on Ω.
P[0  X  2] = P[] = 1
1 Hence X is a random variable.
P[0  X  1] = P[ yes ] =
4
Example 2.2-3
Example 2.2-4
2.3 Probability distribution function (PDF)
The probability distribution function (PDF) of X :

FX ( x ) = P  X  x 

Properties of FX ( x ) :
(i) FX () = 1, FX (−) = 0

(ii) x1  x2 → FX ( x1 )  FX ( x2 ) that is, FX (x) is a nondemocratic function of x

(iii) FX (x ) is continuous from the right, that is, FX ( x) = lim FX ( x +  )  0


 →0

14
Example 2.3-1
✓ The experiment consists of observing the voltage X of the
parity bit in a word in computer memory.
✓ If the bit is on, then X=1; if off then X=0.
✓ Assume that the off state has probability q and the on state
has probability 1-q.
✓ The sample space has the only two points:  = off ,on .
Computation of FX ( x )
(i) x<0: The event  X  x =  and FX ( x ) = 0 .
(ii)0≤x<1: The event  X  x is equivalent to the event {off} and
excludes the event {on}. X (off ) = 0  x X ( on ) = 1  x
Hence FX ( x ) = q .
(iii)x≥1: The event  X  xis the certain event since
X ( on ) = 1  x X (off ) = 0  x

Hence FX ( x ) = 1
2.4 Probability density function (pdf)
If FX(x) is continuous and differentiable, the pdf is
computed from
dFX ( x)
f X ( x) =
dx

Properties. If .fX(x) exists, then


(i) f X ( x)  0


(ii) 
−
f X ( )d  = FX () − FX (−) = 1

f X ( )d  = P  X  x 
x
(iii) FX ( x) = 
−

(ⅳ) FX ( x2 ) − FX ( x1 ) = − f X ( )d  − − f X ( )d  = x f X ( )d  = P  x1  X  x2 


x2 x1 x1

2
18
The univariate Normal (Gaussian) pdf
When we want to say that a random variable X obeys
the Normal probability law with mean and standard
deviation , we shall use the symbols
X : N (  , 2
) or X N (  , 2 )
The pdf is given by
1  x− 
2

1 − 
fX ( x) = e 2   

2 2
The Normal pdf is widely encountered in all branches
of science and engineering as well as in social and
demography studies.

For example,
➢the IQ of children,
➢the heights of men (or women),
➢the noise voltage produced by a thermally agitated resistor,
19
all are postulated be approximately Normal over a large range of values.
For any other random variable with a well-defined pdf, we
can compute the mean and variance from the following
formulas:
For random variables that take on continuous values
 = E  X  =  − xf X ( x ) dx

 2 = E ( X −  )  =  − ( x −  ) f X ( x ) dx
2 2
 

For random variables that take on discrete values

 =  i xi P  X = xi 

 2 =  i ( xi −  ) P  X = xi 
2

20
Example 2.4-1
✓ Let f X ( x ) = 1 , for 0  x  1 and zero elsewhere.
✓ This pdf is a special case of the uniform law
discussed below.
✓ The mean is computed as

 =  x f X ( x ) dx =  x dx = 0.5
1

− 0

✓ and the variance is computed as

 1
( x − ) f X ( x ) dx =  ( x − 0.5 ) dx =
1
 =
2 2 2
− 0 12

21
Example 2.4-2

✓ Suppose we are given that P  X = 0 = P  X = 2 = 0.25and P  X = 1 = 0.5


✓ For this discrete random variable we use Equations

=  x P[ X = x ]
i
xi : P[ X = xi ] 0
i to obtain
 = 0  0.25 + 1 0.5 + 2  0.25 = 1

2 = 
xi ; P[ X = xi ]0
( xi −  ) 2 P[ X = xi ]
to obtain

 2 = ( 0 − 1)  0.25 + (1 − 1)  0.5+ ( 2-1)  0.25=0.5


2 2 2

22
16
Addition
( 0,1) : E  X  = p, D  X  = 1 − p
B ( n, p ) : E  X  = np, D  X  = np (1 − p )
P ( ) : E  X  = , D X  = 

( b − a)
2
a+b
U ( a, b ) : E  X  = , D X  =
2 12
N (  , 2 ) : E  X  =  , D  X  =  2
1 1
E ( ) : EX  = , D X  =
  2 23
Rayleigh
x2
x −
fX ( x) = e 2 2
u ( x)
 2

1 x  0
the unit step function u ( x ) = 
0 x  0
Example of where the Rayleigh pdf shows up are in
➢ Rocket-landing errors,

➢ random fluctuations
in the envelope of
certain waveforms,
➢ and radial distribution of
misses around the bull’s-eye at 24
a rifle range.
Exponential

the unit step function


The exponential law occurs, for example, in
➢ waiting-time problems,
➢ lifetime of machinery
➢ and in describing the intensity variations of incoherent light .

25
Uniform (b>a)
X U ( a, b )  1
 a xb
The uniform pdf is used fX ( x) = b − a
➢ in communication theory,  0 otherwise
➢ in queuing models,
➢ and in situations where we have no a knowledge favoring the
distribution of outcomes expect for the end points; that if we
don’t know when a business call will come but it must come,
say, between 9 A.M. and 5 P.M..

◆排队论(queuing theory), 或称随机服务系统理论, 是通过对服务对象到来及服务时间的统计研


究,得出这些数量指标(等待时间、排队长度、忙期长短等)的统计规律,然后根据这些规律来改进
服务系统的结构或重新组织被服务对象,使得服务系统既能满足服务对象的需要,又能使机构的费
用最经济或某些指标最优。
◆日常生活中存在大量排队或拥挤现象,如旅客购票排队,市内电话占线等现象。排队论的应用非
常广泛,它适用于一切服务系统,尤其在通信系统、交通系统、计算机、存贮系统、生产管理系统
等方面应用得最多。
26
Exponential

Rayleighs
1
 Uniform
0 .6 0 6

1
b−a

 a b x

Figure 2.4-4 The rayleigh , exponential ,and uniform pdf’s


Laplacian
Another pdf that has assumed importance since the
introduction of computer analysis of speech and images is
the Laplacian (The Laplacian is widely used to model speech sources
and image gray levels). The pdf is defined by
c -c x
fX ( x) = e , c > 0
2
The Laplacian pdf is sometime written as
2x
1 −
fX ( x) = e 
,  0
2
the standard deviation of the Laplacian r.v. X

28
2.5 Continuous, discrete, and mixed random variable
continuous random variable
➢If FX(x) is continuous for every x,
➢and its derivative exists everywhere except at a
countable set of points,
➢then we say that x is a continuous random
variable (r. v.).

• At points x where FX ( x ) exists, the pdf is f X ( x ) = FX ( x ) .

• PDF will then be defined for every x, and we are


free to use the following important formulas:
FX ( x ) =  f X ( ) d P  x1  X  x2  =  f X ( ) d 
x x2

− x1
Fx(x)

1
A discrete random variable has a
staircase type of distribution
function. 。

X x1 x2 … xn x

P p1 p 2 … pn

FX ( x ) = P  X  x  =  PX = x  =  pk k
xk  x xk  x

P( x )
Probability Mass Function
0.6

0.3

0 0 1 2
x
27
2.6 joint distributions and densities
The joint distribution function of X and Y is defined by:
FXY ( x, y ) = P  X  x, Y  y 
Properties of FXY ( x, y ) :
(i) FXY (, ) = 1; FXY ( x, −) = FXY (−, y) = 0; FXY ( x, ) = FX ( x); FXY (, y) = FY ( y);

(ii) if x1  x2 ,y1  y2 , then FXY ( x1 , y1 )  FXY ( x2 , y2 )

(iii) FXY ( x, y) = lim FXY ( x +  , y +  )  ,  0


 →0
 →0

If FXY ( x, y ) is continuous and differentiable, the joint pdf


can be obtained from 2
f XY ( x, y ) =  FXY ( x, y )
xy 32

You might also like