# Connexions

You are here: Home » Content » Problems on Mathematical Expectation

### Lenses

What is a lens?

#### Definition of a lens

##### Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

##### What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

##### Who can create a lens?

Any individual member, a community, or a respected organization.

##### What are tags?

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

#### Affiliated with (What does "Affiliated with" mean?)

This content is either by members of the organizations listed or about topics related to the organizations listed. Click each link to see a list of all content affiliated with the organization.
• Rice Digital Scholarship

This module is included in aLens by: Digital Scholarship at Rice UniversityAs a part of collection: "Applied Probability"

Click the "Rice Digital Scholarship" link to see all content affiliated with them.

#### Also in these lenses

• UniqU content

This module is included inLens: UniqU's lens
By: UniqU, LLCAs a part of collection: "Applied Probability"

Click the "UniqU content" link to see all content selected in this lens.

### Recently Viewed

This feature requires Javascript to be enabled.

# Problems on Mathematical Expectation

Module by: Paul E Pfeiffer. E-mail the author

## Exercise 1

(See Exercise 1 from "Problems on Distribution and Density Functions", m-file npr07_01.m). The class {Cj:1j10}{Cj:1j10} is a partition. Random variable X has values {1,3,2,3,4,2,1,3,5,2}{1,3,2,3,4,2,1,3,5,2} on C1 through C10, respectively, with probabilities 0.08, 0.13, 0.06, 0.09, 0.14, 0.11, 0.12, 0.07, 0.11, 0.09. Determine E[X]E[X].

### Solution

% file npr07_01.m
% Data for Exercise 1 from "Problems on Distribution and Density Functions"
T  = [1 3 2 3 4 2 1 3 5 2];
pc = 0.01*[ 8 13  6  9 14 11 12  7 11  9];
disp('Data are in T and pc')
npr07_01
Data are in T and pc
EX = T*pc'
EX =  2.7000
[X,PX] = csort(T,pc);  % Alternate using X, PX
ex = X*PX'
ex =  2.7000


## Exercise 2

(See Exercise 2 from "Problems on Distribution and Density Functions", m-file npr07_02.m ). A store has eight items for sale. The prices are $3.50,$5.00, $3.50,$7.50, $5.00,$5.00, $3.50, and$7.50, respectively. A customer comes in. She purchases one of the items with probabilities 0.10, 0.15, 0.15, 0.20, 0.10 0.05, 0.10 0.15. The random variable expressing the amount of her purchase may be written

X = 3 . 5 I C 1 + 5 . 0 I C 2 + 3 . 5 I C 3 + 7 . 5 I C 4 + 5 . 0 I C 5 + 5 . 0 I C 6 + 3 . 5 I C 7 + 7 . 5 I C 8 X = 3 . 5 I C 1 + 5 . 0 I C 2 + 3 . 5 I C 3 + 7 . 5 I C 4 + 5 . 0 I C 5 + 5 . 0 I C 6 + 3 . 5 I C 7 + 7 . 5 I C 8
(1)

Determine the expection E[X]E[X] of the value of her purchase.

### Solution

% file npr07_02.m
% Data for Exercise 2 from "Problems on Distribution and Density Functions"
T = [3.5 5.0 3.5 7.5 5.0 5.0 3.5 7.5];
pc = 0.01*[10 15 15 20 10  5 10 15];
disp('Data are in T, pc')
npr07_02
Data are in T, pc
EX = T*pc'
EX =  5.3500
[X,PX] = csort(T,pc);
ex = X*PX'
ex =  5.3500


## Exercise 3

(See Exercise 12 from "Problems on Random Variables and Probabilities", and Exercise 3 from "Problems on Distribution and Density Functions," m-file npr06_12.m). The class {A,B,C,D}{A,B,C,D} has minterm probabilities

p m = 0 . 001 * [ 5 7 6 8 9 14 22 33 21 32 50 75 86 129 201 302 ] p m = 0 . 001 * [ 5 7 6 8 9 14 22 33 21 32 50 75 86 129 201 302 ]
(2)

Determine the mathematical expection for the random variable X=IA+IB+IC+IDX=IA+IB+IC+ID, which counts the number of the events which occur on a trial.

### Solution

% file npr06_12.m
% Data for Exercise 12 from "Problems on Random Variables and Probabilities"
pm = 0.001*[5 7 6 8 9 14 22 33 21 32 50 75 86 129 201 302];
c = [1 1 1 1 0];
disp('Minterm probabilities in pm, coefficients in c')
npr06_12
Minterm probabilities in pm, coefficients in c
canonic
Enter row vector of coefficients  c
Enter row vector of minterm probabilities  pm
Use row matrices X and PX for calculations
Call for XDBN to view the distribution
EX = X*PX'
EX =  2.9890
T = sum(mintable(4));
[x,px] = csort(T,pm);
ex = x*px
ex =  2.9890


## Exercise 4

(See Exercise 5 from "Problems on Distribution and Density Functions"). In a thunderstorm in a national park there are 127 lightning strikes. Experience shows that the probability of of a lightning strike starting a fire is about 0.0083. Determine the expected number of fires.

### Solution

XX binomial (127, 0.0083). E[X]=127·0.0083=1.0541E[X]=127·0.0083=1.0541

## Exercise 5

(See Exercise 8 from "Problems on Distribution and Density Functions"). Two coins are flipped twenty times. Let X be the number of matches (both heads or both tails). Determine E[X]E[X].

### Solution

XX binomial (20, 1/2). E[X]=20·0.5=10E[X]=20·0.5=10.

## Exercise 6

(See Exercise 12 from "Problems on Distribution and Density Functions"). A residential College plans to raise money by selling “chances” on a board. Fifty chances are sold. A player pays $10 to play; he or she wins$30 with probability p=0.2p=0.2. The profit to the College is

X = 50 · 10 - 30 N , where N is the number of winners X = 50 · 10 - 30 N , where N is the number of winners
(3)

Determine the expected profit E[X]E[X].

### Solution

NN binomial (50, 0.2). E[N]=50·0.2=10E[N]=50·0.2=10. E[X]=500-30E[N]=200E[X]=500-30E[N]=200.

## Exercise 7

(See Exercise 19 from "Problems on Distribution and Density Functions"). The number of noise pulses arriving on a power circuit in an hour is a random quantity having Poisson (7) distribution. What is the expected number of pulses in an hour?

### Solution

XX Poisson (7). E[X]=7E[X]=7.

## Exercise 8

(See Exercise 24 and Exercise 25 from "Problems on Distribution and Density Functions"). The total operating time for the units in Exercise 24 is a random variable TT gamma (20, 0.0002). What is the expected operating time?

### Solution

XX gamma (20, 0.0002). E[X]=20/0.0002=100,000E[X]=20/0.0002=100,000.

## Exercise 9

(See Exercise 41 from "Problems on Distribution and Density Functions"). Random variable X has density function

f X ( t ) = ( 6 / 5 ) t 2 for 0 t 1 ( 6 / 5 ) ( 2 - t ) for 1 < t 2 = I [ 0 , 1 ] ( t ) 6 5 t 2 + I ( 1 , 2 ] ( t ) 6 5 ( 2 - t ) f X ( t ) = ( 6 / 5 ) t 2 for 0 t 1 ( 6 / 5 ) ( 2 - t ) for 1 < t 2 = I [ 0 , 1 ] ( t ) 6 5 t 2 + I ( 1 , 2 ] ( t ) 6 5 ( 2 - t )
(4)

