Full CHapter 4 Solutions

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 44

4 Functions of Random Variables

1. Derive the probability density function for Y , given that Y = X 4 ; for the
cases
(i) fX (x) = 12 ; 0 x 2
(ii) fX (x) = c exp( x); x 0:
Plot all density functions.
Solution:

g(x) = X4
g 0 (x) = 4X 3 :

Mathematically there are four roots given by (obtain these easily by de…n-
ing Y = Z 2 and Z = X 2 and performing successive square roots):
p p
x1 = 4 y; x2 = 4 y;
p p
x3 = i 4 y; x4 = i 4 y:

(i) For
1
; 0 x 2;
fX (x) =
2
the general transformation considering only the positive root is
fX (x1 )
fY (y) =
jg 0 (x1 )j
1 1
=
4y 3=4 2
1
= ; 0 y 16:
8y 3=4
Note that Z 16 16
1 1 4 1=4
3=4
dy = y = 1:
0 8y 81 0
The density plots are shown in Figures 27 and 28.
(ii) Given
fX (x) = c exp( x); x 0;
…rst …nd the value of c :
Z 1
c exp( x)dx = 1:0
0
=) c = 1:0:

As x has a positive range, the negative roots should be neglected for


calculations.

42
f(x)
0.6

0.4

0.2

0.0
0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 2.2 2.4
x

Figure 27: Density Function fX (x) = 1=2; 0 x 2

5
f(y)

0
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
y

1
Figure 28: fY (y) = 8y 3=4
; 0 y 16

43
Performing the density transformation:

fX (x1 )
fY (y) =
jg 0 (x1 )j
1 p
= exp( 4 y)
4y 3=4
1 p
= 3=4
exp( 4 y); y 0:
4y
Z 1
1 p
and exp( 4 y)dy = 1:
0 4y 3=4
The plots of these density functions are shown in Figures 29 and 30.

1.0
f(x)
0.8

0.6

0.4

0.2

0.0
0 1 2 3 4 5
x

Figure 29: Density Function fX = exp( x); x > 0

2. For the function Y = aX 2 ; …nd fY (y) for the cases where


(i) fX (x) = c exp( x); x 0;
(ii) fX (x) is a Rayleigh density,
(iii) fX (x) is a lognormal density.
Plot all density functions.
Solution: For this case, mathematically there are two roots
r r
y y
x1 = ; x2 = :
a a

But since x has a positive range for all cases, so we must drop the negative
root. Therefore, only one root is used to calculate fY : Performing the

44
5
f(y)

0
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
y

1 p
Figure 30: fY (y) = 4y 3=4
exp( 4 y); y 0

density transformation:

g(x) = aX 2
g 0 (x) = 2aX
fX (x1 )
fY (y) = :
jg 0 (x1 )j

(i) Given that fX (x) = c exp( x); x 0; …rst …nd the value of c :
Z 1
c exp( x)dx = 1:0
0
=) c = 1:0:

Then,

fX (x1 )
fY (y) =
jg 0 (x1 )j
r
1 y
= r exp( )
y a
2a
a
r
1 y
= p exp( ); y 0:
2 ay a

45
5
y

0
0.040.060.080.100.120.140.160.180.200.220.240.260.280.300.320.340.360.380.400.42
x
1 p
p
2 y exp( y)

For the case a = 1; the plot of density function fX (x) is shown in Figure
31.

1.0
f(x)
0.8

0.6

0.4

0.2

0.0
0 1 2 3 4 5
x

Figure 31: Density Function fX (x) = exp( x); x > 0

(ii) If fX (x) is a Rayleigh density, it is given by


x x2
f (x) = 2
exp ;x 0:
2 2

46
As there is only one root, we have
fX (x1 )
fY (y) =
jg 0 (x1 )j
r
1 y 1 y
= p exp
2 ay a 2 2a 2
1 y
= exp ; y > 0:
2a 2 2a 2
For the case = 1 and a = 1; the plots of these density functions are
shown in Figures 32 and 33.

f(x) 0.6
0.5

0.4

0.3

0.2

0.1

0.0
0 1 2 3 4 5
x
n o
x2
Figure 32: Density Function fX (x) = x exp 2 ;x>0

(iii) The lognormal density is given by


( )
2
1 1 ln x
fX (x) = p exp ; 0 < x < 1:
x 2 2

So fY (y) is found as
fX (x1 )
fY (y) =
jg 0 (x1 )j
8 !2 9
1 1 < 1 ln p y =
a
= p y p y p exp
2a a a 2 : 2 ;
8 !2 9
1 < 1 ln p y =
a
= p exp ; y > 0:
2y 2 : 2 ;

47
0.5
f(y)

0.4

0.3

0.2

0.1

0 1 2 3 4 5
y

1 y
Figure 33: Density Function fY (y) = 2 exp 2 ;y>0

For mean value = 1, standard deviation = 1; and a = 1; the density


functions are plotted in Figures 34 and 35.
3. Derive the probability density function for Y; given Y = a + X 3 : Consider
two cases:
(i) fX (x) = c exp( x); x 0;
(ii) fX (x) is a lognormal density.
Plot all density functions.
Solution:
(i) Given the density fX (x) = c exp( x); x 0; …rst …nd the value of c :
Z 1
c exp( x)dx = 1 =) c = 1:
0

For
X3 = Y a;
X has three equal roots, p
3
Y a:

48
y
0.20

0.15

0.10

0.05

