1
Functions of Random Variables
We have encountered functions of random variables before when we were interested in finding the expectation
of
Y
=
g
(
X
). Now, we are interested in finding the distribution of
Y
.
1.1
Discrete Case
In general,
P
(
Y
=
y
) =
P
(
X
∈ {
x
:
g
(
x
) =
y
}
)
(1)
Example:
Suppose that
X
can take values

1
,
0
,
1 with probabilities 1
/
4
,
1
/
2
,
1
/
4, and consider the random
variable
Y
=
X
2
.
The possible values of
Y
are 0 and 1.
Clearly
P
(
Y
= 0) =
P
(
X
= 0) = 1
/
2 and
P
(
Y
= 1) =
P
(
X
∈ {
1
,
1
}
) = 1
/
2.
The general formula simplifies significantly if
g
(
x
) is onetoone, for in this case there is exactly one
element in the set
{
x
:
g
(
x
) =
y
}
for values of
y
in the domain of
Y
. In this case, then there exists an inverse
function, say
x
=
h
(
y
), and consequently
P
(
Y
=
y
) =
P
(
X
=
h
(
y
))
because the event
{
Y
=
y
}
is equivalent to the event
{
X
=
h
(
y
)
}
.
Suppose
X
is Bernoulli with parameter
p
and let
Y
= 2
X

1. Then
h
(
y
) =
y
+1
2
, and
P
(
Y
=
y
) =
P
(
X
=
y
+ 1
2
)
for
y
∈ {
1
,
1
}
.
1.2
Continuous Case
To deal with the continuous case, suppose first that the function
g
is increasing. Then there is an inverse
mapping such that
g
(
h
(
y
)) =
y
, and as a result, the set
{
x
:
g
(
x
)
≤
y
}
=
{
x
:
x
≤
h
(
y
)
}
. Consequently,
P
(
Y
≤
y
) =
P
(
g
(
X
)
≤
y
) =
P
(
X
≤
h
(
y
))
.
Taking derivative with respect to
Y
, we obtain the formula
f
Y
(
y
) =
f
X
(
h
(
y
))
h
0
(
y
)
.
Example:
Suppose that
X
is uniformly distributed over the interval [0
,
1] and that
Y
=
g
(
X
) =
a
+(
b

a
)
X
with
b > a
. Then
g
(
x
) is clearly increasing and
h
(
y
) =
y

a
b

a
. Since the density
f
X
(
x
) = 1 on 0
≤
x
≤
1, it
follows that the density of
Y
is given by
f
Y
(
y
) =
h
0
(
y
) =
1
b

a
on
a
≤
Y
≤
b
, so
Y
is uniformly distributed over the interval (
b, a
).
1
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Example:
Suppose
X
is exponential with parameter
λ
. Find the density of
Y
=
g
(
X
) =
aX
+
b
where
a >
0. Then,
h
(
y
) =
y

b
a
and
f
Y
(
y
) =
λ
a
exp(

λ
a
(
y

b
))
on
y
≥
a
, so
Y
has a shifted exponential distribution with parameter
λ/a
.
If
Y
=
g
(
X
) and
g
is decreasing, then the event
{
x
:
g
(
x
)
≤
y
}
corresponds to the event
{
x
:
x
≥
h
(
y
)
}
and as a result,
P
(
Y
≤
y
) =
P
(
X
≥
h
(
y
)) = 1

P
(
X
≤
h
(
y
))
Taking derivatives we find
f
Y
(
y
) =

f
X
(
h
(
y
))
h
0
(
y
)
.
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '04
 GALLEGO
 Normal Distribution, Variance, Probability theory, S100

Click to edit the document details