What is the expected value E[X]E[X]?

### Solution

E [ X ] = t f X ( t ) d t = 6 5 0 1 t 3 d t + 6 5 1 2 ( 2 t - t 2 ) d t = 11 10 E [ X ] = t f X ( t ) d t = 6 5 0 1 t 3 d t + 6 5 1 2 ( 2 t - t 2 ) d t = 11 10
(5)

## Exercise 10

Truncated exponential. Suppose XX exponential (λ)(λ) and Y=I[0,a](X)X+I(a,)(X)aY=I[0,a](X)X+I(a,)(X)a.

1. Use the fact that
0te-λtdt=1λ2andate-λtdt=1λ2e-λa(1+λa)0te-λtdt=1λ2andate-λtdt=1λ2e-λa(1+λa)
(6)
to determine an expression for E[Y]E[Y].
2. Use the approximation method, with λ=1/50,a=30λ=1/50,a=30. Approximate the exponential at 10,000 points for 0t10000t1000. Compare the approximate result with the theoretical result of part (a).

### Solution

E [ Y ] = g ( t ) f X ( t ) d t = 0 a t λ e - λ t d t + a P ( X > a ) = E [ Y ] = g ( t ) f X ( t ) d t = 0 a t λ e - λ t d t + a P ( X > a ) =
(7)
λ λ 2 [ 1 - e - λ a ( 1 + λ a ) ] + a e - λ a = 1 λ ( 1 - e - λ a ) λ λ 2 [ 1 - e - λ a ( 1 + λ a ) ] + a e - λ a = 1 λ ( 1 - e - λ a )
(8)
tappr
Enter matrix [a b] of x-range endpoints  [0 1000]
Enter number of x approximation points  10000
Enter density as a function of t  (1/50)*exp(-t/50)
Use row matrices X and PX as in the simple case
G = X.*(X<=30) + 30*(X>30);
EZ = G8PX'
EZ = 22.5594
ez = 50*(1 - exp(-30/50))    % Theoretical value
ez = 22.5594


## Exercise 11

(See Exercise 1 from "Problems On Random Vectors and Joint Distributions", m-file npr08_01.m). Two cards are selected at random, without replacement, from a standard deck. Let X be the number of aces and Y be the number of spades. Under the usual assumptions, determine the joint distribution. Determine E[X]E[X], E[Y]E[Y], E[X2]E[X2], E[Y2]E[Y2], and E[XY]E[XY].

### Solution

npr08_01
Data in Pn, P, X, Y
jcalc
Enter JOINT PROBABILITIES (as on the plane)  P
Enter row matrix of VALUES of X  X
Enter row matrix of VALUES of Y  Y
Use array operations on matrices X, Y, PX, PY, t, u, and P
EX = X*PX'
EX =  0.1538

ex = total(t.*P)             % Alternate
ex =  0.1538
EY = Y*PY'
EY =  0.5000
EX2 = (X.^2)*PX'
EX2 =  0.1629
EY2 = (Y.^2)*PY'
EY2 =  0.6176
EXY = total(t.*u.*P)
EXY =  0.0769


## Exercise 12

(See Exercise 2 from "Problems On Random Vectors and Joint Distributions", m-file npr08_02.m ). Two positions for campus jobs are open. Two sophomores, three juniors, and three seniors apply. It is decided to select two at random (each possible pair equally likely). Let X be the number of sophomores and Y be the number of juniors who are selected. Determine the joint distribution for {X,Y}{X,Y} and E[X]E[X], E[Y]E[Y], E[X2]E[X2], E[Y2]E[Y2], and E[XY]E[XY].

### Solution

npr08_02
Data are in X, Y,Pn, P
jcalc
- - - - - - - - - - - -
EX = X*PX'
EX =  0.5000
EY = Y*PY'
EY =  0.7500
EX2 = (X.^2)*PX'
EX2 = 0.5714
EY2 = (Y.^2)*PY'
EY2 = 0.9643
EXY = total(t.*u.*P)
EXY = 0.2143


## Exercise 13

(See Exercise 3 from "Problems On Random Vectors and Joint Distributions", m-file npr08_03.m ). A die is rolled. Let X be the number of spots that turn up. A coin is flipped X times. Let Y be the number of heads that turn up. Determine the joint distribution for the pair {X,Y}{X,Y}. Assume P(X=k)=1/6P(X=k)=1/6 for 1k61k6 and for each k, P(Y=j|X=k)P(Y=j|X=k) has the binomial (k,1/2)(k,1/2) distribution. Arrange the joint matrix as on the plane, with values of Y increasing upward. Determine the expected value E[Y]E[Y].

### Solution

npr08_03
Answers are in X, Y, P, PY
jcalc
- - - - - - - - - - - -
EX = X*PX'
EX =   3.5000
EY = Y*PY'
EY =   1.7500
EX2 = (X.^2)*PX'
EX2 = 15.1667
EY2 = (Y.^2)*PY'
EY2 =  4.6667
EXY = total(t.*u.*P)
EXY =  7.5833


## Exercise 14

(See Exercise 4 from "Problems On Random Vectors and Joint Distributions", m-file npr08_04.m ). As a variation of Exercise 13, suppose a pair of dice is rolled instead of a single die. Determine the joint distribution for {X,Y}{X,Y} and determine E[Y]E[Y].

### Solution

npr08_04
Answers are in X, Y, P
jcalc
- - - - - - - - - - - -
EX = X*PX'
EX =   7
EY = Y*PY'
EY =   3.5000
EX2 = (X.^2)*PX'
EX2 = 54.8333
EY2 = (Y.^2)*PY'
EY2 =  15.4583


## Exercise 15

(See Exercise 5 from "Problems On Random Vectors and Joint Distributions", m-file npr08_05.m). Suppose a pair of dice is rolled. Let X be the total number of spots which turn up. Roll the pair an additional X times. Let Y be the number of sevens that are thrown on the X rolls. Determine the joint distribution for {X,Y}{X,Y} and determine E[Y]E[Y].

### Solution

npr08_05
Answers are in X, Y, P, PY
jcalc
- - - - - - - - - - - -
EX = X*PX'
EX =  7.0000
EY = Y*PY'
EY =  1.1667


## Exercise 16

(See Exercise 6 from "Problems On Random Vectors and Joint Distributions", m-file npr08_06.m). The pair {X,Y}{X,Y} has the joint distribution:

X = [ - 2 . 3 - 0 . 7 1 . 1 3 . 9 5 . 1 ] Y = [ 1 . 3 2 . 5 4 . 1 5 . 3 ] X = [ - 2 . 3 - 0 . 7 1 . 1 3 . 9 5 . 1 ] Y = [ 1 . 3 2 . 5 4 . 1 5 . 3 ]
(9)
P = 0 . 0483 0 . 0357 0 . 0420 0 . 0399 0 . 0441 0 . 0437 0 . 0323 0 . 0380 0 . 0361 0 . 0399 0 . 0713 0 . 0527 0 . 0620 0 . 0609 0 . 0551 0 . 0667 0 . 0493 0 . 0580 0 . 0651 0 . 0589 P = 0 . 0483 0 . 0357 0 . 0420 0 . 0399 0 . 0441 0 . 0437 0 . 0323 0 . 0380 0 . 0361 0 . 0399 0 . 0713 0 . 0527 0 . 0620 0 . 0609 0 . 0551 0 . 0667 0 . 0493 0 . 0580 0 . 0651 0 . 0589
(10)

