You are on page 1of 9

7.

11 Functions of random variables

7.11.1 Function of one random variable:


X is a r.v. Let a quantity Y be functionally dependent on X:
Y = g( X ) ,
Then, Y too is a random variable, if the function g holds certain properties (P&P p. 123):
1. Its domain must include the range of X.
2. It must be a Borel function, i.e., for every y, the set Ry such that g(x)<= y must
consist of the union and intersection of a countable no. of intervals. Only then
Y<=y is an event.
3. The events g(X)= +/- infy must have zero probability.
What are the probabilistic characteristics of Y ?
f
Example: wind induced wave ht, Z = V2
14000
where f= fetch, d = depth of lake, V = wind speed .
Since V = random, so is Z .
Example:
Wave force on cylinder:
 
F = Fdrag + Finertia = Cd aU | U | Cm vU
2g g
Cd=drag coeff
Cm=inertia coeff
a=area of cylinder/length
v= volume of cylinder / length
U= water velocity
U(dot)=water acceleration

We are interested to find the distribution of Y and its statistics such as mean and s.d. from
the distribution of X. As we will see, the event Y  y implies  X  Ry  , where Ry is
some range depending on y, so that, the cdf of Y,
FY ( y )  P[ X  Ry ]

If X is discrete, then pmf of Y,


k
pY ( y )   p X ( xi ), where g 1 ( y )  {x1 , x2 ,..., xk }
i 1
If X is continuous, then pdf of Y,
k
dxi
fY ( y )   f X ( xi ) , where g 1 ( y )  {x1 , x2 ,..., xk }
i 1 dy

7.11.1.1 Expected value of Y:



for continuous X: E (Y )  E ( g ( X )]   g ( x) f

X ( x)dx (g is not necessarily one-one)

for discrete X: E (Y )  E ( g ( X )]   g ( x) p X ( x) (g is not necessarily one-one)


all x

Approximate mean of Y: Expand g(X) in Taylor series around X.


1
E (Y )  g (  X )  g ''(  X )  X2
2
Two cases will be looked at, one when g is a monotonic function, and two, when it is not.

7.11.1.2 Case 1) g ( ) is one to one


1a) X is discrete  Y is discrete
pY ( yi )  P[Y  yi ]  P[ X  g 1 ( yi )]  p X ( g 1 ( yi ))
FY ( y )  P[Y  y ]  P[ g ( X )  y ]  P[ X  g 1 ( y )]
 p X ( xi )
allxi  g 1 ( y )

1b ) X is continuous ,
g 1( y )
FY ( y )  P[ X  g 1 ( y )]   f X ( x) dx


dFY dg 1 ( y )
fY ( y )   f X ( g 1 ( y )) | |
dy dy
absolute value is put if g(X) is
a decreasing fn.

2 ( )
d 2 ( ) F d d
Note:
d  
1( )
F ( x,  )dx  
  
dx  F (2 ,  )
d
 F ( ,  ) 1
d
1( )

Continuous to discrete transforms are also possible


eg. X is continue
and X  A1  Y = y1
say measurement of damage (X)
and damage class (Y)

So P[Y  yi ]  P[ X  Ai ]
bi
  f X ( x)dx
ai

y y = g (x)

x1 x FX is known

FY ( y1 )  P[Y  y ]  P[ g ( X )  y ]  P[ X  g 1 ( y )]

{Y  y1}  {X  x1}  FX ( g 1 ( y )) .
d d
fY ( y )  FY ( y )  FX ( g 1 ( y ))
dy dy

d 1 dg 1 ( y )
 F ( g ( y ))
dg 1
X
dy
dg 1 ( y )
 f X ( g 1 ( y )) | |
dy
1 x X
1 1 2( )2
Ex. X  N ( X , X ) f X ( x)  e X

2  X

Y  e X ( g ( X ))
dl n y 1
fY ( y )  f X (l n y) | | f X (l n y )
dy y
1 1 1  12 ( l n y X X )2
x  g 1 ( y)  l n y  e
y 2  X

7.11.1.3 Case 2 g ( X ) is many to one.

2a) X is discrete
Y  g( X )
 g 1 ( y )  {x1 , x2 ......xk }
k k ( y)
{Y  y}  ( X  xi )  { X  xi( y)}
i 1 i 1
k ( y)
 pY ( y )  
i ( y ) 1
p X ( xi ( y ))

2b) X is continuous

k
dxi 1
fY ( y )   f X ( xi ) (7.49)
i 1 dy

x11 x12 x13 x2

{Y  y2 }  { X  x2 }
{Y  y1}  {X  x11  x12  X  x13}
In general , {Y  y}  { X  Ry}
Ry = Some range depending on y

 FY ( y)  p[ X  Ry]