0.00
0 2 4 6 8 10 12 14 16 18 20 22 24
x
( )
2
1 1 ln x 1
Figure 34: Density Function fX (x) = p exp ;x>0
x 2 2 1

0.20
f(y)

0.15

0.10

0.05

0.00
0 1 2 3 4 5
y
8 !2 9
< 1 p =
1 ln y 1
Figure 35: Density Function fY (y) = exp p ;y>
2y 2 : 2 1 ;
0

49
Performing the density transformation:
p p p
x1 = 3 y a; x2 = 3 y a; x3 = 3
y a
g(x) = a + X3
g 0 (x) = 2X 2
fX (x1 ) fX (x2 ) fX (x3 )
fY (y) = + +
jg 0 (x1 )j jg 0 (x2 )j jg 0 (x3 )j
3 p3
= 2 exp( y a); y 0:
2(y a) 3

Density functions for a = 1 are shown in Figures 36 and 37.

1.0
f(x)
0.8

0.6

0.4

0.2

0.0
0 1 2 3 4 5
x

Figure 36: Density Function fX (x) = exp( x); x > 0

(ii) The lognormal density is given by


( )
2
1 1 ln x
fX (x) = p exp ; 0 < x < 1:
x 2 2

50
y 25

20

15

10

0
0 1 2 3 4 5
x

3 p
Figure 37: Density function fY (y) = 2 exp( 3
y a); y > 0
2(y a) 3

Performing the density transformation:


p p p
x1 = 3 y a; x2 = 3 y a; x3 = 3 y a
3
g(x) = a+X
g 0 (x) = 2X 2
fX (x1 ) fX (x2 ) fX (x3 )
fY (y) = + +
jg 0 (x1 )j jg 0 (x2 )j jg 0 (x3 )j
( p )
2
1 3 1 ln 3 y a
= 2 p p exp
2(y a) 3 3 y a 2 2
( p )
2
3 1 ln 3 y a
= p exp :
2 2 (y a) 2

Density functions for = 1; = 1 and a = 1 are shown in Figures 38 and


39.
4. Derive the probability density function for Y; given Y = X 3 for

fX (x) = 1=c2 ; 2 < x < 4:

Sketch all density functions.


Solution: Integrating the density function over the domain yields:
Z 4
1
2
dx = 1
2 c
c2 = 2:

51
0.25
f(x)
0.20

0.15

0.10

0.05

0.00
0 1 2 3 4 5 6 7 8 9 10
x
n o
p1 1 ln x 1 2
Figure 38: Density Function fX (x) = x 2
exp 2 1 ;x>0

f(y) 2.5

2.0

1.5

1.0

0.5

0.0
1 2 3 4 5
y
( p 2
)
3 1 ln 3
y 1 1
Figure 39: Density Function fY (y) = p exp 2
2 2 (y 1) 1

52
Then, x1 = y 1=3 and

g(X) = X3
g 0 (X) = 3X 2 = 3Y 2=3
fX (x1 ) 1=2 1
fY (y) = = = 2=3 ; 8 < y < 64:
jg 0 (x1 )j 3y 2=3 6y

5. The random variables X and Y are related by the equation

Y = eX :

(i) Suppose that X is uniformly distributed as 0 X 5: Find fY (y) :


Sketch this density function.
(ii) Suppose now that X is governed by the density function fX = ce x ;
0 X 5; where c is a constant. Find fY (y) : Sketch this density
function.
Solution:
(i) From the given information fX (x) = 1=5: Performing the density trans-
formation:

x1 = ln y
g(x) = exp(x)
g 0 (x) =
exp(x)
fX (x1 ) 1=5
fY (y) = =
jg 0 (x1 )j exp(ln y)
1
= ; 1 y 148:4
5y
fY (1) = 1=5
3
fY (148:4) = 1=(5 148:4) = 1:3477 10 :

The density functions are shown in Figures 40 and 41.


(ii) Suppose now that X is governed by the density function
x
fX = ce ;0 X 5;

where c is a constant. Find fY (y) : Sketch this density function.


R5
First …nd the value of c : 0 c exp( x)dx = 1 =) c = 1:0068:

fX (x1 ) 1:0068 exp( ln y) 1:0068


fY (y) = = = ; 1 y 148:4
jg 0 (x1 )j exp(ln y) y2
fY (1) = 1:0068
2 5
fY (148:4) = 1:0068= (148:4) = 4: 5717 10 :

The density functions are shown in Figures 42 and 43.

53
0.20
f(x)

0.15

0.10

0.05

0 1 2 3 4 5 6
x

Figure 40: Density function fX (x) = 1=5; 0 x 5

f(y) 0.20

0.15

0.10

0.05

0.00
0 20 40 60 80 100 120 140
y

1
Figure 41: Density function fY (y) = ;1 y 148:4
5y

54
1.0
f(x)
0.8

0.6

0.4

0.2

0.0
0 1 2 3 4 5
x

x
Figure 42: Density Function, fX (x) = 1:0068e ;0 x 5

1.0
f(y)
0.8

0.6

0.4

0.2

0.0
0 20 40 60 80 100 120 140
y

1:0068
Figure 43: Density Function, fY (y) = ;1 y 148:5
y2

55
6. Derive the probability density functions for Y; given Y = jXj ; and
8
< 1
>
if 2 x 0;
fX (x) = 4
> 1
: exp ( x) if x 0:
2

Solution: Performing the density transformation:

x1 = y; x2 = y
g(x) = X
g 0 (x) = 1
fX (x1 ) fX (x2 )
fY (y) = +
jg 0 (x1 )j jg 0 (x2 )j
1 1 1 1
= + exp ( y) + + exp (y)
4 2 4 2
1 1
= + (exp ( y) + exp (y)) ; y > 0:
2 2

The plots for the density function are shown in Figures 44 and 45.

0.6
f(x)

0.4

0.2

-3 -2 -1 0 1 2 3 4 5
x

Figure 44: fX (x)

7. Given the following: Y = 3X 4 and fX (x) = 0:5; where 1 x 1;


…nd fY (y) and plot both density functions.
Solution: For any density function fX (x) ; the general transformation
for one root is:
fX (x1 )
fY (y) = 0 ;
jg (x1 )j

56
f(y) 70
60

50

40

30

20

10

0 1 2 3 4 5
y

1 1
Figure 45: Density Function fY = 2 + 2 (exp ( x) + exp (x)) ; y > 0

If g(x) = 3X 4; then g 0 (x) = 3 and


0:5
fY (y) = = 0:16667; 7 y 1:
3
The plots for the density functions are shown in Figures 46 and 47.
8. Given the following: Y = 3X 4 and fX (x) = N (0; 0:33); …nd fY (y) and
plot both density functions.
Solution: As X is governed by the Gaussian density, the probability
density function is given by
( )
2
1 1 x
fX (x) = p exp ; 1 < x < 1:
2 2

In this case

x1 = (y + 4)=3;
g(x) = 3x 4
g 0 (x) = 3
0 2
1
(Y + 4)
1 1 B 3 C
B C
fY (y) = p exp B C; over all x;
3 2 @ 2 2 A

!
2
1 1 (Y + 4)
fY (y) = p exp for = 0; = 1:
3 (0:33) 2 18

57
0.6
f(x)
0.5

0.4

0.3

0.2

0.1

-1.4 -1.2 -1.0 -0.8 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4
x

Figure 46: Density Function fX = 12 ; 1 x 1

0.20
y

0.15

0.10

0.05

-8 -7 -6 -5 -4 -3 -2 -1 0 1
x

Figure 47: Density Function fY = 61 ; 7 x 1

58
The density function plots are given in Figures 48 and 49.

1.0
y

0.5

-1.0 -0.8 -0.6 -0.4 -0.2 0.2 0.4 0.6 0.8 1.0
x
-0.5

-1.0

1 1 x 2
Figure 48: Density Function fX (x) = p exp ; 1 0 1:
(1) 2 2 1

9. Given the ‡uid drag equation: FD = CD V 2 ; where CD is a constant and


fV (v) = 0:1; for the range 10 v 20; …nd fFD and plot both density
functions.
Solution: For this case there are two roots
p dv 1
v= FD =CD ; and = p :
dFD 2 FD C D
So the general transformation is given by
" r ! r !#
1 FD FD
fFD (FD ) = p fV + fV u (FD ) ;
2 CD FD CD CD

where u( ) is the unit step function. However, since v has a positive range
we must drop the negative root. Therefore,

1 1
fFD (FD ) = p u (FD )
2 CD FD 10
1
= p u (FD ) :
20 CD FD
Suppose, CD = 2:0: Then,
1
fFD (FD ) = p ; 200 FD 800:
20 2FD

59
y
0.12

0.10

0.08

0.06

0.04

0.02

-14 -12 -10 -8 -6 -4 -2 0 2 4 6


x
!
2
1 1 (y + 4)
Figure 49: Density Function fY (y) = p exp ; 1 0
3 (1) 2 18(1)2
1

0.12
f(v)
0.10

0.08

0.06

0.04

0.02

0.00
0 2 4 6 8 10 12 14 16 18 20 22
v

1
Figure 50: Density Function fV (v) = 10 ; 10 v 20

60
0.015
f(Fd)

0.010

0.005

0.000
0 2 4 6 8 10 12 14 16 18 20 22
Fd

1
Figure 51: Density Function fFD = p ; 200 FD 800
20 2FD

The density plots are shown in Figures 50 and 51.


If 10 v 20 and 10 v 20; then fV (v) = 0:05 and we would
retain both positive and negative roots.
10. For the same drag equation, FD = CD V 2 ; V is standard normal N (0; 1):
Note that FD 0: Derive fFD and sketch both density functions.
Solution:
1 v2
fV (v) = p exp :
2 2
p
The roots are v = FD =CD ; and here, since V is governed by a Normal
density, it can be positive or negative and we retain both roots. Thus,
dv 1
= p
dFD 2 FD CD
" r ! r !#
1 FD FD
fFD (FD ) = p fV + fV
2 CD FD CD CD
1 FD
= p exp ; FD > 0:
2 CD FD 2CD

The density function fV (v) is shown in Figure 52.


For CD = 2:0; the density function fFD (FD ) is shown in Figure 53.
11. For the function Y = a tan X; a > 0; derive the general relation for fY (y):
Then, assume X is uniformly distributed over [ ; ] and …nd fY (y): Then
plot density functions for X and Y:

61
1.0
f(v)

0.5

-1.0 -0.8 -0.6 -0.4 -0.2 0.2 0.4 0.6 0.8 1.0
v
-0.5

-1.0

1 v2
Figure 52: Density Function fV (v) = p exp ; 1 0 1
2 2

Solution: The general transformation is found as follows:

xn = arctan (y=a) ; n = :::; 1; 0; 1; :::


a a2 + y 2
g 0 (x) = =
cos2 x a
X1
a
fY (y) = fX (xn ) :
a2 + y 2 n= 1

We have used the geometrical relation implied by the function y = a tan x:


That is, tan x = y=a and therefore,
p
cos x = a= a2 + y 2 :

For the range [ ; ] ; x = arctan(y=a); there is one root. Then,

a 1 a
fY (y) = = :
a2 + y2 2 2 (a2+ y2 )

See Figures 54 and 55.

12. For the function Z = XY; …nd fZ (z) for the cases:
1
(i) fXY (x; y) = [(b a)(d c)] ;a x b; c y d: Plot.
(ii) fXY (x; y) = C exp[ (x + y)]; a x b; c y d: Plot.
Solution: Using the general method, we de…ne a variable W;

W = X:

62
f(Fd) 0.30
0.25

0.20

0.15

0.10

0.05
0 1 2 3 4 5
Fd

1 FD
Figure 53: Density Function fFD (FD ) = p exp ; FD > 0
2 CD FD 2CD

Solving for X and Y ,

X = W = g1
Z
Y = = g2 :
W
The Jacobian is given by

@g1 =@z @g1 =@w


J =
@g2 =@z @g2 =@w
0 1 1
= = :
1=W Z=W 2 W

fXY (x; y) is de…ned on the rectangle de…ned by a < X < b and c < Y < d;
Since X = W; we know a < W < b: The range for Z can be derived from
that of Y: It is given that c < Y < d: Writing Y in terms of Z and W;
Z
c<Y <d!c< < d:
W
Solving for Z;
cW < Z < dW:
Z ranges between two lines: Z = aW and Z = dW: Therefore, fW Z (w; z)
is de…ned in a domain that resembles a quadrilateral, as shown in Figure
56 and 57.
In order to obtain the marginal density, the joint distribution fZ (z) needs
to be integrated over W: The range of W depends on Z: Assuming ad < cb

63
5
y
4

-1.4 -1.2 -1.0 -0.8 -0.6 -0.4 -0.2 0.2 0.4 0.6 0.8 1.0 1.2 1.4
-1 x
-2

-3

-4

-5

Figure 54: a tan X for a = 1

5
y
4

0
0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.10 0.11 0.12 0.13 0.14 0.15 0.16
-1 x
-2

-3

-4

-5

a
Figure 55: fY (y) = for a = 1
2 (a2+ y2 )

64
Y

X
a b

Figure 56: Original Domain

Z
bd

Z = dW

cb

da
Z = cW
ca
W
a b

Figure 57: Transformed Domain

65
as shown in Figure 57, W ranges on
Z
a<W <
, ca < Z < ad
c
Z Z
<W < , ad < Z < cb
d c
Z
< W < b, cb < Z < db;
d
and the marginal density is given by
Z z=c
1 z
fZ (z) = fXY w; dw, ca < Z < ad
a w w
Z z=c
1 z
= fXY w; dw, ad < Z < cb
z=d w w
Z b
1 z
= fXY w; dw, cb < Z < db:
z=d w w

(i) So for the case


1
fXY (x; y) = [(b a)(d c)] ;
a x b; c y d;
the marginal density is given by
Z z=c
1 1
fZ (z) = dw, ca < Z < ad
a w [(b a)(d c)]
Z z=c
1 1
= dw, ad < Z < cb
z=d w [(b a)(d c)]
Z b
1 1
= dw, cb < Z < db:
z=d w [(b a)(d c)]

For a = 2; b = 3; c = 4 and d = 5; the plot of the marginal density is


shown in Figure 58.
(ii) For the case
fXY (x; y) = C exp[ (x + y)];
a x b; c y d;

First …nd the value of C for a = 2; b = 3; c = 4 and d = 5 :

Z 1 Z 1
fXY (x; y) dxdy = 1
1 1
Z 5 Z 3
C exp[ (x + y)]dxdy = 1
4 2
C = 1009:6

66
0.25
f(z)
0.20

0.15

0.10

0.05

0.00
0 2 4 6 8 10 12 14 16
z

Figure 58: Marginal Density Function fZ (z)

The marginal density is given by


Z 1
1 z
fZ (z) = 1009:6 exp[ (w + )]dw, ca < Z < ad
0 w w
Z 1
1 z
= 1009:6 exp[ (w + )]dw, ad < Z < cb
z w w
Z 1
1 z
= 1009:6 exp[ (w + )]dw, cb < Z < db:
z w w
These equations need to be integrated numerically.
13. For the function Z = X + Y; …nd fZ (z) for the cases:
(i) fXY (x; y) = C exp[ (x + y)]; 0 x 1; 0 y 1: Plot.
(ii) fXY (x; y) is jointly uniform over the unit square, 0 x 1; 0 y
1: Plot.
Solution: Using the general method, we de…ne a variable W;
W = X:
Solving for X and Y ,
X = W = g1
Y =Z W = g2 :
The Jacobian is given by
@g1 =@z @g1 =@w
J =
@g2 =@z @g2 =@w
0 1
= = 1:
1 1

67
fXY (x; y) is de…ned on the rectangle de…ned by a < X < b and c < Y < d:
Since X = W; we know a < W < b: The range for Z can be derived from
that of Y: It is given that c < Y < d: Writing Y in terms of Z and W;

c<Y <d!c<Z W < d:

Solving for Z;
c + W < Z < d + W:
Z ranges between two lines: Z = c + W and Z = W + d: Therefore,
fW Z (w; z) is de…ned in a domain that resembles a parallelogram, as shown
in Figures 59 and 60.

(0,1)

X
(0,0) (1,0)

Figure 59: Original Domain