Determine E[X]E[X], E[Y]E[Y], E[X2]E[X2], E[Y2]E[Y2], and E[XY]E[XY].

### Solution

npr08_06
Data are in X, Y, P
jcalc
- - - - - - - - - - - -
EX = X*PX'
EX =   1.3696
EY = Y*PY'
EY =   3.0344
EX2 = (X.^2)*PX'
EX2 =  9.7644
EY2 = (Y.^2)*PY'
EY2 = 11.4839
EXY = total(t.*u.*P)
EXY =  4.1423


## Exercise 17

(See Exercise 7 from "Problems On Random Vectors and Joint Distributions", m-file npr08_07.m). The pair {X,Y}{X,Y} has the joint distribution:

P ( X = t , Y = u ) P ( X = t , Y = u )
(11)
 t = -3.1 -0.5 1.2 2.4 3.7 4.9 u = 7.5 0.009 0.0396 0.0594 0.0216 0.044 0.0203 4.1 0.0495 0 0.1089 0.0528 0.0363 0.0231 -2.0 0.0405 0.132 0.0891 0.0324 0.0297 0.0189 -3.8 0.051 0.0484 0.0726 0.0132 0 0.0077

Determine E[X]E[X], E[Y]E[Y], E[X2]E[X2], E[Y2]E[Y2], and E[XY]E[XY].

### Solution

npr08_07
Data are in X, Y, P
jcalc
- - - - - - - - - - - -
EX = X*PX'
EX =   0.8590
EY = Y*PY'
EY =   1.1455
EX2 = (X.^2)*PX'
EX2 =  5.8495
EY2 = (Y.^2)*PY'
EY2 = 19.6115
EXY = total(t.*u.*P)
EXY =  3.6803


## Exercise 18

(See Exercise 8 from "Problems On Random Vectors and Joint Distributions", m-file npr08_08.m). The pair {X,Y}{X,Y} has the joint distribution:

P ( X = t , Y = u ) P ( X = t , Y = u )
(12)
 t = 1 3 5 7 9 11 13 15 17 19 u = 12 0.0156 0.0191 0.0081 0.0035 0.0091 0.007 0.0098 0.0056 0.0091 0.0049 10 0.0064 0.0204 0.0108 0.004 0.0054 0.008 0.0112 0.0064 0.0104 0.0056 9 0.0196 0.0256 0.0126 0.006 0.0156 0.012 0.0168 0.0096 0.0056 0.0084 5 0.0112 0.0182 0.0108 0.007 0.0182 0.014 0.0196 0.0012 0.0182 0.0038 3 0.006 0.026 0.0162 0.005 0.016 0.02 0.028 0.006 0.016 0.004 -1 0.0096 0.0056 0.0072 0.006 0.0256 0.012 0.0268 0.0096 0.0256 0.0084 -3 0.0044 0.0134 0.018 0.014 0.0234 0.018 0.0252 0.0244 0.0234 0.0126 -5 0.0072 0.0017 0.0063 0.0045 0.0167 0.009 0.0026 0.0172 0.0217 0.0223

Determine E[X]E[X], E[Y]E[Y], E[X2]E[X2], E[Y2]E[Y2], and E[XY]E[XY].

### Solution

npr08_08
Data are in X, Y, P
jcalc
- - - - - - - - - - - - -
EX = X*PX'
EX =   10.1000
EY = Y*PY'
EY =    3.0016
EX2 = (X.^2)*PX'
EX2 = 133.0800
EY2 = (Y.^2)*PY'
EY2 =  41.5564
EXY = total(t.*u.*P)
EXY =  22.2890


## Exercise 19

(See Exercise 9 from "Problems On Random Vectors and Joint Distributions", m-file npr08_09.m). Data were kept on the effect of training time on the time to perform a job on a production line. X is the amount of training, in hours, and Y is the time to perform the task, in minutes. The data are as follows:

P ( X = t , Y = u ) P ( X = t , Y = u )
(13)
 t = 1 1.5 2 2.5 3 u = 5 0.039 0.011 0.005 0.001 0.001 4 0.065 0.07 0.05 0.015 0.01 3 0.031 0.061 0.137 0.051 0.033 2 0.012 0.049 0.163 0.058 0.039 1 0.003 0.009 0.045 0.025 0.017

Determine E[X]E[X], E[Y]E[Y], E[X2]E[X2], E[Y2]E[Y2], and E[XY]E[XY].

### Solution

npr08_09
Data are in X, Y, P
jcalc
- - - - - - - - - - - -
EX = X*PX'
EX =   1.9250
EY = Y*PY'
EY =   2.8050
EX2 = (X.^2)*PX'
EX2 =  4.0375
EY2 = (Y.^2)*PY'       EXY = total(t.*u.*P)
EY2 =  8.9850          EXY =  5.1410


For the joint densities in Exercises 20-32 below

1. Determine analytically E[X]E[X], E[Y]E[Y], E[X2]E[X2], E[Y2]E[Y2], and E[XY]E[XY].
2. Use a discrete approximation for E[X]E[X], E[Y]E[Y], E[X2]E[X2], E[Y2]E[Y2], and E[XY]E[XY].

## Exercise 20

(See Exercise 10 from "Problems On Random Vectors and Joint Distributions"). fXY(t,u)=1fXY(t,u)=1 for 0t10t1, 0u2(1-t)0u2(1-t).

f X ( t ) = 2 ( 1 - t ) , 0 t 1 , f Y ( u ) = 1 - u / 2 , 0 u 2 f X ( t ) = 2 ( 1 - t ) , 0 t 1 , f Y ( u ) = 1 - u / 2 , 0 u 2
(14)

### Solution

E [ X ] = 0 1 2 t ( 1 - t ) d t = 1 / 3 , E [ Y ] = 2 / 3 , E [ X 2 ] = 1 / 6 , E [ Y 2 ] = 2 / 3 E [ X ] = 0 1 2 t ( 1 - t ) d t = 1 / 3 , E [ Y ] = 2 / 3 , E [ X 2 ] = 1 / 6 , E [ Y 2 ] = 2 / 3
(15)
E [ X Y ] = 0 1 0 2 ( 1 - t ) t u d u d t = 1 / 6 E [ X Y ] = 0 1 0 2 ( 1 - t ) t u d u d t = 1 / 6
(16)
tuappr:  [0 1] [0 2] 200 400   u<=2*(1-t)
EX = 0.3333   EY = 0.6667  EX2 = 0.1667  EY2 = 0.6667
EXY = 0.1667 (use t, u, P)


## Exercise 21

(See Exercise 11 from "Problems On Random Vectors and Joint Distributions"). fXY(t,u)=1/2fXY(t,u)=1/2 on the square with vertices at (1,0),(2,1),(1,2),(0,1)(1,0),(2,1),(1,2),(0,1).