X  N (0,1)
Ex
Y  X2

x
P[Y  y]  P[ y  X  y ]

 FX ( y )  FX ( y )

d d ( y )
fY ( y )  f X ( y ) y  f X ( y )
dy dy
1 1
 fX ( y )  f X ( y )
2 y 2 y
1 1  12 y 1  12 y 1 1
 y
 [ e  e ] e 2
2 y 2 2 2 y

Ex U  CP 2 , P  N ( ,  )

fU  ?

u
Set U  u, then P   , so that p1   u and p2   u
c c c
Now,
dp1 1 1

du 2 uc
dp2 1 1

du 2 uc

Then, by eqn (7.49) the pdf of U is:


2
dpi
fU (u )   f p ( pi ) | |
i 1 du
1  c  P 2
u u  p
1 c
1  ( )  ( )2 1 1
p p
 [e 2
e 2
]
2 P 2 uc

Alternately
U  cP2
P[U  u]  P[cP2  u]

u u
 P[ P ]
c c
u p  u p
 [ c ]  [ c ]
p p

u
p  u p
1 1 1
( c ] ( c ) .
fU (u)  P 2 uc  p P 2 uc P
1 u c  p 2 1  u c  p 2
1  ( )  ( )
P P
 [e 2
e 2
]
2 2 uc P

7.11.2 Function of several random variables


X is a random vector of size n. Let Y be a function of X.
Y = g(X)
Expected value of Y:
 
for continuous X: E (Y )  E ( g ( X )]     g ( x) f
 
X ( x ) dx (g is not necessarily one-one)

for discrete X: E (Y )  E ( g ( X )]     g ( x ) p X ( x ) (g is not necessarily one-one)


all x1 all xn

Approximate mean of Y: Expand g(X) in Taylor series around X.


1 n n 2 g
E (Y )  g (  )  
2 i 1 j 1 xi x j
 ij where  is the mean vector and ij is the

covariance.
PDF of Y?

7.11.3 Sum of several RVs


Convolution
Example:
The PMF of the Pascal RV can be derived by convolution using Eq (5.5). For r = 2, we
have:
P  X 2  n   P G1  G2  n  , P  Gi  m   q m 1 p
n 1
  P G2  n  m G1  m  P G1  m 
m 1

n 1 P  N 2  2    n  1 p 2 q n  2
  P G2  n  mP G1  m 
m 1   n  1 q n  2 p 2
n 1
  q n  m 1 p q m 1 p
m 1
n 1
  q n2 p 2
m 1

  n  1 q n  2 p 2

7.11.3.1 moment and variance


Let Y be a linear combination of n random variablex, X.

Y  a0  AX (7.50)

 X1 
X 
 
where A  {a1 , a2 ,..., an } , X   2 
 
 X n 

 1 
 
 
Let  X be the mean vector of X:  X   2 
 
  n 
 11  12 ...  1n 
  22  
and let VX   21 be the covariance matrix of X.
    
 
 n1    nn 
Then the mean of Y is,
Y  a0  A X

and the variance of Y is:  Y 2  AVX AT


Further, if X are jointly Normal , Y is Normal too.
Now consider the product,

Y  a0Y11Y2 2 ......Yn n (7.51)

If Yi is LN for all i, Y is lognormal.


The mean and variance of Y can be found the following way. Let mi be the median of Yi,
and let Vi be the c.o.v. of Yi.
ln Y  ln a0  1 ln Y1   2 ln Y2  ....
 ln Y  ln a0  1ln Y  ...
1

ln mY  ln a0  1 ln m1 
mY  a0 m11 m22 ...mn n
If Yi’s are independent.
1  VY 2  (1  V12 )1 (1  V2 2 ) 2 ...(1  Vn 2 ) n
2 2 2

7.11.3.2 Application to sum of normals and product of lognormals

7.11.4 Several functions of several random variables


Papoulis p. 143, 183.
Let X  {X1......... X n } . Let k functions be defined on X:

Y1  g1 ( X )

(7.52)
Yk  g k ( X )

If k = n, the joint density function of Y is:

f X ( x1........xn )
fY ( y1........ yn )  (7.53)
| J ( x1........xn ) |
where the Jacobian of the transformation is:
g1 g1

x1 xn
J   
g n g n
x1 xn

If k  n,
Yk 1  X k 1
When k  n, choose
Yn  X n
If k  n.
Express Yn1.........Yk in term of Y1 ……… Yn

If there are several solutions to the problem, i.e., several x vectors {x (1) , x (2) ,...} give
rise to the same y vector:
Use the sum over all such solutions:

f X ( x1(i ) ,..., xn (i ) )
fY ( y1........ yn )   (7.54)
i | J ( x1(i ) ,..., xn (i ) ) |

You might also like