With 0 x 1; 0 y 1; the implication is that a = 0; b = 1; c = 0


and d = 1. In order to obtain the marginal density, the joint density
fZ (z) needs to be integrated over W: The range of W depends on Z: As
d + a = c + b in this case, W ranges on

0 < W < Z, 0<Z<1


Z 1 < W < 1, 1 < Z < 2;

and the marginal density is given by


Z z
fZ (z) = j 1j fXY (w; z w) dw, 0<Z<1
0
Z 1
= j 1j fXY (w; z w) dw, 1 < Z < 2:
z 1

68
Z

Z=1+W

Z=W
W
0 1

Figure 60: Transformed Domain

(i) For the …rst case,

fXY (x; y) = C exp[ (x + y)];


0 x 1;
0 y 1:

First …nd the value of C :

Z 1 Z 1
fXY (x; y) dx dy = 1
1 1
Z 1 Z 1
C exp[ (x + y)]dx dy = 1
0 0
C = 2:5026:

The density function can be written as


Z z
fZ (z) = j 1j 2:5026 exp[ (z w + w)]dw; 0<Z<1
0
Z 2
= j 1j 2:5026 exp[ (z w + w)]dw; 1 < Z < 2:
z 1

2:5026ze z if 0<Z<1
fZ (z) =
7:5078e z 2:5026ze z
if 1 < Z < 2:
The density function is plotted in Figure 61.

69
2.50
f(z)
2.25
2.00
1.75
1.50
1.25
1.00
0.75
0.50

0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0
z

Figure 61: Density Function fZ (z)

(ii) fXY (x; y) is jointly uniform over the unit square, 0 x 1; 0 y


1: Thus fXY (x; y) = 1:
Z z
fZ (z) = j 1j 1dw, 0<Z<1
0
Z 1
= j 1j 1dw, 1<Z<2
z 1

z, if 0 < Z < 1
fZ (z) =
2 z if 1 < Z < 2:
The plot of density function is shown in Figure 62

14. List the sequence of transformations needed to derive the general proba-
bility density function fY5 for the function
2
Y5 = X12 + X2 + X3 X4 ;

assuming that all fXi are known.


Solution: The following transformations are needed:

X1 ! X12
! X12 + X2
2
! X12 + X2
! X3 X4
2
! X12 + X2 + X3 X4 :

70
1.0
f(z)
0.8

0.6

0.4

0.2

0.0
0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0
z

Figure 62: Density Function fZ (z)

15. Derive the general probability density function fYi ; i = 1; : : : ; 5 leading


2
to Y5 = X12 + X2 + X3 X4 assuming that all fXi = 1; 0 xi 1:
Solution:

16. Suppose Y = a1 X1 + a2 X2 with X1 and X2 uniform with mean values


X1 = 2 and X2 = 3: Both probability density functions have magnitude
1=2:
(i) Calculate Y from the given information directly.
(ii) Calculate Y using only the respective probability density functions.
(iii) Use the method of transformation of RVs of Section 4.2 to derive fY
assuming the given probability density functions. Then calculate Y :
(iv) Compare all results and discuss.
Solution:
(i) For Y = a1 X1 + a2 X2 ; the mean value is straightforwardly given by

Y = a1 X1 + a2 X2
= 2a1 + 3a2 :

71
(ii) The expected value of Y can be calculated as follows,
EfY g = a1 EfX1 g + a2 EfX2 g
Z 1 Z 1
Y = a1 x1 f (x1 )dx1 + a2 x2 f (x2 )dx2
1 1
Z 3 Z 4
1 1
= a1 x1 dx1 + a2 x2 dx2
1 2 2 2
3 4
x2 x2
= a1 1 + a2 2 dx2
4 1 4 2
= 2a1 + 3a2 :

(iii) (iv) In general, there are four general cases to be considered. They
are when
1. a1 a2 > 0 and a1 > a2
2. a1 a2 > 0 and a1 < a2
3. a1 a2 < 0 and a1 > a2
4. a1 a2 < 0 and a1 < a2 :
Here, let us consider the case where a1 and a2 are of the same sign. In
addition, let us assume that a1 > a2 : Then,
Z Z
1
FY (y) = d~
x1 d~
x2 :
a1 x
~1 +a~
x2 <z 4
Note that y ranges from a1 + 2a2 and 3a1 + 4a2 : Figure 63 shows the
domain of integration, and there are two discontinuity at y = a1 + 4a2 and
3a1 + 2a2 . Then, for a1 + 2a2 < y < a1 + 4a2
Z y a1 Z y a2 x
~2
a2 a1 1
FY (y) = d~
x1 d~
x2
2 1 4
1 y a1 y 2a2
= :
8 a2 a1
For a1 + 4a2 < y < 3a1 + 2a2
Z 4 Z y a2 x
~2
1 a1
FY (y) = d~
x1 d~
x2
2 1 4
1 (y 4a2 ) 1 (y 2a1 ) 1
= + :
4 a1 4 a2 2
For 3a1 + 2a2 < y < 3a1 + 4a2
Z 4 Z 3
1
FY (y) = 1 d~
x1 d~
x2
y 3a1
a2
y a2 x
a1
~2 4
1 (y 4a2 ) (y 3a1 )
= 1 3 4 :
8 a1 a2

72
x2 y - a 2 x2
x= a1
y = 3a1 + 2a2
y = a 1 + 2a 2

y = 3a1 + 4a 2
y = a 1 + 4a2
x1
1 3

Figure 63: Domain of integration