f X ( t ) = f Y ( t ) = I [ 0 , 1 ] ( t ) t + I ( 1 , 2 ] ( t ) ( 2 - t ) f X ( t ) = f Y ( t ) = I [ 0 , 1 ] ( t ) t + I ( 1 , 2 ] ( t ) ( 2 - t )
(17)

### Solution

E [ X ] = E [ Y ] = 0 1 t 2 d t + 1 t ( 2 t - t 2 ) d t = 1 , E [ X 2 ] = E [ Y 2 ] = 7 / 6 E [ X ] = E [ Y ] = 0 1 t 2 d t + 1 t ( 2 t - t 2 ) d t = 1 , E [ X 2 ] = E [ Y 2 ] = 7 / 6
(18)
E [ X Y ] = ( 1 / 2 ) 0 1 1 - t 1 + t d u d t + ( 1 / 2 ) 1 2 t - 1 3 - t d u d t = 1 E [ X Y ] = ( 1 / 2 ) 0 1 1 - t 1 + t d u d t + ( 1 / 2 ) 1 2 t - 1 3 - t d u d t = 1
(19)
tuappr: [0 2] [0 2] 200 200  0.5*(u<=min(t+1,3-t))&(u>= max(1-t,t-1))
EX = 1.0000  EY = 1.0002  EX2 = 1.1684  EY2 = 1.1687 EXY = 1.0002


## Exercise 22

(See Exercise 12 from "Problems On Random Vectors and Joint Distributions"). fXY(t,u)=4t(1-u)fXY(t,u)=4t(1-u) for 0t10t1, 0u10u1.

f X ( t ) = 2 t , 0 t 1 , f Y ( u ) = 2 ( 1 - u ) , 0 u 1 f X ( t ) = 2 t , 0 t 1 , f Y ( u ) = 2 ( 1 - u ) , 0 u 1
(20)

### Solution

E [ X ] = 2 / 3 , E [ Y ] = 1 / 3 , E [ X 2 ] = 1 / 2 , E [ Y 2 ] = 1 / 6 E [ X Y ] = 2 / 9 E [ X ] = 2 / 3 , E [ Y ] = 1 / 3 , E [ X 2 ] = 1 / 2 , E [ Y 2 ] = 1 / 6 E [ X Y ] = 2 / 9
(21)
tuappr:  [0 1] [0 1]  200 200 4*t.*(1-u)
EX = 0.6667  EY = 0.3333  EX2 = 0.5000  EY2 = 0.1667  EXY = 0.2222


## Exercise 23

(See Exercise 13 from "Problems On Random Vectors and Joint Distributions"). fXY(t,u)=18(t+u)fXY(t,u)=18(t+u) for 0t20t2, 0u20u2.

f X ( t ) = f Y ( t ) = 1 4 ( t + 1 ) , 0 t 2 f X ( t ) = f Y ( t ) = 1 4 ( t + 1 ) , 0 t 2
(22)

### Solution

E [ X ] = E [ Y ] = 1 4 0 2 ( t 2 + t ) d t = 7 6 , E [ X 2 ] = E [ Y 2 ] = 5 / 3 E [ X ] = E [ Y ] = 1 4 0 2 ( t 2 + t ) d t = 7 6 , E [ X 2 ] = E [ Y 2 ] = 5 / 3
(23)
E [ X Y ] = 1 8 0 2 0 2 ( t 2 u + t u 2 ) d u d t = 4 3 E [ X Y ] = 1 8 0 2 0 2 ( t 2 u + t u 2 ) d u d t = 4 3
(24)
tuappr:  [0 2] [0 2] 200 200  (1/8)*(t+u)
EX = 1.1667  EY = 1.1667  EX2 = 1.6667  EY2 = 1.6667  EXY = 1.3333


## Exercise 24

(See Exercise 14 from "Problems On Random Vectors and Joint Distributions"). fXY(t,u)=4ue-2tfXY(t,u)=4ue-2t for 0t,0u10t,0u1.

f X ( t ) = 2 e - 2 t , 0 t , f Y ( u ) = 2 u , 0 u 1 f X ( t ) = 2 e - 2 t , 0 t , f Y ( u ) = 2 u , 0 u 1
(25)

### Solution

E [ X ] = 0 2 t e - 2 t d t = 1 2 , E [ Y ] = 2 3 , E [ X 2 ] = 1 2 , E [ Y 2 ] = 1 2 , E [ X Y ] = 1 3 E [ X ] = 0 2 t e - 2 t d t = 1 2 , E [ Y ] = 2 3 , E [ X 2 ] = 1 2 , E [ Y 2 ] = 1 2 , E [ X Y ] = 1 3
(26)
tuappr: [0 6] [0 1] 600 200  4*u.*exp(-2*t)
EX = 0.5000  EY = 0.6667  EX2 = 0.4998  EY2 = 0.5000  EXY = 0.3333


## Exercise 25

(See Exercise 15 from "Problems On Random Vectors and Joint Distributions"). fXY(t,u)=388(2t+3u2)fXY(t,u)=388(2t+3u2) for 0t20t2, 0u1+t0u1+t.

f X ( t ) = 3 88 ( 1 + t ) ( 1 + 4 t + t 2 ) = 3 88 ( 1 + 5 t + 5 t 2 + t 3 ) , 0 t 2 f X ( t ) = 3 88 ( 1 + t ) ( 1 + 4 t + t 2 ) = 3 88 ( 1 + 5 t + 5 t 2 + t 3 ) , 0 t 2
(27)
f Y ( u ) = I [ 0 , 1 ] ( u ) 3 88 ( 6 u 2 + 4 ) + I ( 1 , 3 ] ( u ) 3 88 ( 3 + 2 u + 8 u 2 - 3 u 3 ) f Y ( u ) = I [ 0 , 1 ] ( u ) 3 88 ( 6 u 2 + 4 ) + I ( 1 , 3 ] ( u ) 3 88 ( 3 + 2 u + 8 u 2 - 3 u 3 )
(28)

### Solution

E [ X ] = 313 220 , E [ Y ] = 1429 880 , E [ X 2 ] = 49 22 , E [ Y 2 ] = 172 55 , E [ X Y ] = 2153 880 E [ X ] = 313 220 , E [ Y ] = 1429 880 , E [ X 2 ] = 49 22 , E [ Y 2 ] = 172 55 , E [ X Y ] = 2153 880
(29)
tuappr:  [0 2] [0 3] 200 300 (3/88)*(2*t + 3*u.^2).*(u<1+t)
EX = 1.4229  EY = 1.6202  EX2 = 2.2277 EY2 = 3.1141  EXY = 2.4415


## Exercise 26

(See Exercise 16 from "Problems On Random Vectors and Joint Distributions"). fXY(t,u)=12t2ufXY(t,u)=12t2u on the parallelogram with vertices

( - 1 , 0 ) , ( 0 , 0 ) , ( 1 , 1 ) , ( 0 , 1 ) ( - 1 , 0 ) , ( 0 , 0 ) , ( 1 , 1 ) , ( 0 , 1 )
(30)
f X ( t ) = I [ - 1 , 0 ] ( t ) 6 t 2 ( t + 1 ) 2 + I ( 0 , 1 ] ( t ) 6 t 2 ( 1 - t 2 ) , f Y ( u ) = 12 u 3 - 12 u 2 + 4 u , 0 u 1 f X ( t ) = I [ - 1 , 0 ] ( t ) 6 t 2 ( t + 1 ) 2 + I ( 0 , 1 ] ( t ) 6 t 2 ( 1 - t 2 ) , f Y ( u ) = 12 u 3 - 12 u 2 + 4 u , 0 u 1
(31)

