30.6 FUNCTIONS OF RANDOM VARIABLES
y
y+dy
dx 1 dx 2 X
Y
Figure 30.9 Illustration of a functionY(X) whose inverseX(Y) is a double-
valued function ofY. The rangeytoy+dycorresponds toXbeing either in
the rangex 1 tox 1 +dx 1 or in the rangex 2 tox 2 +dx 2.
This result may be generalised straightforwardly to the case where the rangeyto
y+dycorresponds to more than twox-intervals.
The random variableXis Gaussian distributed (see subsection 30.9.1) with meanμand
varianceσ^2. Find the PDF of the new variableY=(X−μ)^2 /σ^2.
It is clear thatX(Y) is a double-valued function ofY. However, in this case, it is
straightforward to obtain single-valued functions giving the two values ofxthat correspond
to a given value ofy;thesearex 1 =μ−σ
√
yandx 2 =μ+σ
√
y,where
√
yis taken to
mean the positive square root.
The PDF ofXis given by
f(x)=
1
σ
√
2 π
exp
[
−
(x−μ)^2
2 σ^2
]
.
Sincedx 1 /dy=−σ/(2
√
y)anddx 2 /dy=σ/(2
√
y), from (30.59) we obtain
g(y)=
1
σ
√
2 π
exp(−^12 y)
∣
∣∣
∣
−σ
2
√
y
∣
∣∣
∣+
1
σ
√
2 π
exp(−^12 y)
∣
∣∣
∣
σ
2
√
y
∣
∣∣
∣
=
1
2
√
π
(^12 y)−^1 /^2 exp(− 21 y).
As we shall see in subsection 30.9.3,this is the gamma distributionγ(^12 ,^12 ).
30.6.3 Functions of several random variables
We may extend our discussion further, to the case in which the new random
variable is a function ofseveralother random variables. For definiteness, let us
consider the random variableZ=Z(X, Y), which is a function of two other
RVsXandY. Given that these variables are described by the joint probability
density functionf(x, y), we wish to find the probability density functionp(z)of
the variableZ.