Taking derivatives,
1 y a1 2a2
fY (y) = for a1 + 2a2 < y < a1 + 4a2
4 a1 a2
1
= for a1 + 4a2 < y < 3a1 + 2a2
2a1
1 4a2 + y 3a1
= for 3a1 + 2a2 < y < 3a1 + 4a2 :
4 a1 a2
The expectation is given by
Z 3a1 +4a2
Y = yfY (y) dy
a1 +2a2
Z a1 +4a2 Z 3a1 +2a2
1y a1 2a2 1
= y dy + y dy
a1 +2a2 4 a1 a2 a1 +4a2 2a1
Z 3a1 +4a2
1 4a2 + y 3a1
+ y dy
3a1 +2a2 4 a1 a2
= 2a1 + 3a2 :
The same procedure can be used for the other three cases to show that
the expectation is always 2a1 + 3a2 :
17. Reconsider Example 4.8, supposing that the angles are random variables.
The 30 angle now is a random variable with mean of 30 and variance
of 3 and the 45 angle now is a random variable with mean of 45 and
variance of 4 : The applied force has the same statistics as in the example.
Calculate the mean and variance of the tensions.

73
Solution:
18. Derive Equation 4.26.
Solution:
19. Find the general expression for the …rst order approximation for and
for the following:
(i)
PL
= ;
AE
with all variables uncorrelated and
P = 1000 P = 10 L = 35 L = 15
A = 0:1 A = 0:01 E = 10 106 E = 0:01 106 :

(ii) solve (i) except that LA = 0:5 and all other correlations zero.
(iii)
V = L3 + ar3 ;

where and a are constants and

L = 100 L =5 r = 40 r = 2:

(iv) solve (iii) for the cases: Lr = 1; 1; 0: Discuss.


Solution :
(i)
PL
= g(P; L; A; E) = :
AE
The approximate mean is given by
' g( P; L; A; E )
1 @2g 2 @2g @2g 2
2 @2g 2
+ 2 P
+ L +
A+
@P 2 2 @L @A2 @E 2 E
2
@ g @2g @2g
+2 PL P L+2 PA P A + 2 PE P E
@P @L @P @A @P @E
@2g @2g @2g
+2 LA L A+2 L E + 2 AE A E ;
@L@A @L@E LE @A@E

P L 1 P L 2 P L 2
' + 0+0+2 3 A +2 3 E
A E 2 A E A E
1 L L
+2 PL P L 2 2 PA P A 2 2 PE P E
A E A E A E

P P P L
2 2 LA L A 2 2 LE L E +2 2 2 AE A E ;
A E A E A E

74
and variance is
2 2 2 2
@g 2 @g @g 2 2 @g 2
V arfY g ' P + L + E + A
@P @L @E @A
@g @g @g @g
+2 PL P L+2 P E
@P @L @P @E P E
@g @g @g @g
+2 PA P A+2 L E
@P @A @L @E LE
@g @g @g @g
+2 LA L A+2 E A:
@L @A @E @A EA

2 2 2 2
L 2 P 2 L P 2 L P 2
V arf g ' P + L + 2 A + 2 E
A E A E A E A E
2 2
L P L P L P
+2 2 2 PL P L 2 3 2 PA P A 2 2 3 PE P E
A E A E A E
2 2 2 2
L P L P L P
2 3 2 LA L A 2 2 3 LE L E + 2 3 3 AE A E :
A E A E A E

The …rst term approximation of the mean is

' g( P; L; A; E)
P L
=
A E
1000(35)
= = 0:035:
0:1(10 106 )

As all the variables are uncorrelated, the variance is approximately given


by
2 2 2 2
L 2 P 2 L P 2 L P 2
V arf g ' P + L + 2 A + 2 E
A E A E A E A E
2 2
35 1000
= (10)2 + (15)2
0:1 (10 106 ) 0:1 (10 106 )
2 2
1000(35) 1000(35)
+ (0:01)2 + (0:01 106 )2
(0:1)2 (10 106 ) 0:1 (10 106 )2
4
= 2:3737 10
2
= 1:5407 10 :

(ii) When LA = 0:5 and all other correlations zero, the …rst approxima-

75
tion of the mean remains the same whereas the variance is given by
2 2 2 2
L 2 P 2 L P 2 L P 2
V arf g = P + L + 2 A + 2 E
A E A E A E A E
2
L P
2 3 2 LA L A
A E

4 35 10002
= 2:3737 10 2 (0:5) (15) (0:01)
(0:1)3 (10 106 )2
4
= 1:8487 10
2
= 1:3597 10 :

(iii) Given:
V = L3 + ar3 = g(L; r):
The approximate mean is given by

@2g 1 2 @2g 2 @2g


v = g(L; r) + L + r +2 Lr L r
@L2 2 @r2 @L@r
3 3 1 2 2
= L+a r + 6 L L + 6a r r :
2
The …rst order approximation is
3 3
v = L +a r;

and the variance is given by


2 2
@g 2 @g 2 @g @g
V arfY g ' L + r +2 Lr L r
@L @r @L @r
2 2 2 2 2 2 2 2
= 3 L L + 3a r r +2 3 L 3a r Lr L r :

(iv) The …rst order approximation of the mean is


3 3
v = L +a r
= (100)3 + a(40)3
= 3:2056 106 for a = 1;

and the variance for a = 1 and Lr = 1; 1 and 0 are


2 2 2 2 2 2 2 2
V arfY g =1 = 3 L L + 3a r r +2 3 L 3a r Lr L r
Lr