### Solution

E [ X ] = 2 5 , E [ Y ] = 11 15 , E [ X 2 ] = 2 5 , E [ Y 2 ] = 3 5 , E [ X Y ] = 2 5 E [ X ] = 2 5 , E [ Y ] = 11 15 , E [ X 2 ] = 2 5 , E [ Y 2 ] = 3 5 , E [ X Y ] = 2 5
(32)
tuappr: [-1 1] [0 1] 400 200 12*t.^2.*u.*(u>= max(0,t)).*(u<= min(1+t,1))
EX = 0.4035  EY = 0.7342  EX2 = 0.4016  EY2 = 0.6009  EXY = 0.4021


## Exercise 27

(See Exercise 17 from "Problems On Random Vectors and Joint Distributions"). fXY(t,u)=2411tufXY(t,u)=2411tu for 0t20t2, 0umin{1,2-t}0umin{1,2-t}.

f X ( t ) = I [ 0 , 1 ] ( t ) 12 11 t + I ( 1 , 2 ] ( t ) 12 11 t ( 2 - t ) 2 , f Y ( u ) = 12 11 u ( u - 2 ) 2 , 0 u 1 f X ( t ) = I [ 0 , 1 ] ( t ) 12 11 t + I ( 1 , 2 ] ( t ) 12 11 t ( 2 - t ) 2 , f Y ( u ) = 12 11 u ( u - 2 ) 2 , 0 u 1
(33)

### Solution

E [ X ] = 52 55 , E [ Y ] = 32 55 , E [ X 2 ] = 57 55 , E [ Y 2 ] = 2 5 , E [ X Y ] = 28 55 E [ X ] = 52 55 , E [ Y ] = 32 55 , E [ X 2 ] = 57 55 , E [ Y 2 ] = 2 5 , E [ X Y ] = 28 55
(34)
tuappr:  [0 2] [0 1] 400 200 (24/11)*t.*u.*(u<=min(1,2-t))
EX = 0.9458  EY = 0.5822  EX2 = 1.0368 EY2 = 0.4004   EXY = 0.5098


## Exercise 28

(See Exercise 18 from "Problems On Random Vectors and Joint Distributions"). fXY(t,u)=323(t+2u)fXY(t,u)=323(t+2u) for 0t20t2, 0umax{2-t,t}0umax{2-t,t}.

f X ( t ) = I [ 0 , 1 ] ( t ) 6 23 ( 2 - t ) + I ( 1 , 2 ] ( t ) 6 23 t 2 , f Y ( u ) = I [ 0 , 1 ] ( u ) 6 23 ( 2 u + 1 ) + I ( 1 , 2 ] ( u ) 3 23 ( 4 + 6 u - 4 u 2 ) f X ( t ) = I [ 0 , 1 ] ( t ) 6 23 ( 2 - t ) + I ( 1 , 2 ] ( t ) 6 23 t 2 , f Y ( u ) = I [ 0 , 1 ] ( u ) 6 23 ( 2 u + 1 ) + I ( 1 , 2 ] ( u ) 3 23 ( 4 + 6 u - 4 u 2 )
(35)

### Solution

E [ X ] = 53 46 , E [ Y ] = 22 23 , E [ X 2 ] = 397 230 , E [ Y 2 ] = 261 230 , E [ X Y ] = 251 230 E [ X ] = 53 46 , E [ Y ] = 22 23 , E [ X 2 ] = 397 230 , E [ Y 2 ] = 261 230 , E [ X Y ] = 251 230
(36)
tuappr:  [0 2] [0 2] 200 200 (3/23)*(t + 2*u).*(u<=max(2-t,t))
EX = 1.1518  EY = 0.9596  EX2 = 1.7251  EY2 = 1.1417  EXY = 1.0944


## Exercise 29

(See Exercise 19 from "Problems On Random Vectors and Joint Distributions"). fXY(t,u)=12179(3t2+u)fXY(t,u)=12179(3t2+u), for 0t20t2, 0umin{2,3-t}0umin{2,3-t}.

f X ( t ) = I [ 0 , 1 ] ( t ) 24 179 ( 3 t 2 + 1 ) + I ( 1 , 2 ] ( t ) 6 179 ( 9 - 6 t + 19 t 2 - 6 t 3 ) f X ( t ) = I [ 0 , 1 ] ( t ) 24 179 ( 3 t 2 + 1 ) + I ( 1 , 2 ] ( t ) 6 179 ( 9 - 6 t + 19 t 2 - 6 t 3 )
(37)
f Y ( u ) = I [ 0 , 1 ] ( u ) 24 179 ( 4 + u ) + I ( 1 , 2 ] ( u ) 12 179 ( 27 - 24 u + 8 u 2 - u 3 ) f Y ( u ) = I [ 0 , 1 ] ( u ) 24 179 ( 4 + u ) + I ( 1 , 2 ] ( u ) 12 179 ( 27 - 24 u + 8 u 2 - u 3 )
(38)

### Solution

E [ X ] = 2313 1790 , E [ Y ] = 778 895 , E [ X 2 ] = 1711 895 , E [ Y 2 ] = 916 895 , E [ X Y ] = 1811 1790 E [ X ] = 2313 1790 , E [ Y ] = 778 895 , E [ X 2 ] = 1711 895 , E [ Y 2 ] = 916 895 , E [ X Y ] = 1811 1790
(39)
tuappr: [0 2] [0 2] 400 400 (12/179)*(3*t.^2 + u).*(u<=min(2,3-t))
EX = 1.2923  EY = 0.8695  EX2 = 1.9119  EY2 = 1.0239  EXY = 1.0122


## Exercise 30

(See Exercise 20 from "Problems On Random Vectors and Joint Distributions"). fXY(t,u)=12227(3t+2tu)fXY(t,u)=12227(3t+2tu), for 0t20t2, 0umin{1+t,2}0umin{1+t,2}.

f X ( t ) = I [ 0 , 1 ] ( t ) 12 227 ( t 3 + 5 t 2 + 4 t ) + I ( 1 , 2 ] ( t ) 120 227 t f X ( t ) = I [ 0 , 1 ] ( t ) 12 227 ( t 3 + 5 t 2 + 4 t ) + I ( 1 , 2 ] ( t ) 120 227 t
(40)
f Y ( u ) = I [ 0 , 1 ] ( u ) 24 227 ( 2 u + 3 ) + I ( 1 , 2 ] ( u ) 6 227 ( 2 u + 3 ) ( 3 + 2 u - u 2 ) f Y ( u ) = I [ 0 , 1 ] ( u ) 24 227 ( 2 u + 3 ) + I ( 1 , 2 ] ( u ) 6 227 ( 2 u + 3 ) ( 3 + 2 u - u 2 )
(41)
= I [ 0 , 1 ] ( u ) 24 227 ( 2 u + 3 ) + I ( 1 , 2 ] ( u ) 6 227 ( 9 + 12 u + u 2 - 2 u 3 ) = I [ 0 , 1 ] ( u ) 24 227 ( 2 u + 3 ) + I ( 1 , 2 ] ( u ) 6 227 ( 9 + 12 u + u 2 - 2 u 3 )
(42)

