# Connexions

You are here: Home » Content » Applied Probability » Problems on Independent Classes of Random Variables

• Preface to Pfeiffer Applied Probability

### 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 collection is included in aLens by: Digital Scholarship at Rice University

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

#### Also in these lenses

• UniqU content

This collection is included inLens: UniqU's lens
By: UniqU, LLC

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

### Recently Viewed

This feature requires Javascript to be enabled.

Inside Collection:

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

# Problems on Independent Classes of Random Variables

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

## Exercise 1

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

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 ]
(1)
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
(2)

Determine whether or not the pair {X,Y}{X,Y} is independent.

### Solution

npr08_06
Data are in X, Y, P
itest
Enter matrix of joint probabilities  P
The pair {X,Y} is NOT independent
To see where the product rule fails, call for D
disp(D)
0     0     0     1     1
0     0     0     1     1
1     1     1     1     1
1     1     1     1     1


## Exercise 2

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

X = [ - 3 . 9 - 1 . 7 1 . 5 2 . 8 4 . 1 ] Y = [ - 2 1 2 . 6 5 . 1 ] X = [ - 3 . 9 - 1 . 7 1 . 5 2 . 8 4 . 1 ] Y = [ - 2 1 2 . 6 5 . 1 ]
(3)
P = 0 . 0589 0 . 0342 0 . 0304 0 . 0456 0 . 0209 0 . 0961 0 . 0556 0 . 0498 0 . 0744 0 . 0341 0 . 0682 0 . 0398 0 . 0350 0 . 0528 0 . 0242 0 . 0868 0 . 0504 0 . 0448 0 . 0672 0 . 0308 P = 0 . 0589 0 . 0342 0 . 0304 0 . 0456 0 . 0209 0 . 0961 0 . 0556 0 . 0498 0 . 0744 0 . 0341 0 . 0682 0 . 0398 0 . 0350 0 . 0528 0 . 0242 0 . 0868 0 . 0504 0 . 0448 0 . 0672 0 . 0308
(4)

Determine whether or not the pair {X,Y}{X,Y} is independent.

### Solution

npr09_02
Data are in X, Y, P
itest
Enter matrix of joint probabilities  P
The pair {X,Y} is NOT independent
To see where the product rule fails, call for D
disp(D)
0     0     0     0     0
0     1     1     0     0
0     1     1     0     0
0     0     0     0     0


## Exercise 3

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 )
(5)
 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 whether or not the pair {X,Y}{X,Y} is independent.

### Solution

npr08_07
Data are in X, Y, P
itest
Enter matrix of joint probabilities  P
The pair {X,Y} is NOT independent
To see where the product rule fails, call for D
disp(D)
1     1     1     1     1     1
1     1     1     1     1     1
1     1     1     1     1     1
1     1     1     1     1     1


For the distributions in Exercises 4-10 below

1. Determine whether or not the pair is independent.
2. Use a discrete approximation and an independence test to verify results in part (a).

## Exercise 4

fXY(t,u)=1/πfXY(t,u)=1/π on the circle with radius one, center at (0,0).

### Solution

Not independent by the rectangle test.

tuappr
Enter matrix [a b] of X-range endpoints  [-1 1]
Enter matrix [c d] of Y-range endpoints  [-1 1]
Enter number of X approximation points  100
Enter number of Y approximation points  100
Enter expression for joint density  (1/pi)*(t.^2 + u.^2<=1)
Use array operations on X, Y, PX, PY, t, u, and P
itest
Enter matrix of joint probabilities  P
The pair {X,Y} is NOT independent
To see where the product rule fails, call for D  % Not practical-- too large


## Exercise 5

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) (see Exercise 11 from "Problems on Random Vectors and Joint Distributions").

### Solution

Not independent, by the rectangle test.

tuappr
Enter matrix [a b] of X-range endpoints  [0 2]
Enter matrix [c d] of Y-range endpoints  [0 2]
Enter number of X approximation points  200
Enter number of Y approximation points  200
Enter expression for joint density  (1/2)*(u<=min(1+t,3-t)).* ...
(u>=max(1-t,t-1))
Use array operations on X, Y, PX, PY, t, u, and P
itest
Enter matrix of joint probabilities  P
The pair {X,Y} is NOT independent
To see where the product rule fails, call for D


## Exercise 6

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

### Solution