2 2 2 2
= 3 (100) (5)2 + 3 (40) (2)2
+2 3 (100)2 3 (40)2 (1) (5) (2)
11
= 2:3121 10 ;

76
2 2
V arfY g = 1 = 3 (100)2 (5)2 + 3 (40)2 (2)2
Lr

+2 3 (100)2 3 (40)2 ( 1) (5) (2)


11
= 2:1311 10 ;

2 2
V arfY g =0 = 3 (100)2 (5)2 + 3 (40)2 (2)2
Lr

= 2:2216 1011 :

The standard deviations are then

= 4:8084 105 for Lr =1


= 4:6164 105 for Lr = 1
5
= 4:7134 10 for Lr = 0:

The correlation between L and r has very little e¤ect on the variance and
standard deviation of the system.
20. Reconsider the projectile Example 4.14, except assume that the speed and
angle are correlated with V0 a = 0:5: Compare the results with those of
the uncorrelated case. Draw any conclusions you can.
Solution: Recall
2
R = sin 2
g
= 30 =
6
= 0:10
=) = = (0:10)
6
= 300 m/s
= 35 m/s:

For the general case of Y = g(X1 ; X2 ) where in the Taylor expansion


terms to second-derivative are retained, we have

1 @2g @2g 1 @2g


E(Y ) = g X1 ; X2 + 2 V arX1 + 12 X1 X2 + V arX2
2 @X1 @X1 @X2 2 @X22
2 2
@g @g @g @g
V arY = V arX1 + 2 12 X1 X2 + V arX2 ;
@X1 @X1 @X2 @X2

where all derivatives are evaluated at the respective mean values. There-

77
fore,
2
12 2 4
E(R) = sin 2 + sin 2 + cos 2
g 2g g
2
1 2
+ 4 sin 2
2 g
3002 1 2 2
= sin(2 )+ sin 2 (35)
9:8 6 2 9:8 6
4 300
+ cos 2 0:5 (0:10) 35
9:8 6 6
1 3002 2
+ 4 sin(2 ) (0:10)
2 9:8 6 6
= 7953:3 + 108:25 + 56:100 43:609
= 8074:0:

In this case, the percent di¤erence is


8074:0 7953:3
%= 100 = 1:4949%:
8074:0
The variance is given by
2 2
2 2 2
V arR = sin 2 +2 sin 2 2 cos 2
g g g
2 2
2
+ 2 cos 2
g
2
2 300
= sin(2 ) 352
9:8 6
2 300 2 3002
+2 sin(2 ) cos(2 ) 0:5 (0:10) 35
9:8 6 9:8 6 6
2
2 3002 2
+ cos(2 ) (0:10)
9:8 6 6
= 3:4439 106 + 8:9236 105 + 2:3122 105
= 4:5675 106
p
R = 4:5675 106 = 2137:2
p
4:5675 106
R1 = = 0:26470
p 8074:0
4:5675 106
R2 = = 0:26872:
7953:3

21. Obtain the mean and variance of Y as expanded in the Taylor series Equa-
tion 4.27.
Solution:

78
Table 1: Random Numbers between 0 and 1
pi
0:969
0:674
0:298
0:952
0:083
0:095
0:959
0:601
0:329
0:326

22. Recalculate the numerical results of Example 4.11 for the following values
of bh = 0; 0:2; 0:7; 1:0: Compare and discuss the results.
Solution:
23. Using a calculator or chart, generate 10 random numbers between 0 and
1.
Solution: Ten random numbers between 0 and 1 can be obtained by a
calculator. A sample is shown in Table 1

24. Suppose f = 1=(b a) where a = 2 and b = 4: Use the results of the


previous problem to specify 5 random numbers.
Solution: We use xi = a + (b a)pi or xi = 2 + 2pi :
pi xi
0:969 2+2 0:969 = 3:938
0:674 2+2 0:674 = 3:348
0:298 2+2 0:298 = 2:596
0:952 2+2 0:952 = 3:904
0:083 2+2 0:083 = 2:166
25. For the cantilever beam of Figure 4.18, with new parameter values R = 30
lb and W is a uniform random variable with W = 100 lb/ft with coe¢ -
cient of variation W = 0:10; estimate the mean and standard deviation
of the shear V and bending moment M:
Solution: From Example 4.16, the length of the beam is 25 ft. The shear

79
and moment at the …xed end are, respectively,

V =R WL
= 30 25W lb;
L
M= RL + W L
2
= 750 + 312:5W lb-ft:

The shear and moment are functions of W; which is a random variable.


Using the given W and W we can …nd

W = W W
= 100 0:10 = 10:

The upper and lower bounds of the uniform density are found using
a+b
W = = 100
2
2 1
W = (b a)2 = 100:
12

Solving we …nd b = 117 and a = 83: We can utilize the table of random
uniform numbers to generate realizations of W by using the relation

Wi = a + (b a)pi :

For each realization Wi ; calculate Vi and Mi using the following transfor-


mations:

Vi = 30 25Wi
Mi = 750 + 312:5Wi .

Realizations of the shear and moment for 10 values are shown in Table 2.
These mean and the variance values can be averaged using
1X
n

X = xi
n i=1
v
u n
uX (xi X)
2
X = t ;
i=1
n 1

to estimate their respective means and standard deviations, shown in Table


3. Note that the coe¢ cient of variation is shown as a negative number
because the mean value is a negative number. However, the negative is
super‡uous and need not be retained. Also note that to calculate the
standard deviation it is possible to evaluate the mean square value minus
the mean value squared.