### Solution

E [ X ] = 1567 1135 , E [ Y ] = 2491 2270 , E [ X 2 ] = 476 227 , E [ Y 2 ] = 1716 1135 , E [ X Y ] = 5261 3405 E [ X ] = 1567 1135 , E [ Y ] = 2491 2270 , E [ X 2 ] = 476 227 , E [ Y 2 ] = 1716 1135 , E [ X Y ] = 5261 3405
(43)
tuappr: [0 2] [0 2] 400 400 (12/227)*(3*t + 2*t.*u).*(u<=min(1+t,2))
EX = 1.3805  EY = 1.0974  EX2 = 2.0967  EY2 = 1.5120   EXY = 1.5450


## Exercise 31

(See Exercise 21 from "Problems On Random Vectors and Joint Distributions"). fXY(t,u)=213(t+2u)fXY(t,u)=213(t+2u), for 0t20t2, 0umin{2t,3-t}0umin{2t,3-t}.

f X ( t ) = I [ 0 , 1 ] ( t ) 12 13 t 2 + I ( 1 , 2 ] ( t ) 6 13 ( 3 - t ) f X ( t ) = I [ 0 , 1 ] ( t ) 12 13 t 2 + I ( 1 , 2 ] ( t ) 6 13 ( 3 - t )
(44)
f Y ( u ) = I [ 0 , 1 ] ( u ) ( 4 13 + 8 13 u - 9 52 u 2 ) + I ( 1 , 2 ] ( u ) ( 9 13 + 6 13 u - 21 52 u 2 ) f Y ( u ) = I [ 0 , 1 ] ( u ) ( 4 13 + 8 13 u - 9 52 u 2 ) + I ( 1 , 2 ] ( u ) ( 9 13 + 6 13 u - 21 52 u 2 )
(45)

### Solution

E [ X ] = 16 13 , E [ Y ] = 11 12 , E [ X 2 ] = 219 130 , E [ Y 2 ] = 83 78 , E [ X Y ] = 431 390 E [ X ] = 16 13 , E [ Y ] = 11 12 , E [ X 2 ] = 219 130 , E [ Y 2 ] = 83 78 , E [ X Y ] = 431 390
(46)
tuappr:  [0 2] [0 2] 400 400 (2/13)*(t + 2*u).*(u<=min(2*t,3-t))
EX = 1.2309  EY = 0.9169  EX2 = 1.6849  EY2 = 1.0647 EXY = 1.1056


## Exercise 32

(See Exercise 22 from "Problems On Random Vectors and Joint Distributions"). fXY(t,u)=I[0,1](t)38(t2+2u)+I(1,2](t)914t2u2fXY(t,u)=I[0,1](t)38(t2+2u)+I(1,2](t)914t2u2,

for 0u10u1.

f X ( t ) = I [ 0 , 1 ] ( t ) 3 8 ( t 2 + 1 ) + I ( 1 , 2 ] ( t ) 3 14 t 2 , f Y ( u ) = 1 8 + 3 4 u + 3 2 u 2 0 u 1 f X ( t ) = I [ 0 , 1 ] ( t ) 3 8 ( t 2 + 1 ) + I ( 1 , 2 ] ( t ) 3 14 t 2 , f Y ( u ) = 1 8 + 3 4 u + 3 2 u 2 0 u 1
(47)

### Solution

E [ X ] = 243 224 , E [ Y ] = 11 16 , E [ X 2 ] = 107 70 , E [ Y 2 ] = 127 240 , E [ X Y ] = 347 448 E [ X ] = 243 224 , E [ Y ] = 11 16 , E [ X 2 ] = 107 70 , E [ Y 2 ] = 127 240 , E [ X Y ] = 347 448
(48)
tuappr  [0 2] [0 1] 400 200   (3/8)*(t.^2+2*u).*(t<=1) + (9/14)*(t.^2.*u.^2).*(t > 1)
EX = 1.0848  EY = 0.6875  EX2 = 1.5286  EY2 = 0.5292  EXY = 0.7745


## Exercise 33

The class {X,Y,Z}{X,Y,Z} of random variables is iid (independent, identically distributed) with common distribution

X = [ - 5 - 1 3 4 7 ] P X = 0 . 01 * [ 15 20 30 25 10 ] X = [ - 5 - 1 3 4 7 ] P X = 0 . 01 * [ 15 20 30 25 10 ]
(49)

Let W=3X-4Y+2ZW=3X-4Y+2Z. Determine E[W]E[W]. Do this using icalc, then repeat with icalc3 and compare results.

### Solution

Use x and pxpx to prevent renaming.

x = [-5 -1 3 4 7];
px = 0.01*[15 20 30 25 10];
icalc
Enter row matrix of X-values  x
Enter row matrix of Y-values  x
Enter X probabilities  px
Enter Y probabilities  px
Use array operations on matrices X, Y, PX, PY, t, u, and P
G = 3*t -4*u;
[R,PR] = csort(G,P);
icalc
Enter row matrix of X-values  R
Enter row matrix of Y-values  x
Enter X probabilities  PR
Enter Y probabilities  px
Use array operations on matrices X, Y, PX, PY, t, u, and P
H = t + 2*u;
EH = total(H.*P)
EH =  1.6500
[W,PW] = csort(H,P);  % Alternate
EW = W*PW'
EW =  1.6500
icalc3                % Solution with icalc3
Enter row matrix of X-values  x
Enter row matrix of Y-values  x
Enter row matrix of Z-values  x
Enter X probabilities  px
Enter Y probabilities  px
Enter Z probabilities  px
Use array operations on matrices X, Y, Z,
PX, PY, PZ, t, u, v, and P
K = 3*t - 4*u + 2*v;
EK = total(K.*P)
EK =  1.6500


## Exercise 34

(See Exercise 5 from "Problems on Functions of Random Variables") The cultural committee of a student organization has arranged a special deal for tickets to a concert. The agreement is that the organization will purchase ten tickets at $20 each (regardless of the number of individual buyers). Additional tickets are available according to the following schedule: 11-20,$18 each; 21-30 $16 each; 31-50,$15 each; 51-100, \$13 each

If the number of purchasers is a random variable X, the total cost (in dollars) is a random quantity Z=g(X)Z=g(X) described by

g ( X ) = 200 + 18 I M 1 ( X ) ( X - 10 ) + ( 16 - 18 ) I M 2 ( X ) ( X - 20 ) + g ( X ) = 200 + 18 I M 1 ( X ) ( X - 10 ) + ( 16 - 18 ) I M 2 ( X ) ( X - 20 ) +
(50)
( 15 - 16 ) I M 3 ( X ) ( X - 30 ) + ( 13 - 15 ) I M 4 ( X ) ( X - 50 ) ( 15 - 16 ) I M 3 ( X ) ( X - 30 ) + ( 13 - 15 ) I M 4 ( X ) ( X - 50 )
(51)
where M 1 = [ 10 , ) , M 2 = [ 20 , ) , M 3 = [ 30 , ) , M 4 = [ 50 , ) where M 1 = [ 10 , ) , M 2 = [ 20 , ) , M 3 = [ 30 , ) , M 4 = [ 50 , )
(52)

