Transcript Document
Chapter 2 Random variables
2.1 Random variables
Definition. Suppose that S={e} is the sampling
space of random trial, if X is a real-valued
function with domain S, i.e. for each eS,
there exists an unique X=X(e), then it is called
that X a Random vector.
Usually , we denote random variable by
notation X, Y, Z or , , etc..
For notation convenience, From now on, we
denote random variable by r.v.
2.2 Discrete random variables
Definition Suppose that r.v. X assume value x1, x2, …, xn,
… with probability p1, p2, …, pn, …respectively, then it is said
that r.v. X is a discrete r.v. and name
P{X=xk}=pk, (k=1, 2, … )
the distribution law of X. The distirbution law of X can be
represented by
X~ P{X=xk}=pk, (k=1, 2, … ),
or
X
x1
x2
…
xK
…
Pk
p1
p2
…
pk
…
X~
2. Characteristics of distribution law
(1) pk 0, k=1, 2, … ;
(2)
p =1.
k 1
k
Example 1 Suppose that there are 5 balls in a bag, 2 of them are
white and the others are black, now pick 3 ball from the bag
without putting back, try to determine the distribution law of r.v. X,
where X is the number of whithe ball among the 3 picked ball.
In fact, X assumes value 0,1,2 and
C2k C33 k
P{ X=k}=
.
3
C5
Several Important Discrete R.V.
(0-1) distribution
let X denote the number that event A appeared in a trail,
then X has the following distribution law
X~P{X=k}=pk(1-p)1-k, (0<p<1) k=0,1
or
X
1
pk
p
0
1 p
and X is said to follow a (0-1) distribution
Let X denote the numbers that event A appeared
in a n-repeated Bernoulli experiment, then X is
said to follow a binomial distribution with
parameters n,p and represent it by XB(n,p).
The distribution law of X is given as :
P{ X k} C n p (1 p)
k
k
nk
, (k 0,1,..., n)
Example A soldier try to shot a bomber with probability 0.02
that he can hit the target, suppose the he independently give
the target 400 shots, try to determine the probability that he hit
the target at least for twice.
Answer Let X represent the number that hit the target
in 400 shots Then X~B(400, 0.02), thus
P{X2}=1- P{X=0}-P {X=1}=1-0.98400-400)(0.02)(0.98399)=…
Poisson theorem If Xn~B(n, p), (n=0, 1, 2,…) and n is large
enough, p is very small, denote =np,then
P{ X k}
k
k!
e ,
k 0,1,2,...
Now, lets try to solve the aforementioned problem by putting
=np=(400)(0.02)=8, then approximately we have
P{X2}=1- P{X=0}-P {X=1}
=1-(1+8)e-8=0.996981.
Poisson distribution
k
X~P{X=k}=
e , k=0, 1, 2, … (0)
k!
Poisson theorem indicates that Poisson distribution is the
limit distribution of binomial distribution, when n is large
enough and p is very small, then we can approximate
binomial distribution by putting =np.
Random variable
Discrete r.v.
Distribution law
Several important r.v.s
0-1 distribution
Poisson distribution
Bionomial distribution
2.3 Distribution function of r.v.
Definition Suppose that X is a r.v., for any real number
x,Define the probability of event {Xx}, i.e. P {Xx}
the distribution function of r.v. X, denote it by F(x), i.e.
F(x)=P {Xx}.
X
x
It is easy to find that for a, b (a<b),
P {a<Xb}=P{Xb}-P{Xa}= F(b)-F(a).
P{X x0 } lim P{X x}
x x0
F{x0 0}
P{ X x} F ( x) F ( x 0)
For notation convenience, we usually denote distribution fucntion
by d.f.
Characteristics of d.f.
1. If x1<x2, then F(x1)F(x2);
2. for all x,0F(x)1,and
F( ) lim F( x ) 0, F( ) lim F( x ) 1;
x
x
3. right continuous:for any x,
F( x0 0) lim F( x ) F( x0 ).
x x 0
Conversely, any function satisfying the above
three characteristics must be a d.f. of a r.v.
Example1 Suppose that X has distribution
law given by the table
Try to determine the d.f. of X
F ( x)=P{ X x}
x0
0
0.1 0 x 1
0.7 1 x 2
1
x2
X
0
1
2
P
0.1 0.6 0.3
F (x)
1
0
1
2
x
For discrete distributed r.v.,
X~P{X= xk}=pk, k=1, 2, …
the distribution function of X is given
by
F ( x) P{ X x}
p
k : xk x
k
Suppose that the d.f. of r.v. X is specified as
follows,
x 1
a
1
3 1 x 1
F ( x)
x
2 1 x 2
b
x2
Try to determine
a,b and
P{X 0}, P{0 X 1}, P{X 2}, P{X 2}
Is there a more intuitive way to express the distribution
Law of a r.v.? Try to observe the following graph
a
b
p{a X b} ?
2.4 Continuous r.v.
Probability density function
Definition Suppose that F(x) is the distribution function of
r.v. X,if there exists a nonnegative function f(x),(-<x<+)
,such that for any x,we have
F ( x)=P( X x)=
x
f (u )du
then it is said that X a continuous r.v. and f(x) the
density function of X , i.e. X~ f(x) , (-<x<+)
The geometric interpretation of density function
b
P(a X b)= f ( u)du
a
2. Characteristics of density function
(1 f(x)0,(-<x<);
(2)
f ( x)dx=1.
(1) and (2) are the sufficient and necessary
properties of a density function
Suppose the density function of r.v. X is
f ( x) ae
Try to determine the value of a.
x
(3) If x is the continuous points of f(x), then
dF ( x )
f ( x)
dx
Suppose that the d.f. of r.v. X is specified as follows,
try to determine the density function f(x)
1 x
2e
F ( x)
1
1 e x
2
x0
x0
(4) For any b,if X~ f(x),
(-<x<),then P{X=b}=0。
And
P{a X b}=P{a X b}
b
=P{a X b}= f ( x)dx
a
Example 1. Suppose that the density function of X is specified by
0 x 1
x
f ( x ) 2 x 1 x 2
0
其他
Try to determine 1)the d.f. F(x),
2)P{X(0.5,1.5)}
Distribution function
Monotonicity
Right continuous
Standardized
Nonnegative
F(x)…f(x)
P{a<X<b}
Density function
Suppose that the distribution
function of X is specified by
x 1
0
F ( x) ln x 1 x e
1
xe
Try to determine
(1) P{X<2},P{0<X<3},P{2<X<e-0.1}.
(2)Density function f(x)
Several Important continuous r.v.
f (x)
1. Uniformly distribution
if X~f(x)=
1
,a x b
b a
0, el se
0
。
。
a
b
It is said that X are uniformly distributed in
interval (a, b) and denote it by X~U(a, b)
For any c, d (a<c<d<b),we have
1
d c
P{c X d }= f ( x)dx=
dx=
c
c ba
ba
d
d
x
f (x)
2. Exponential distribution
e x , x 0
If X~f ( x )=
0, x 0
x
0
It is said that X follows an exponential
distribution with parameter >0, the d.f. of
exponential distribution is
1 e x , x 0
F ( x)=
0, x 0
Example Suppose the age of a electronic instrument is X (year),
which follows an exponential distribution with parameter 0.5, try to
determine
(1)The probability that the age of the instrument is more than 2 years.
(2)If the instrument has already been used for 1 year and a half, then
try to determine the probability that it can be use 2 more years.
0.5e0.5x
f ( x)
0
x0
x 0,
(1)P{X 2} 0.5e0.5xdx e 1 0.37
2
( 2) P{ X 3.5 | X 1.5}
P { X 3. 5, X 1 . 5 }
P { X 1.5}
0.5e
3.5
0.5e
1.5
0.5x
dx
e
0.5x
dx
1
0.37
3. Normal distribution
The normal distribution are one the most important
distribution in probability theory, which is widely applied
In management, statistics, finance and some other ereas.
B
A
Suppose that the distance between A,B is ,
the observed value of X is X, then what is the
density function of X ?
Suppose that the density fucntion of X is specified by
1
X ~ f ( x)
e
2
x 2
2 2
x
where is a constant and >0 ,then, X is said to follows
a normal distribution with parameters and 2 and
represent it by X~N(, 2).
Two important characteristics of Normal distribution
(1) symmetry
the curve of density function is symmetry
with respect to x= and
f()=maxf(x)=
1
.
2
(2) influences the distribution
,the curve tends to be flat,
,the curve tends to be sharp,
4.Standard normal distribution
A normal distribution with parameters =0 and 2=1 is said to
follow standard normal distribution and represented by X~N(0, 1)。
the density function of normal distribution is
1
e
2
( x)
x2
2
, x .
and the d.f. is given by
( x ) P { X x }
1
2
x
e
t2
2
dt , x
The value of (x) usually is not so easy to compute
directly, so how to use the normal distribution
table is important. The following two rules are
essential for attaining this purpose.
Z~N(0,1),(0.5)=0.6915,
P{1.32<Z<2.43}=(2.43)-(1.32)=0.9925-0.9066
注:(1) (x)=1- (-x);
(2) 若X~N(, 2),则
F ( x ) P{ X x } (
x
).
1 X~N(-1,22),P{-2.45<X<2.45}=?
2. XN(,2), P{-3<X<+3}?
EX2 tells us the important 3 rules, which are widely
applied in real world. Sometimes we take P{|X- |≤3}
≈1 and ignore the probability of {|X- |>3}
Example The blood pressure of women at age 18 are
normally distributed with N(110,122).Now, choose a
women from the population, then try to determine (1)
P{X<105},P{100<X<120};(2)find the minimal x such that
P{X>x}<0.05
105 110
Answer : (1)P{ X 105}
0.42 1 0.6628 0.3371
12
120 110
100 110
P{100 X 120}
12
12
0.83 0.83 2 0.7967 1 0.5934
( 2) 令P{X x} 0.05
x 110
1
0.05
12
x 110
0.95
12
x 110
1.645
12
x 129.74
Distribution of the function of r.v.s
Distribution law of the function of discrete r.v.s
X~P{X=xk}=pk, k=1, 2, …
Suppose that
and y=g(x) is a real valued function, then Y=g(X)
is also a r.v., try to determine the law of Y..
Determine the law of Y=X2
Example
-1
X
Pk
1
3
0
1
3
1
1
Y
3
Pk
1
2
3
0
1
3
Generally
X
x1
x2 xk
Pk
p1
p2 pk
Y=g(X)
g ( x1 ) g ( x2 ) g ( xk )
or
…
Y=g(X)~P{Y=g(xk)}=pk , k=1, 2,
Density function of the function of continuous
r.v.
1. If Xf(x),-< x< +, Y=g(X) , then one
can try to determine the density function,
one can determine the d.f. of Y firstly
FY (y) =P{Yy}=P {g(X) y}=g ( x ) y f ( x )dx
and differentiate w.r.t. y yields the density funciton
dFY ( y )
fY ( y )
dy
Example Let XU(-1,1), tyr to determine the d.f.
and density function of Y=X 2
1
f X x 2
0
FY y
1 x 1
y g( x ) x 2
其它
f x dx
X
x2 y
If y<0 FY ( y) 0
If y≥1
FY ( y ) 1
y
If 0≤y<1
1
FY ( y ) dx
2
y
1
fY ( y ) FY ' ( y ) 2 y
0
y
0 y1
其它
y
y
Mathematical expectation
Definition 1. If X~P{X=xk}=pk, k=1,2,…n, define
n
E ( X ) x k pk
k 1
the mathematical expectation of r.v. X or mean of X.
Definition 2. If X~P{X=xk}=pk, k=1,2,…, and
| x
k 1
k
| pk
define
E ( X ) xk pk
k 1
the mathematical expectation of r.v. X
Example 2 Toss an urn and denote the points by X, try to
determine the mathematical expectation of X.
6
1 7
E( X ) k
6 2
k 1
Definition 3 Suppose that X~f(x), -<x<, and
| x | f ( x)dx
then define
E( X )
xf ( x )dx.
the mathematical expectation of r.v. X
Example 3. Suppose that r.v. X follows Laplace distribution with density function
x
1
f ( x)
exp
2
Try to determine E(X).
x
x
E( X )
exp
2
Let t
x
dx
t
2 exp | t | dt 0 exp tdt
Mathematical expectation of several important r.v.s
1. 0-1 distribution
X
P
1
0
p 1 p
EX=p
2. Binomial distribution B(n, p)
P{ X k } C nk p k (1 p) n k
n
n!
E( X ) k
p k (1 p) n k
k 1 k ! ( n k )!
k 0.1,...n
n
n!
k
n k
p (1 p )
k 1 ( k 1)! ( n k )!
( n 1)!
k 1
n 1 ( k 1 )
np
p (1 p)
k 1 ( k 1)! ( n k )!
n
n 1
令l k 1 np C
l 0
np
l
n 1
p (1 p )
l
n 1 l
3.Poisson distribution
X ~ P{ X k }
k
k 0
k!
E( X ) k
k
k!
e , k 0, 1, 2, ...
k 1
e e
k 1
( k 1)!
;
4. Uniform distribution U(a, b)
1
, a x b,
X ~ f ( x) b a
0,
el se,
b
x
ab
E( X )
dx
;
a ba
2
5.Exponential distribution
e
f ( x)
0
x
E ( X ) xe
x
x0
x0
dx xde
0
xe
x
0
x
0
e
0
x
dx
1
6. Normal distribution N(, 2)
1 e
2
X ~ f (x)
E( X )
令t
x
( x ) 2
22
, x
x
e
2
( x )2
2
t
2 e
2
t2
2
dx
dt ;
Mathematical expectation of the functions of r.v.s
EX 1 Suppose that the distribution law of X
X
-1
Pk 1 3
0
1
1
1
3
3
Try to determine the mathematical expectation of Y=X2
Y
Pk
1
2
3
0
1
3
2
1 2
E (Y ) 1 0
3
3 3
Theorem 1 let X~P{X=xk}=pk, k=1,2,…,then the
mathematical expectation of Y=g(X) is given by the
following equation and denoted by E(g(X))
E (Y ) E[ g ( X )] g ( x k ) pk .
k 1
EX2:Suppose that r.v. X follows standardized distribution
Try to determine the mathematical expectation of Y=aX+b
Answer Y=ax is strictly monotonic with
yb
respect to x with inverse function
h( y )
Thus the density function
of Y is given by
yb 1
fY ( y ) f X (
)
a
a
E (Y )
y
e
2
y b
a
2
a
1
e
2
yb
a
2
2
1
a
2
ax b
1
e
dy
a
2
x2
2
dx
b
Theorem 2 If X~f(x), -<x<, the mathematical
expectation of Y=g(X) is specified as
E (Y ) E[ g( X )] g( x ) f ( x )dx.
Suppose that X follows N(0,1) distribution, try to
determine E(X2), E(X3) and E(X4)
f ( x)
E( X )
2
1
e
2
1
e
2
2
x
e
2
x2
2
dx
x2
2
x2
2
1
dx
x
de
2
x2
2
E( X )
3
3
E( X )
4
3
4
3
x2
2
x
de
2
dx 0
x2
2
x
e
2
x
e
2
x2
2
dx
3
2
x
e
2
x2
2
dx
Properties of mathematical expectation
1. E(c)=c, where c is a constant;
2。E(cX)=cE(X), c is a constant.
Proof. Let X~f(x), then
E (cX )
cxf ( x )dx
c xf ( x )dx cE ( X )
Example 2. Some disease will occur with probability 1%,
investigate 1000 people now, it is necessary to check the blood.
The method is clarified these people into ten group with each
group 100 and check the mixed blood sample. If the result is
negative, it is not need to do any test any more, if it is positive,
then ,it is necessary to test each blood sample respectively, try to
determine the average times needed for the test.
Let Xj j 1,...10 is the number to be taken of jth group, and X
the number to be taken in 1000 people, then
Xj
1
101
Pj (99%)100
1 (99%)100
EX j 0.99100 (101)(1 0.99100 )
10
10
j 1
j 1
E ( X ) E ( X j ) E ( X j )
10[0.99100 (101)(1 0.99100 )]
1
1000 [1
0.99100 ]
100
644
Variance
Definition 1 Suppose that X is a r.v. with
EX2<∞, define E (X-EX)2 the variance of
r.v. X and denote it by DX
E (X-EX)2= E [X2-2EXEX +E2X ]=EX2- E2X
The variance of several important r.v.s
(0-1) distribution with P(X=0)=p, then
DX=pq
Binomial distribution B(n,p), then DX=npq
Poisson distribution with parameter
then, DX=EX=
The variance of several important r.v.s
Uniform distribution: Suppose that r.v. X is uniformly
distributed on interval [a,b], then DX 1 (b a)2
12
Normal distribution:
then DX 2
X
N ( , 2 )
Exponential distribution: X
then
1
DX
2
E ( )
Definition of mathematical expectation
Properties of mathematical expectation
Mathematical expectation of
the functions of r.v.
Several important expectation