80
Table 2: Sample Realizations of V and M
pi Wi Vi = 30 25Wi Mi = 750 + (312:5)Wi
0:42742 97:53 2408:31 29728:84
0:25981 91:83 2265:84 27947:98
0:95105 115:3 2853:40 35292:41
0:28134 92:57 2284:14 28176:74
0:13554 87:61 2160:21 26627:61
0:32111 93:92 2317:94 28599:29
0:31008 93:54 2308:57 28482:1
0:14649 87:98 2169:52 26743:96
0:79250 109:95 2718:63 33607:81
0:99164 116:72 2887:89 35723:68

Table 3: Sample Statistics for V and M


V (lb) M (lb-ft)
2437:44 30093:04
276:55 3456:86
0:1134 0:1148

26. For the cantilever beam of Figure 4.18, both parameters R and L are
random variables. L is Gaussian with L = 25 ft and L = 0:1 ft; R is a
uniform random variable between the values 9; 800 10; 200 lb. Estimate
the mean and standard deviation of the shear V and bending moment M:
Solution: From Example 4.16, W is 2500 lb. The shear and moment at
the …xed end are, respectively,
V =R WL
=R 2500L lb;
L
M= RL + W L
2
= RL + 1250L2 lb-ft:
The shear and moment are functions of R and L both of which are random
variables. R is a uniform random variable with lower limit a = 9; 800 lb
and the upper limit b = 10; 200 lb. L is a Gaussian with mean L = 25 ft
and standard deviation L = 0:1 ft.
First, we can use Table of random uniform numbers to generate realiza-
tions of R by using the relation Ri = a + (b a)pi : Ten values of Ri are
shown in Table 4.
Next the realizations of L can be obtained in by one of the two following
methods:

81
Table 4: Sample Realizations of R
pi Ri
0:42742 9470:8
0:25981 8803:1
0:95105 11557
0:28134 8888:9
0:13554 8308:0
0:32111 9047:3
0:31008 9003:4
0:14649 8351:6
0:79250 10925
0:99164 11719

Table 5: Sample Realizations of L


pi si Li = Li + Li si
0:32111 0:67 24:933
0:31008 0:65 24:935
0:14649 1:11 24:889
0:7925 0:73 25:073
0:99164 2:11 25:211
0:62948 3:01 25:301
0:55292 0:11 25:011
0:8825 1:11 25:111
0:70974 0:44 25:044
0:12102 1:21 24:879

Method 1: Using random numbers from the Standard Uniform Table


4.2.
Each value of pi is used as the entry point into the standard normal table
to …nd the corresponding approximate value of si . Once si is found, the
realizations of L can be obtained by using the relation Li = Li + Li si .
The values are tabulated in Table 5.
Once both Ri and Li are found, the realizations of mean and variance
are found using

Vi = Ri 2500Li lb;
Mi = Ri Li + 1250L2i lb-ft:

These are given in the Table 6.

82
Table 6: Sample Realizations of V and M
Ri Li Vi = Ri 2500Li Mi = Ri Li + 1250L2i
9470:8 24:933 52861:7 540932:65
8803:1 24:935 53534:4 557687:48
11557 24:889 50665:5 486685:73
8888:9 25:073 53793:6 562947:77
8308:0 25:211 54719:5 585040:16
9047:3 25:301 54205:2 571270:01
9003:4 25:011 53524:1 556753:61
8351:6 25:111 54425:9 578485:87
10925 25:044 51685 510396:72
11719 24:879 50478:5 482148:80

Table 7: Sample Statistics for V and M


V (lb) M (lb-ft)
52989:34 543234:88
1534:32 37371:22
0:029 0:0688

These mean and the variance values can be averaged using


1X
n

x = xi
n i=1
v
u n
uX (xi x)
2
x = t ;
i=1
n 1

to estimate their respective means and standard deviations, shown in Table


7.

Method 2: Use the standard normal random numbers (Table 4.6).


Pick 10 random numbers from Table 4.6. These are the standard normal
variables si . Once si is found, the realizations of L can be obtained by
using the relation
Li = Li + Li si :
The values are tabulated in Table 8.
Then the standard procedure is followed. The realizations of mean and
variance are found using

Vi = Ri 2500Li lb;
Mi = Ri Li + 1250L2i lb-ft:

These are given in the Table 9

83
Table 8: Sample Realizations of L
si Li = Li + Li si
0:58885 25:06
1:3286 24:87
4:1952 10 2 24:1
0:46021 24:95
0:48187 24:95
1:5813 25:16
0:77828 25:08
0:52954 25:05
0:50652 24:95
0:23290 24:98

Table 9: Sample Realizations of V and M

Ri Li Vi = Ri 2500Li Mi = Ri Li + 1250L2i
9470:8 25:06 53176:41 547606:96
8803:1 24:87 53364:75 554060:39
11557 24:1 50932:51 492111:31
8888:9 24:95 53496:05 556562:91
8308:0 24:95 54071:53 570941:55
9047:3 25:16 53848:03 563551:23
9003:4 25:08 53691:17 560336:10
8351:6 25:05 54280:79 575330:88
10925 24:95 51448:37 505515:83
11719 24:98 50722:78 487092:99:

Table 10: Sample Statistics for V and M


V (lb) M (lb-ft)
52903:24 541311:02
1340:39 33280:30
0:0253 0:0615

84
The respective means and standard deviations are listed in Table 10.
27. Draw the density function Equation 4.38. Generate an additional three
values of xi :
Solution:

85

You might also like