Suppose XX Poisson (75). Approximate the Poisson distribution by truncating at 150. Determine E[Z]E[Z] and E[Z2]E[Z2].

### Solution

X = 0:150;
PX = ipoisson(75,X);
G = 200 + 18*(X - 10).*(X>=10) + (16 - 18)*(X - 20).*(X>=20) + ...
(15 - 16)*(X- 30).*(X>=30) + (13 - 15)*(X - 50).*(X>=50);
[Z,PZ] = csort(G,PX);
EZ = Z*PZ'
EZ =  1.1650e+03
EZ2 = (Z.^2)*PZ'
EZ2 = 1.3699e+06


## Exercise 35

The pair {X,Y}{X,Y} has the joint distribution (in m-file npr08_07.m):

P ( X = t , Y = u ) P ( X = t , Y = u )
(53)
 t = -3.1 -0.5 1.2 2.4 3.7 4.9 u = 7.5 0.009 0.0396 0.0594 0.0216 0.044 0.0203 4.1 0.0495 0 0.1089 0.0528 0.0363 0.0231 -2.0 0.0405 0.132 0.0891 0.0324 0.0297 0.0189 -3.8 0.051 0.0484 0.0726 0.0132 0 0.0077

Let Z=g(X,Y)=3X2+2XY-Y2Z=g(X,Y)=3X2+2XY-Y2. Determine E[Z]E[Z] and E[Z2]E[Z2].

### Solution

npr08_07
Data are in X, Y, P
jcalc
- - - - - - - - -
G = 3*t.^2 + 2*t.*u - u.^2;
EG = total(G.*P)
EG =  5.2975
ez2 = total(G.^2.*P)
EG2 = 1.0868e+03
[Z,PZ] = csort(G,P);   % Alternate
EZ = Z*PZ'
EZ =  5.2975
EZ2 = (Z.^2)*PZ'
EZ2 = 1.0868e+03


## Exercise 36

For the pair {X,Y}{X,Y} in Exercise 35, let

W = g X , Y ) = X for X + Y 4 2 Y for X + Y > 4 = I M ( X , Y ) X + I M c ( X , Y ) 2 Y W = g X , Y ) = X for X + Y 4 2 Y for X + Y > 4 = I M ( X , Y ) X + I M c ( X , Y ) 2 Y
(54)

Determine E[W]E[W] and E[W2]E[W2].

### Solution

H = t.*(t+u<=4) + 2*u.*(t+u>4);
EH = total(H.*P)
EH =   4.7379
EH2 = total(H.^2.*P)
EH2 = 61.4351
[W,PW] = csort(H,P);  % Alternate
EW = W*PW'
EW =   4.7379
EW2 = (W.^2)*PW'
EW2 = 61.4351


For the distributions in Exercises 37-41 below

1. Determine analytically E[Z]E[Z] and E[Z2]E[Z2].
2. Use a discrete approximation to calculate the same quantities.

## Exercise 37

fXY(t,u)=388(2t+3u2)fXY(t,u)=388(2t+3u2) for 0t20t2, 0u1+t0u1+t (see Exercise 25).

Z = I [ 0 , 1 ] ( X ) 4 X + I ( 1 , 2 ] ( X ) ( X + Y ) Z = I [ 0 , 1 ] ( X ) 4 X + I ( 1 , 2 ] ( X ) ( X + Y )
(55)

### Solution

E [ Z ] = 3 88 0 1 0 1 + t 4 t ( 2 t + 3 u 2 ) d u d t + 3 88 1 2 0 1 + t ( t + u ) ( 2 t + 3 u 2 ) d u d t = 5649 1760 E [ Z ] = 3 88 0 1 0 1 + t 4 t ( 2 t + 3 u 2 ) d u d t + 3 88 1 2 0 1 + t ( t + u ) ( 2 t + 3 u 2 ) d u d t = 5649 1760
(56)
E [ Z 2 ] = 3 88 0 1 0 1 + t ( 4 t ) 2 ( 2 t + 3 u 2 ) d u d t + 3 88 1 2 0 1 + t ( t + u ) 2 ( 2 t + 3 u 2 ) d u d t = 4881 440 E [ Z 2 ] = 3 88 0 1 0 1 + t ( 4 t ) 2 ( 2 t + 3 u 2 ) d u d t + 3 88 1 2 0 1 + t ( t + u ) 2 ( 2 t + 3 u 2 ) d u d t = 4881 440
(57)
tuappr:  [0 2] [0 3] 200 300 (3/88)*(2*t+3*u.^2).*(u<=1+t)
G = 4*t.*(t<=1) + (t + u).*(t>1);
EG = total(G.*P)
EG =   3.2086
EG2 = total(G.^2.*P)
EG2 = 11.0872


## Exercise 38

fXY(t,u)=2411tufXY(t,u)=2411tu for 0t20t2, 0umin{1,2-t}0umin{1,2-t} (see Exercise 27).

Z = I M ( X , Y ) 1 2 X + I M c ( X , Y ) Y 2 , M = { ( t , u ) : u > t } Z = I M ( X , Y ) 1 2 X + I M c ( X , Y ) Y 2 , M = { ( t , u ) : u > t }
(58)

### Solution

E [ Z ] = 12 11 0 1 t 1 t 2 u d u d t + 24 11 0 1 0 t t u 3 d u d t + 24 11 1 2 0 2 - t t u 3 d u d t = 16 55 E [ Z ] = 12 11 0 1 t 1 t 2 u d u d t + 24 11 0 1 0 t t u 3 d u d t + 24 11 1 2 0 2 - t t u 3 d u d t = 16 55
(59)
E [ Z 2 ] = 6 11 0 1 t 1 t 3 u d u d t + 24 11 0 1 0 t t u 5 d u d t + 24 11 1 2 0 2 - t t u 5 d u d t = 39 308 E [ Z 2 ] = 6 11 0 1 t 1 t 3 u d u d t + 24 11 0 1 0 t t u 5 d u d t + 24 11 1 2 0 2 - t t u 5 d u d t = 39 308
(60)
tuappr:  [0 2] [0 1] 400 200  (24/11)*t.*u.*(u<=min(1,2-t))
G = (1/2)*t.*(u>t) + u.^2.*(u<=t);
EZ = 0.2920  EZ2 = 0.1278


## Exercise 39

fXY(t,u)=323(t+2u)fXY(t,u)=323(t+2u) for 0t20t2, 0umax{2-t,t}0umax{2-t,t} (see Exercise 28).

Z = I M ( X , Y ) ( X + Y ) + I M c ( X , Y ) 2 Y , M = { ( t , u ) : max ( t , u ) 1 } Z = I M ( X , Y ) ( X + Y ) + I M c ( X , Y ) 2 Y , M = { ( t , u ) : max ( t , u ) 1 }
(61)

### Solution