From the solution for Exercise 12 from "Problems on Random Vectors and Joint Distributions" we have

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

so the pair is independent.

tuappr
Enter matrix [a b] of X-range endpoints  [0 1]
Enter matrix [c d] of Y-range endpoints  [0 1]
Enter number of X approximation points  100
Enter number of Y approximation points  100
Enter expression for joint density  4*t.*(1-u)
Use array operations on X, Y, PX, PY, t, u, and P

itest
Enter matrix of joint probabilities  P
The pair {X,Y} is independent


## Exercise 7

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

### Solution

From the solution of Exercise 13 from "Problems on Random Vectors and Joint Distributions" we have

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
(7)

so f X Y f X f Y f X Y f X f Y which implies the pair is not independent.

tuappr
Enter matrix [a b] of X-range endpoints  [0 2]
Enter matrix [c d] of Y-range endpoints  [0 2]
Enter number of X approximation points  100
Enter number of Y approximation points  100
Enter expression for joint density  (1/8)*(t+u)
Use array operations on X, Y, PX, PY, t, u, and P
itest
Enter matrix of joint probabilities  P
The pair {X,Y} is NOT independent
To see where the product rule fails, call for D


## Exercise 8

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

### Solution

From the solution for Exercise 14 from "Problems on Random Vectors and Joint Distribution" we have

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
(8)

so that fXY=fXfYfXY=fXfY and the pair is independent.

tuappr
Enter matrix [a b] of X-range endpoints  [0 5]
Enter matrix [c d] of Y-range endpoints  [0 1]
Enter number of X approximation points  500
Enter number of Y approximation points  100
Enter expression for joint density  4*u.*exp(-2*t)
Use array operations on X, Y, PX, PY, t, u, and P
itest
Enter matrix of joint probabilities  P
The pair {X,Y} is independent       % Product rule holds to within 10^{-9}


## Exercise 9

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)

(see Exercise 16 from "Problems on Random Vectors and Joint Distributions").

### Solution

Not independent by the rectangle test.

tuappr
Enter matrix [a b] of X-range endpoints  [-1 1]
Enter matrix [c d] of Y-range endpoints  [0 1]
Enter number of X approximation points  200
Enter number of Y approximation points  100
Enter expression for joint density  12*t.^2.*u.*(u<=min(t+1,1)).* ...
(u>=max(0,t))
Use array operations on X, Y, PX, PY, t, u, and P
itest
Enter matrix of joint probabilities  P
The pair {X,Y} is NOT independent
To see where the product rule fails, call for D


## Exercise 10

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

### Solution

By the rectangle test, the pair is not independent.

tuappr
Enter matrix [a b] of X-range endpoints  [0 2]
Enter matrix [c d] of Y-range endpoints  [0 1]
Enter number of X approximation points  200
Enter number of Y approximation points  100
Enter expression for joint density  (24/11)*t.*u.*(u<=min(1,2-t))
Use array operations on X, Y, PX, PY, t, u, and P
itest
Enter matrix of joint probabilities  P
The pair {X,Y} is NOT independent
To see where the product rule fails, call for D


## Exercise 11

Two software companies, MicroWare and BusiCorp, are preparing a new business package in time for a computer trade show 180 days in the future. They work independently. MicroWare has anticipated completion time, in days, exponential (1/150). BusiCorp has time to completion, in days, exponential (1/130). What is the probability both will complete on time; that at least one will complete on time; that neither will complete on time?

### Solution

p1 = 1 - exp(-180/150)
p1 =  0.6988
p2 = 1 - exp(-180/130)
p2 =  0.7496
Pboth = p1*p2
Pboth =  0.5238
Poneormore = 1 - (1 - p1)*(1 - p2) % 1 - Pneither
Poneormore =  0.9246
Pneither = (1 - p1)*(1 - p2)
Pneither =    0.0754


## Exercise 12

Eight similar units are put into operation at a given time. The time to failure (in hours) of each unit is exponential (1/750). If the units fail independently, what is the probability that five or more units will be operating at the end of 500 hours?

### Solution

p = exp(-500/750);  % Probability any one will survive
P = cbinom(8,p,5)   % Probability five or more will survive
P =  0.3930


## Exercise 13

The location of ten points along a line may be considered iid random variables with symmytric triangular distribution on [1,3][1,3]. What is the probability that three or more will lie within distance 1/2 of the point t=2t=2?

### Solution

Geometrically, p=3/4p=3/4, so that P = cbinom(10,p,3) = 0.9996.

## Exercise 14

A Christmas display has 200 lights. The times to failure are iid, exponential (1/10000). The display is on continuously for 750 hours (approximately one month). Determine the probability the number of lights which survive the entire period is at least 175, 180, 185, 190.

### Solution

p = exp(-750/10000)
p =  0.9277
k = 175:5:190;
P = cbinom(200,p,k);
disp([k;P]')
175.0000    0.9973
180.0000    0.9449
185.0000    0.6263
190.0000    0.1381


## Exercise 15

A critical module in a network server has time to failure (in hours of machine time) exponential (1/3000). The machine operates continuously, except for brief times for maintenance or repair. The module is replaced routinely every 30 days (720 hours), unless failure occurs. If successive units fail independently, what is the probability of no breakdown due to the module for one year?

### Solution

p = exp(-720/3000)
p = 0.7866     % Probability any unit survives
P = p^12    % Probability all twelve survive (assuming 12 periods)
P = 0.056


## Exercise 16

Joan is trying to decide which of two sales opportunities to take.

• In the first, she makes three independent calls. Payoffs are $570,$525, and $465, with respective probabilities of 0.57, 0.41, and 0.35. • In the second, she makes eight independent calls, with probability of success on each call p=0.57p=0.57. She realizes$150 profit on each successful sale.

Let X be the net profit on the first alternative and Y be the net gain on the second. Assume the pair {X,Y}{X,Y} is independent.

1. Which alternative offers the maximum possible gain?
2. Compare probabilities in the two schemes that total sales are at least $600,$900, $1000,$1100.
3. What is the probability the second exceeds the first— i.e., what is P(Y>X)P(Y>X)?

### Solution

X=570IA+525IB+465ICX=570IA+525IB+465IC with [P(A)P(B)P(C)]=[0.570.410.35][P(A)P(B)P(C)]=[0.570.410.35]. Y=150SY=150S, where SS binomial (8, 0.57).

c = [570 525 465 0];
pm = minprob([0.57 0.41 0.35]);
canonic                              % Distribution for X
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
Y = 150*[0:8];                       % Distribution for Y
PY = ibinom(8,0.57,0:8);
icalc                                % Joint distribution
Enter row matrix of X-values  X
Enter row matrix of Y-values  Y
Enter X probabilities  PX
Enter Y probabilities  PY
Use array operations on matrices X, Y, PX, PY, t, u, and P
xmax = max(X)
xmax =   1560
ymax = max(Y)
ymax =   1200
k = [600 900 1000 1100];
px = zeros(1,4);

for i = 1:4
px(i) = (X>=k(i))*PX';
end
py = zeros(1,4);
for i = 1:4
py(i) = (Y>=k(i))*PY';
end
disp([px;py]')
0.4131    0.7765
0.4131    0.2560
0.3514    0.0784
0.0818    0.0111
M = u > t;
PM = total(M.*P)
PM = 0.5081          % P(Y>X)


## Exercise 17

Margaret considers five purchases in the amounts 5, 17, 21, 8, 15 dollars with respective probabilities 0.37, 0.22, 0.38, 0.81, 0.63. Anne contemplates six purchases in the amounts 8, 15, 12, 18, 15, 12 dollars. with respective probabilities 0.77, 0.52, 0.23, 0.41, 0.83, 0.58. Assume that all eleven possible purchases form an independent class.

1. What is the probability Anne spends at least twice as much as Margaret?
2. What is the probability Anne spends at least $30 more than Margaret? ### Solution cx = [5 17 21 8 15 0]; pmx = minprob(0.01*[37 22 38 81 63]); cy = [8 15 12 18 15 12 0]; pmy = minprob(0.01*[77 52 23 41 83 58]); [X,PX] = canonicf(cx,pmx); [Y,PY] = canonicf(cy,pmy); icalc Enter row matrix of X-values X Enter row matrix of Y-values Y Enter X probabilities PX Enter Y probabilities PY Use array operations on matrices X, Y, PX, PY, t, u, and P M1 = u >= 2*t; PM1 = total(M1.*P) PM1 = 0.3448 M2 = u - t >=30; PM2 = total(M2.*P) PM2 = 0.2431  ## Exercise 18 James is trying to decide which of two sales opportunities to take. • In the first, he makes three independent calls. Payoffs are$310, $380, and$350, with respective probabilities of 0.35, 0.41, and 0.57.
• In the second, he makes eight independent calls, with probability of success on each call p=0.57p=0.57. He realizes $100 profit on each successful sale. Let X be the net profit on the first alternative and Y be the net gain on the second. Assume the pair {X,Y}{X,Y} is independent. • Which alternative offers the maximum possible gain? • What is the probability the second exceeds the first— i.e., what is P(Y>X)P(Y>X)? • Compare probabilities in the two schemes that total sales are at least$600, $700,$750.

### Solution

cx = [310 380 350 0];
pmx = minprob(0.01*[35 41 57]);
Y  = 100*[0:8];
PY = ibinom(8,0.57,0:8);
canonic
Enter row vector of coefficients  cx
Enter row vector of minterm probabilities  pmx
Use row matrices X and PX for calculations
Call for XDBN to view the distribution
icalc
Enter row matrix of X-values  X
Enter row matrix of Y-values  Y
Enter X probabilities  PX
Enter Y probabilities  PY
Use array operations on matrices X, Y, PX, PY, t, u, and P
xmax = max(X)
xmax =  1040
ymax = max(Y)
ymax =   800
PYgX = total((u>t).*P)
PYgX =  0.5081
k = [600 700 750];
px = zeros(1,3);
py = zeros(1,3);
for i = 1:3
px(i) = (X>=k(i))*PX';
end
for i = 1:3
py(i) = (Y>=k(i))*PY';
end
disp([px;py]')
0.4131    0.2560
0.2337    0.0784
0.0818    0.0111


## Exercise 19

A residential College plans to raise money by selling “chances” on a board. There are two games:

• Game 1: Pay $5 to play; win$20 with probability p1=0.05p1=0.05 (one in twenty)
• Game 2: Pay $10 to play; win$30 with probability p2=0.2p2=0.2 (one in five)

Thirty chances are sold on Game 1 and fifty chances are sold on Game 2. If X and Y are the profits on the respective games, then

X = 30 · 5 - 20 N 1 and Y = 50 · 10 - 30 N 2 X = 30 · 5 - 20 N 1 and Y = 50 · 10 - 30 N 2
(9)

where N1,N2N1,N2 are the numbers of winners on the respective games. It is reasonable to suppose N1N1 binomial (30,0.05)(30,0.05) and N2N2 binomial (50,0.2)(50,0.2). It is reasonable to suppose the pair {N1,N2}{N1,N2} is independent, so that {X,Y}{X,Y} is independent. Determine the marginal distributions for X and Y then use icalc to obtain the joint distribution and the calculating matrices. The total profit for the College is Z=X+YZ=X+Y. What is the probability the College will lose money? What is the probability the profit will be $400 or more, less than$200, between $200 and$450?

### Solution

N1 = 0:30;
PN1 = ibinom(30,0.05,0:30);
x  = 150 - 20*N1;
[X,PX] = csort(x,PN1);
N2 = 0:50;
PN2 = ibinom(50,0.2,0:50);
y  = 500 - 30*N2;
[Y,PY] = csort(y,PN2);
icalc
Enter row matrix of X-values  X
Enter row matrix of Y-values  Y
Enter X probabilities  PX
Enter Y probabilities  PY
Use array operations on matrices X, Y, PX, PY, t, u, and P
G = t + u;
Mlose = G < 0;
Mm400  = G >= 400;
Ml200  = G < 200;
M200_450  = (G>=200)&(G<=450);
Plose = total(Mlose.*P)
Plose =   3.5249e-04
Pm400 = total(Mm400.*P)
Pm400 =   0.1957
Pl200 = total(Ml200.*P)
Pl200 =
0.0828
P200_450 = total(M200_450.*P)
P200_450 =  0.8636


## Exercise 20

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 ]
(10)

Let W=3X-4Y+2ZW=3X-4Y+2Z. Determine the distribution for W and from this determine P(W>0)P(W>0) and P(-20W10)P(-20W10). Do this with icalc, then repeat with icalc3 and compare results.

### Solution

Since icalc uses X and PXPX in its output, we avoid a renaming problem by using x and pxpx for data vectors X and PXPX.

x = [-5 -1 3 4 7];
px = 0.01*[15 20 30 25 10];
icalc
Enter row matrix of X-values  3*x
Enter row matrix of Y-values  -4*x
Enter X probabilities  px
Enter Y probabilities  px
Use array operations on matrices X, Y, PX, PY, t, u, and P
a = t + u;
[V,PV] = csort(a,P);
icalc
Enter row matrix of X-values  V
Enter row matrix of Y-values  2*x
Enter X probabilities  PV
Enter Y probabilities  px
Use array operations on matrices X, Y, PX, PY, t, u, and P
b = t + u;
[W,PW] = csort(b,P);
P1 = (W>0)*PW'
P1 =  0.5300
P2 = ((-20<=W)&(W<=10))*PW'
P2 =  0.5514
icalc3                           % Alternate using 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
a = 3*t - 4*u + 2*v;
[W,PW] = csort(a,P);
P1 = (W>0)*PW'
P1 = 0.5300
P2 = ((-20<=W)&(W<=10))*PW'
P2 = 0.5514


## Exercise 21

The class {A,B,C,D,E,F}{A,B,C,D,E,F} is independent; the respective probabilites for these events are {0.46,0.27,0.33,0.47,0.37,0.41}{0.46,0.27,0.33,0.47,0.37,0.41}. Consider the simple random variables

X = 3 I A - 9 I B + 4 I C , Y = - 2 I D + 6 I E + 2 I F - 3 , and Z = 2 X - 3 Y X = 3 I A - 9 I B + 4 I C , Y = - 2 I D + 6 I E + 2 I F - 3 , and Z = 2 X - 3 Y
(11)

Determine P(Y>X)P(Y>X), P(Z>0)P(Z>0), P(5Z25)P(5Z25).

### Solution

cx = [3 -9 4 0];
pmx = minprob(0.01*[42 27 33]);
cy = [-2 6 2 -3];
pmy = minprob(0.01*[47 37 41]);
[X,PX] = canonicf(cx,pmx);
[Y,PY] = canonicf(cy,pmy);
icalc
Enter row matrix of X-values  X
Enter row matrix of Y-values  Y
Enter X probabilities  PX
Enter Y probabilities  PY
Use array operations on matrices X, Y, PX, PY, t, u, and P
G = 2*t - 3*u;
[Z,PZ] = csort(G,P);
PYgX = total((u>t).*P)
PYgX =  0.3752
PZpos = (Z>0)*PZ'
PZpos = 0.5654
P5Z25 = ((5<=Z)&(Z<=25))*PZ'
P5Z25 = 0.4745


## Exercise 22

Two players, Ronald and Mike, throw a pair of dice 30 times each. What is the probability Mike throws more “sevens” than does Ronald?

### Solution

P = (ibinom(30,1/6,0:29))*(cbinom(30,1/6,1:30))' = 0.4307

## Exercise 23

A class has fifteen boys and fifteen girls. They pair up and each tosses a coin 20 times. What is the probability that at least eight girls throw more heads than their partners?

### Solution

pg = (ibinom(20,1/2,0:19))*(cbinom(20,1/2,1:20))'
pg =  0.4373             % Probability each girl throws more
P = cbinom(15,pg,8)
P =   0.3100             % Probability eight or more girls throw more


## Exercise 24

Glenn makes five sales calls, with probabilities 0.370.37, 0.520.52, 0.480.48, 0.710.71, 0.630.63, of success on the respective calls. Margaret makes four sales calls with probabilities 0.770.77, 0.820.82, 0.750.75, 0.910.91, of success on the respective calls. Assume that all nine events form an independent class. If Glenn realizes a profit of $18.00 on each sale and Margaret earns$20.00 on each sale, what is the probability Margaret's gain is at least $10.00 more than Glenn's? ### Solution cg = [18*ones(1,5) 0]; cm = [20*ones(1,4) 0]; pmg = minprob(0.01*[37 52 48 71 63]); pmm = minprob(0.01*[77 82 75 91]); [G,PG] = canonicf(cg,pmg); [M,PM] = canonicf(cm,pmm); icalc Enter row matrix of X-values G Enter row matrix of Y-values M Enter X probabilities PG Enter Y probabilities PM Use array operations on matrices X, Y, PX, PY, t, u, and P H = u-t>=10; p1 = total(H.*P) p1 = 0.5197  ## Exercise 25 Mike and Harry have a basketball shooting contest. • Mike shoots 10 ordinary free throws, worth two points each, with probability 0.75 of success on each shot. • Harry shoots 12 “three point” shots, with probability 0.40 of success on each shot. Let X,YX,Y be the number of points scored by Mike and Harry, respectively. Determine P(X15)P(X15), and P(Y15),P(XY)P(Y15),P(XY). ### Solution X = 2*[0:10]; PX = ibinom(10,0.75,0:10); Y = 3*[0:12]; PY = ibinom(12,0.40,0:12); icalc Enter row matrix of X-values X Enter row matrix of Y-values Y Enter X probabilities PX Enter Y probabilities PY Use array operations on matrices X, Y, PX, PY, t, u, and P PX15 = (X>=15)*PX' PX15 = 0.5256 PY15 = (Y>=15)*PY' PY15 = 0.5618 G = t>=u; PG = total(G.*P) PG = 0.5811  ## Exercise 26 Martha has the choice of two games. • Game 1: Pay ten dollars for each “play.” If she wins, she receives$20, for a net gain of $10 on the play; otherwise, she loses her$10. The probability of a win is 1/2, so the game is “fair.”
• Game 2: Pay five dollars to play; receive $15 for a win. The probability of a win on any play is 1/3. Martha has$100 to bet. She is trying to decide whether to play Game 1 ten times or Game 2 twenty times. Let W1W1 and W2W2 be the respective net winnings (payoff minus fee to play).

• Determine P(W2W1)P(W2W1).
• Compare the two games further by calculating P(W1>0)P(W1>0) and P(W2>0)P(W2>0)

Which game seems preferable?

### Solution

W1 = 20*[0:10] - 100;
PW1 = ibinom(10,1/2,0:10);
W2 = 15*[0:20] - 100;
PW2 = ibinom(20,1/3,0:20);
P1pos = (W1>0)*PW1'
P1pos = 0.3770
P2pos = (W2>0)*PW2'
P2pos = 0.5207
icalc
Enter row matrix of X-values  W1
Enter row matrix of Y-values  W2
Enter X probabilities  PW1
Enter Y probabilities  PW2
Use array operations on matrices X, Y, PX, PY, t, u, and P
G = u >= t;
PG = total(G.*P)
PG =  0.5182


## Exercise 27

Jim and Bill of the men's basketball team challenge women players Mary and Ellen to a free throw contest. Each takes five free throws. Make the usual independence assumptions. Jim, Bill, Mary, and Ellen have respective probabilities p=0.82,0.87,0.80p=0.82,0.87,0.80, and 0.85 of making each shot tried. What is the probability Mary and Ellen make a total number of free throws at least as great as the total made by the guys?

### Solution

x = 0:5;
PJ = ibinom(5,0.82,x);
PB = ibinom(5,0.87,x);
PM = ibinom(5,0.80,x);
PE = ibinom(5,0.85,x);

icalc
Enter row matrix of X-values  x
Enter row matrix of Y-values  x
Enter X probabilities  PJ
Enter Y probabilities  PB
Use array operations on matrices X, Y, PX, PY, t, u, and P
H = t+u;
[Tm,Pm] = csort(H,P);
icalc
Enter row matrix of X-values  x
Enter row matrix of Y-values  x
Enter X probabilities  PM
Enter Y probabilities  PE
Use array operations on matrices X, Y, PX, PY, t, u, and P
G = t+u;
[Tw,Pw] = csort(G,P);
icalc
Enter row matrix of X-values  Tm
Enter row matrix of Y-values  Tw
Enter X probabilities  Pm
Enter Y probabilities  Pw
Use array operations on matrices X, Y, PX, PY, t, u, and P
Gw = u>=t;
PGw = total(Gw.*P)
PGw = 0.5746

icalc4               % Alternate using icalc4
Enter row matrix of X-values  x
Enter row matrix of Y-values  x
Enter row matrix of Z-values  x
Enter row matrix of W-values  x
Enter X probabilities  PJ
Enter Y probabilities  PB
Enter Z probabilities  PM
Enter W probabilities  PE
Use array operations on matrices X, Y, Z,W
PX, PY, PZ, PW t, u, v, w, and P
H = v+w >= t+u;
PH = total(H.*P)
PH =  0.5746


## 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.

PDF | EPUB (?)

### What is an EPUB file?

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

#### Collection to:

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

#### Module to:

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