( ) ( )

advertisement
© M. J. Roberts - 2/4/08
( ( )) .
f X g 1 y
( )
fY y =
dy / dx
( )
If fY y is to be the constant one in the range 0 < y 1, then dy / dx must be the same
( ( )) in that same range. So we want the magnitude of the derivative of
as f X g 1 y
()
()
()
()
y=g x
to be the same as f X x which is the derivative of FX x . So if we choose g x to be the
()
same as FX x , when we differentiate we will get the correct denominator dy / dx to
( )
make the PDF of Y uniform. So Y = FX X is a solution because the derivative has the
right magnitude and the values of Y must fall between 0 and 1. Because of the magnitude
operation there is another solution Y = 1 FX X . Since FX x can only have values
( )
between 0 and 1 inclusive, Y = 1 FX X
( )
()
also can only have values between 0 and 1
inclusive and although the derivative is different from the previous case its magnitude is
the same. In this second solution the mapping between X and Y is different but the
distribution of values is the same.
Now, to convert an arbitrary PDF of one CV random variable to an arbitrary PDF
of another CV random variable we just comine these two operations into one. The most
direct solution is
( ( ))
Y = FY-1 FX X
.
(2.19)
________________________________________________________________________
Example 2-9
A CV random variable X has a PDF
2x , 0 < x < 1
fX x = 0 , otherwise
()
(2.20)
and we want to convert it into another CV random variable Y with a PDF
1 y , y < 1
fY y = .
0 , otherwise
( )
( )
What is the desired function Y = g X ?
The two PDF’s are illustrated in Figure 2-54.
2-35
(2.21)
© M. J. Roberts - 2/4/08
Probability Density of X
Probability Density of Y
2
fY(y)
fX(x)
2
1
0
-2
-1
0
1
1
0
-2
2
-1
x
0
1
2
y
Figure 2-54 PDF’s of X and Y
Integrating (2.20) we get
0 , x < 0
FX x = x 2 , 0 < x < 1 .
1 , x > 1
()
Integrating (2.21) we get
0 , y < 1
2
y /2 + y + 1 / 2 , 1 < y < 0
FY y = 2
y y / 2 +1/ 2 , 0 < y <1
1 , y > 1
Distribution of X
Distribution of Y
2
2
F (y)
0
-2
-2
Y
FX(x)
( )
0
-2
-2
2
x
0
0
y
2
Figure 2-55 Distribution functions for X and Y
( ( ))
The transformation function is FY1 FX x . Therefore we will need the inverse of FY ( y ) .
The inverse of FY ( y ) can be seen graphically by rotating the graph of FY ( y ) around the
45° line in Figure 2-55 to form the graph in Figure 2-56.
Inverse of
Distribution of Y
y
2
0
-2
-2
0
2
F (y)
Y
Figure 2-56 Graphical inverse of the distribution of Y
2-36
© M. J. Roberts - 2/4/08
Let Z = FY ( y ) . Then y = FY1 ( Z ) and the inverse distribution function can be graphed as
in Figure 2-57.
Y
y = F -1 (Z )
2
0
-2
-2
0
2
Z
Figure 2-57 y as the inverse distribution function of Z
This inverse function is single valued in the range 0 < Z < 1 . In the range 0 < Z < 1 / 2 ,
we invert Z = FY y = y 2 /2 + y + 1 / 2 , 1 < y < 0 and solve for y as a function of Z
( )
using the quadratic formula and get y =
2 ± 4 4 + 8Z
= 1 ± 2Z (Figure 2-58).
2
0
-0.2
-0.4
-1
y = FY (Z)
-0.6
-0.8
-1
-1.2
-1.4
-1.6
-1.8
-2
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
0.45
0.5
Z
Figure 2-58 y as a function of Z
Only the plus-sign solution will yield the graph in Figure 2-57. Doing the same process
for the range 1 / 2 < Z < 1 and inverting Z = FY y = y y 2 / 2 + 1 / 2 , 0 < y < 1 yields
(
( )
)
y = 1 2 1 Z .
1 + 2Z
, 0 < Z <1/ 2
y = FY1 Z = .
,
1
/
2
<
Z
<
1
1
2
1
Z
( )
This
last
result
can
be
(
)
confirmed
by
( )
forming
( ( ))
FY1 Fy y .
FY y = y 2 /2 + y + 1 / 2 , 1 < y < 0 then
( ( ))
(
)
FY1 Fy y = 1 + 2 y 2 /2 + y + 1 / 2 , 0 < y 2 /2 + y + 1 / 2 < 1 / 2
( ( ))
FY1 Fy y = 1 +
y2 + 2 y + 1 , 0 < y2 + 2 y + 1 < 1
2-37
If
© M. J. Roberts - 2/4/08
( ( ))
( y + 1)
FY1 Fy y = 1 +
There are two choices for
( y + 1)
2
2
, 1 < y2 + 2 y < 0
, y + 1 and ( y + 1) . If we choose y + 1 we get
( ( ))
(
)
FY1 Fy y = 1 + y + 1 , 1 < y y + 2 < 0
( ( ))
(
)
FY1 Fy y = y , 1 < y y + 2 < 0
(
)
To reduce the inequality to simpler terms notice that if y = 1 , y y + 2 = 1 and if
(
)
(
)
y = 0 , y y + 2 = 0 and for any y in the range 1 < y < 0 , y y + 2 is also in that range.
(
)
So the inequality 1 < y y + 2 < 0 is consistent with the inequality 1 < y < 0 . (The
(
)
inequality 1 < y y + 2 < 0 is also consistent with the inequality 2 < y < 1 .) The
choice of y + 1 as the value of
( y + 1)
2
is consistent with the choice of the plus-sign
solution in y = 1 ± 2Z and the range 1 < y < 0 . (The choice of ( y + 1) as the value
of
( y + 1)
2
is consistent with the choice of the minus-sign solution in y = 1 ± 2Z
and the range 2 < y < 1 .) Therefore, using the solution that fits our range
( ( ))
FY1 Fy y = y , 1 < y < 0
A similar analysis of the other range of y, 0 < y < 1 , yields
( (
( ( ))
FY1 Fy y = 1 2 1 y y 2 / 2 + 1 / 2
( ( ))
FY1 Fy y = 1 ( y 1)
( ( ))
FY1 Fy y = 1 The quantity
( y 1)
2
2
)) , 1 / 2 < y y
(
2
/ 2 +1/ 2 <1
)
, 0 < y 1 y / 2 < 1/ 2
( y 1)
2
(
)
, 0 < y 2 y <1
can be either y 1 or ( y 1) . If we choose ( y 1) then
( ( ))
FY1 Fy y = 1 ( y 1)
2-38
2
= y, 0 < y < 1
© M. J. Roberts - 2/4/08
()
The overall transformation is then (using FX x = x 2 , 0 < x < 1),
1
Y
F
1 + 2x 2
, 0 < x2 < 1 / 2
FX x = 2
2
1 2 1 x , 1 / 2 < x < 1
( ( ))
(
)
(Figure 2-59).
Overall Conversion Function, g(x)
2
1.5
X
FY-1(F (x))
1
0.5
0
-0.5
-1
-1.5
-2
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
x
( )
Figure 2-59 Transformation function, Y = g X
To better see what is happening, split the conversion into two steps, X Z
followed by Z Y .
f X g 1 z
fZ z =
dz / dx
( ( ))
()
()
Since z = FX x that implies that
()
()
()
dz d
=
F x = f X x . Therefore, since f X x
dx dx X
PDF and therefore non-negative,
()
fZ z =
( ( )) = 1 , 0 < x 1 , 0 < z 1
f X f X1 z
()
fX x
Similarly,
( )
fY y =
( ( ))
f Z g 1 y
dy / dz
2-39
.
is
© M. J. Roberts - 2/4/08
()
( )
Since y = FY1 z that implies that z = FY y and
1 y , y < 1
dz d
=
FY y = fY y = dy dy
0 , otherwise
( )
( )
and
dz 1 y , y < 1
fY y = f Z z
=
dy 0 , otherwise
=1
( )
()
________________________________________________________________________
Expectation and Moments
An important operation in any analysis of random variables is finding the expected
value of a random variable. The term expected value simply means the average value.
Imagine N trials of an experiment with M distinct outcomes. The ordinary meaning of the
average value X of a DV random variable X is
1 M
n x
N i=1 i i
X=
where xi is the ith distinct outcome, and ni is the number of times that outcome occurred
in N trials. This can be manipulated into
X=
M
M
ni
1 M
n
x
=
x
=
r x
N i=1 i i i=1 N i i=1 i i
where ri is the relative frequency of occurrence of xi , ni / N . In the limit as the number
of trials of an experiment approaches infinity, the relative frequency of occurrence of an
event approaches the probability of that event
lim r = P X = xi .
N i
The expected value of X is the limit as the number of trials N approaches infinity and in
that same limit the relative frequency of occurrence approaches the probability of the
value xi .
( )
M
E X = lim N i=1
M
ni
xi = lim ri xi
N N
i=1
2-40
Download