E [ Z ] = 3 23 0 1 0 1 ( t + u ) ( t + 2 u ) d u d t + 3 23 0 1 1 2 - t 2 u ( t + 2 u ) d u d t + 3 23 1 2 1 t 2 u ( t + 2 u ) d u d t = 175 92 E [ Z ] = 3 23 0 1 0 1 ( t + u ) ( t + 2 u ) d u d t + 3 23 0 1 1 2 - t 2 u ( t + 2 u ) d u d t + 3 23 1 2 1 t 2 u ( t + 2 u ) d u d t = 175 92
(62)
E [ Z 2 ] = 3 23 0 1 0 1 ( t + u ) 2 ( t + 2 u ) d u d t + 3 23 0 1 1 2 - t 4 u 2 ( t + 2 u ) d u d t + 3 23 1 2 1 t 4 u 2 ( t + 2 u ) d u d t = 2063 460 E [ Z 2 ] = 3 23 0 1 0 1 ( t + u ) 2 ( t + 2 u ) d u d t + 3 23 0 1 1 2 - t 4 u 2 ( t + 2 u ) d u d t + 3 23 1 2 1 t 4 u 2 ( t + 2 u ) d u d t = 2063 460
(63)
tuappr:  [0 2] [0 2] 400 400 (3/23)*(t+2*u).*(u<=max(2-t,t))
M = max(t,u)<=1;
G = (t+u).*M + 2*u.*(1-M);
EZ = total(G.*P)
EZ =  1.9048
EZ2 = total(G.^2.*P)
EZ2 = 4.4963


## Exercise 40

fXY(t,u)=12179(3t2+u)fXY(t,u)=12179(3t2+u), for 0t20t2, 0umin{2,3-t}0umin{2,3-t} (see Exercise 29).

Z = I M ( X , Y ) ( X + Y ) + I M c ( X , Y ) 2 Y 2 , M = { ( t , u ) : t 1 , u 1 } Z = I M ( X , Y ) ( X + Y ) + I M c ( X , Y ) 2 Y 2 , M = { ( t , u ) : t 1 , u 1 }
(64)

### Solution

E [ Z ] = 12 179 0 1 1 2 ( t + u ) ( 3 t 2 + u ) d u d t + 12 179 0 1 0 1 2 u 2 ( 3 t 2 + u ) d u d t + E [ Z ] = 12 179 0 1 1 2 ( t + u ) ( 3 t 2 + u ) d u d t + 12 179 0 1 0 1 2 u 2 ( 3 t 2 + u ) d u d t +
(65)
12 179 1 2 0 3 - t 2 u 2 ( 3 t 2 + u ) d u d t = 1422 895 12 179 1 2 0 3 - t 2 u 2 ( 3 t 2 + u ) d u d t = 1422 895
(66)
E [ Z 2 ] = 12 179 0 1 1 2 ( t + u ) 2 ( 3 t 2 + u ) d u d t + 12 179 0 1 0 1 4 u 4 ( 3 t 2 + u ) d u d t + E [ Z 2 ] = 12 179 0 1 1 2 ( t + u ) 2 ( 3 t 2 + u ) d u d t + 12 179 0 1 0 1 4 u 4 ( 3 t 2 + u ) d u d t +
(67)
12 179 1 2 0 3 - t 4 u 4 ( 3 t 2 + u ) d u d t = 28296 6265 12 179 1 2 0 3 - t 4 u 4 ( 3 t 2 + u ) d u d t = 28296 6265
(68)
tuappr:  [0 2] [0 2] 400 400 (12/179)*(3*t.^2 + u).*(u <= min(2,3-t))
M = (t<=1)&(u>=1);
G = (t + u).*M + 2*u.^2.*(1 - M);
EZ = total(G.*P)
EZ =  1.5898
EZ2 = total(G.^2.*P)
EZ2 = 4.5224


## Exercise 41

fXY(t,u)=12227(3t+2tu)fXY(t,u)=12227(3t+2tu), for 0t20t2, 0umin{1+t,2}0umin{1+t,2} (see Exercise 30).

Z = I M ( X , Y ) X + I M c ( X , Y ) X Y , M = { ( t , u ) : u min ( 1 , 2 - t ) } Z = I M ( X , Y ) X + I M c ( X , Y ) X Y , M = { ( t , u ) : u min ( 1 , 2 - t ) }
(69)

### Solution

E [ Z ] = 12 227 0 1 0 1 t ( 3 t + 2 t u ) d u d t + 12 227 1 2 0 2 - t t ( 3 t + 2 t u ) d u d t + E [ Z ] = 12 227 0 1 0 1 t ( 3 t + 2 t u ) d u d t + 12 227 1 2 0 2 - t t ( 3 t + 2 t u ) d u d t +
(70)
12 227 0 1 1 1 + t t u ( 3 t + 2 t u ) d u d t + 12 227 1 2 2 - t 2 t u ( 3 t + 2 t u ) d u d t = 5774 3405 12 227 0 1 1 1 + t t u ( 3 t + 2 t u ) d u d t + 12 227 1 2 2 - t 2 t u ( 3 t + 2 t u ) d u d t = 5774 3405
(71)
E [ Z 2 ] = 56673 15890 E [ Z 2 ] = 56673 15890
(72)
tuappr: [0 2] [0 2] 400 400 (12/227)*(3*t + 2*t.*u).*(u <= min(1+t,2))
M = u <= min(1,2-t);
G = t.*M + t.*u.*(1 - M);
EZ = total(G.*P)
EZ =  1.6955
EZ2 = total(G.^2.*P)
EZ2 = 3.5659


## Exercise 42

The class {X,Y,Z}{X,Y,Z} is independent. (See Exercise 16 from "Problems on Functions of Random Variables", m-file npr10_16.m)

X=-2IA+IB+3ICX=-2IA+IB+3IC. Minterm probabilities are (in the usual order)

0 . 255 0 . 025 0 . 375 0 . 045 0 . 108 0 . 012 0 . 162 0 . 018 0 . 255 0 . 025 0 . 375 0 . 045 0 . 108 0 . 012 0 . 162 0 . 018
(73)

Y=ID+3IE+IF-3Y=ID+3IE+IF-3. The class {D,E,F}{D,E,F} is independent with

P ( D ) = 0 . 32 P ( E ) = 0 . 56 P ( F ) = 0 . 40 P ( D ) = 0 . 32 P ( E ) = 0 . 56 P ( F ) = 0 . 40
(74)

Z has distribution

 Value -1.3 1.2 2.7 3.4 5.8 Probability 0.12 0.24 0.43 0.13 0.08

W=X2+3XY2-3ZW=X2+3XY2-3Z . Determine E[W]E[W] and E[W2]E[W2] .

### Solution

npr10_16
Data are in cx, pmx, cy, pmy, Z, PZ
[X,PX] = canonicf(cx,pmx);
[Y,PY] = canonicf(cy,pmy);
icalc3
input: X, Y, Z, PX, PY, PZ
- - - - - - -
Use array operations on matrices X, Y, Z,
PX, PY, PZ, t, u, v, and P
G = t.^2 + 3*t.*u.^2 - 3*v;
[W,PW] = csort(G,P);
EW = W*PW'
EW =   -1.8673
EW2 = (W.^2)*PW'
EW2 = 426.8529


## Content actions

PDF | EPUB (?)

### What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

#### Definition of a lens

##### Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

##### What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

##### Who can create a lens?

Any individual member, a community, or a respected organization.

##### What are tags?

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks