Skip to content Skip to navigation Skip to collection information

Connexions

You are here: Home » Content » Applied Probability » Problems on Random Selection

Navigation

Table of Contents

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? tag icon

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

This content is ...

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.
 

Problems on Random Selection

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

Exercise 1

(See Exercise 3 from "Problems on Random Variables and Joint Distributions") 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 distribution for Y.

Solution

PX = [0 (1/6)*ones(1,6)];
PY = [0.5 0.5];
gend
Do not forget zero coefficients for missing powers
Enter gen fn COEFFICIENTS for gN  PX
Enter gen fn COEFFICIENTS for gY  PY
Results are in N, PN, Y, PY, D, PD, P
May use jcalc or jcalcf on N, D, P
To view the distribution, call for gD.
disp(gD)             % Compare with P8-3
         0    0.1641
    1.0000    0.3125
    2.0000    0.2578
    3.0000    0.1667
    4.0000    0.0755
    5.0000    0.0208
    6.0000    0.0026

Exercise 2

(See Exercise 4 from "Problems on Random Variables and Joint Distributions") As a variation of Exercise 1, suppose a pair of dice is rolled instead of a single die. Determine the distribution for Y.

Solution

PN = (1/36)*[0 0 1 2 3 4 5 6 5 4 3 2 1];
PY = [0.5 0.5];
gend
Do not forget zero coefficients for missing powers
Enter gen fn COEFFICIENTS for gN  PN
Enter gen fn COEFFICIENTS for gY  PY
Results are in N, PN, Y, PY, D, PD, P
May use jcalc or jcalcf on N, D, P
To view the distribution, call for gD.
disp(gD)
         0    0.0269
    1.0000    0.1025
    2.0000    0.1823
    3.0000    0.2158
    4.0000    0.1954
    5.0000    0.1400
    6.0000    0.0806
    7.0000    0.0375
    8.0000    0.0140     % (Continued next page)
    9.0000    0.0040
   10.0000    0.0008
   11.0000    0.0001
   12.0000    0.0000

Exercise 3

(See Exercise 5 from "Problems on Random Variables and Joint Distributions") 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 distribution for Y. What is the probability of three or more sevens?

Solution

PX = (1/36)*[0 0 1 2 3 4 5 6 5 4 3 2 1];
PY = [5/6 1/6];
gend
Do not forget zero coefficients for missing powers
Enter gen fn COEFFICIENTS for gN  PX
Enter gen fn COEFFICIENTS for gY  PY
Results are in N, PN, Y, PY, D, PD, P
May use jcalc or jcalcf on N, D, P
To view the distribution, call for gD.
disp(gD)
         0    0.3072
    1.0000    0.3660
    2.0000    0.2152
    3.0000    0.0828
    4.0000    0.0230
    5.0000    0.0048
    6.0000    0.0008
    7.0000    0.0001
    8.0000    0.0000
    9.0000    0.0000
   10.0000    0.0000
   11.0000    0.0000
   12.0000    0.0000
   P = (D>=3)*PD'
P =  0.1116

Exercise 4

(See Example 7 from "Conditional Expectation, Regression") A number X is chosen by a random selection from the integers 1 through 20 (say by drawing a card from a box). A pair of dice is thrown X times. Let Y be the number of “matches” (i.e., both ones, both twos, etc.). Determine the distribution for Y.

Solution

gN = (1/20)*[0 ones(1,20)];
gY = [5/6 1/6];
gend
Do not forget zero coefficients for missing powers
Enter gen fn COEFFICIENTS for gN  gN
Enter gen fn COEFFICIENTS for gY  gY
Results are in N, PN, Y, PY, D, PD, P
May use jcalc or jcalcf on N, D, P
To view the distribution, call for gD.
 
disp(gD)
         0    0.2435
    1.0000    0.2661
    2.0000    0.2113
    3.0000    0.1419
    4.0000    0.0795
    5.0000    0.0370
    6.0000    0.0144
    7.0000    0.0047
    8.0000    0.0013
    9.0000    0.0003
   10.0000    0.0001
   11.0000    0.0000
   12.0000    0.0000
   13.0000    0.0000
   14.0000    0.0000
   15.0000    0.0000
   16.0000    0.0000
   17.0000    0.0000
   18.0000    0.0000
   19.0000    0.0000
   20.0000    0.0000

Exercise 5

(See Exercise 20 from "Problems on Conditional Expectation, Regression") A number X is selected randomly from the integers 1 through 100. A pair of dice is thrown X times. Let Y be the number of sevens thrown on the X tosses. Determine the distribution for Y. Determine E[Y]E[Y] and P(Y20)P(Y20).

Solution

gN = 0.01*[0 ones(1,100)];
gY = [5/6 1/6];
gend
Do not forget zero coefficients for missing powers
Enter gen fn COEFFICIENTS for gN  gN
Enter gen fn COEFFICIENTS for gY  gY
Results are in N, PN, Y, PY, D, PD, P
May use jcalc or jcalcf on N, D, P
To view the distribution, call for gD.
EY = dot(D,PD)
EY =   8.4167
P20 = (D<=20)*PD'
P20 =  0.9837

Exercise 6

(See Exercise 21 from "Problems on Conditional Expectation, Regression") A number X is selected randomly from the integers 1 through 100. Each of two people draw X times independently and randomly a number from 1 to 10. Let Y be the number of matches (i.e., both draw ones, both draw twos, etc.). Determine the distribution for Y. Determine E[Y]E[Y] and P(Y10)P(Y10).

Solution

gN = 0.01*[0 ones(1,100)];
gY = [0.9 0.1];
gend
Do not forget zero coefficients for missing powers
Enter gen fn COEFFICIENTS for gN  gN
Enter gen fn COEFFICIENTS for gY  gY
Results are in N, PN, Y, PY, D, PD, P
May use jcalc or jcalcf on N, D, P
To view the distribution, call for gD.
EY = dot(D,PD)
EY =  5.0500
P10 = (D<=10)*PD'
P10 = 0.9188

Exercise 7

Suppose the number of entries in a contest is NN binomial (20, 0.4). There are four questions. Let Yi be the number of questions answered correctly by the ith contestant. Suppose the Yi are iid, with common distribution

Y = [ 1 2 3 4 ] P Y = [ 0 . 2 0 . 4 0 . 3 0 . 1 ] Y = [ 1 2 3 4 ] P Y = [ 0 . 2 0 . 4 0 . 3 0 . 1 ]
(1)

Let D be the total number of correct answers. Determine E[D], Var [D]E[D], Var [D], P(15D25)P(15D25), and P(10D30)P(10D30).

Solution

gN = ibinom(20,0.4,0:20);
gY = 0.1*[0 2 4 3 1];
gend
Do not forget zero coefficients for missing powers
Enter gen fn COEFFICIENTS for gN  gN
Enter gen fn COEFFICIENTS for gY  gY
Results are in N, PN, Y, PY, D, PD, P
May use jcalc or jcalcf on N, D, P
To view the distribution, call for gD.
ED = dot(D,PD)
ED =  18.4000
VD = (D.^2)*PD' - ED^2
VD =  31.8720
P1 = ((15<=D)&(D<=25))*PD'
P1 =   0.6386
P2 = ((10<=D)&(D<=30))*PD'
P2 =   0.9290

Exercise 8

Game wardens are making an aerial survey of the number of deer in a park. The number of herds to be sighted is assumed to be a random variable NN binomial (20, 0.5). Each herd is assumed to be from 1 to 10 in size, with probabilities

Table 1
Value 1 2 3 4 5 6 7 8 9 10
Probability 0.05 0.10 0.15 0.20 0.15 0.10 0.10 0.05 0.05 0.05

Let D be the number of deer sighted under this model. Determine P(Dt)P(Dt) for t=25,50,75,100t=25,50,75,100
and P(D90)P(D90).

Solution

gN = ibinom(20,0.5,0:20);
gY = 0.01*[0 5 10 15 20 15 10 10 5 5 5];
gend
Do not forget zero coefficients for missing powers
Enter gen fn COEFFICIENTS for gN  gN
Enter gen fn COEFFICIENTS for gY  gY
Results are in N, PN, Y, PY, D, PD, P
May use jcalc or jcalcf on N, D, P
To view the distribution, call for gD.
k = [25 50 75 100];
P = zeros(1,4);
for i = 1:4
    P(i) = (D<=k(i))*PD';
end
disp(P)
    0.0310    0.5578    0.9725    0.9998

Exercise 9

A supply house stocks seven popular items. The table below shows the values of the items and the probability of each being selected by a customer.

Table 2
Value 12.50 25.00 30.50 40.00 42.50 50.00 60.00
Probability 0.10 0.15 0.20 0.20 0.15 0.10 0.10

Suppose the purchases of customers are iid, and the number of customers in a day is binomial (10,0.5). Determine the distribution for the total demand D.

  1. How many different possible values are there? What is the maximum possible total sales?
  2. Determine E[D]E[D] and P(Dt)P(Dt) for t=100,150,200,250,300t=100,150,200,250,300.
    Determine P(100<D200)P(100<D200).

Solution

gN = ibinom(10,0.5,0:10);
Y  = [12.5 25 30.5 40 42.5 50 60];
PY = 0.01*[10 15 20 20 15 10 10];
mgd
Enter gen fn COEFFICIENTS for gN  gN
Enter VALUES for Y  Y
Enter PROBABILITIES for Y  PY
Values are in row matrix D; probabilities are in PD.
To view the distribution, call for mD.
s = size(D)
s =    1   839
M = max(D)
M =    590
t = [100 150 200 250 300];
P = zeros(1,5);
for i = 1:5
    P(i) = (D<=t(i))*PD';
end
disp(P)
    0.1012    0.3184    0.6156    0.8497    0.9614
P1 = ((100<D)&(D<=200))*PD'
P1 =   0.5144

Exercise 10

A game is played as follows:

  1. A wheel is spun, giving one of the integers 0 through 9 on an equally likely basis.
  2. A single die is thrown the number of times indicated by the result of the spin of the wheel. The number of points made is the total of the numbers turned up on the sequence of throws of the die.
  3. A player pays sixteen dollars to play; a dollar is returned for each point made.

Let Y represent the number of points made and X=Y-16X=Y-16 be the net gain (possibly negative) of the player. Determine the maximum value of

X, E[X]E[X], Var [X] Var [X], P(X>0)P(X>0), P(X>=10)P(X>=10), P(X>=16)P(X>=16).

Solution

gn = 0.1*ones(1,10);
gy = (1/6)*[0 ones(1,6)];
[Y,PY] = gendf(gn,gy);
[X,PX] = csort(Y-16,PY);
M = max(X)
M =  38
EX = dot(X,PX)               % Check EX = En*Ey - 16 = 4.5*3.5
EX  =  -0.2500               % 4.5*3.5 - 16 = -0.25
VX = dot(X.^2,PX) - EX^2
VX =  114.1875
Ppos = (X>0)*PX'
Ppos =  0.4667
P10 = (X>=10)*PX'
P10 =   0.2147
P16 = (X>=16)*PX'
P16 =   0.0803

Exercise 11

Marvin calls on four customers. With probability p1=0.6p1=0.6 he makes a sale in each case. Geraldine calls on five customers, with probability p2=0.5p2=0.5 of a sale in each case. Customers who buy do so on an iid basis, and order an amount Yi (in dollars) with common distribution:

Y = [ 200 220 240 260 280 300 ] P Y = [ 0 . 10 0 . 15 0 . 25 0 . 25 0 . 15 0 . 10 ] Y = [ 200 220 240 260 280 300 ] P Y = [ 0 . 10 0 . 15 0 . 25 0 . 25 0 . 15 0 . 10 ]
(2)

Let D1 be the total sales for Marvin and D2 the total sales for Geraldine. Let D=D1+D2D=D1+D2. Determine the distribution and mean and variance for D1, D2, and D. Determine P(D1D2)P(D1D2) and P(D1500)P(D1500), P(D1000)P(D1000), and P(D750)P(D750).

Solution

gnM = ibinom(4,0.6,0:4);
gnG = ibinom(5,0.5,0:5);
Y = 200:20:300;
PY = 0.01*[10 15 25 25 15 10];
[D1,PD1] = mgdf(gnM,Y,PY);
[D2,PD2] = mgdf(gnG,Y,PY);
ED1 = dot(D1,PD1)
ED1 =  600.0000              % Check: ED1 = EnM*EY = 2.4*250
VD1 = dot(D1.^2,PD1) - ED1^2
VD1 =    6.1968e+04
ED2 = dot(D2,PD2)
ED2 =  625.0000              % Check: ED2 = EnG*EY = 2.5*250
VD2 = dot(D2.^2,PD2) - ED2^2
VD2 =    8.0175e+04
[D1,D2,t,u,PD1,PD2,P] = icalcf(D1,D2,PD1,PD2);
Use array opertions on matrices X, Y, PX, PY, t, u, and P
[D,PD] = csort(t+u,P);
ED = dot(D,PD)
ED =   1.2250e+03
eD = ED1 + ED2              % Check: ED = ED1 + ED2
eD =   1.2250e+03           % (Continued next page)
 
VD = dot(D.^2,PD) - ED^2
VD =   1.4214e+05
vD = VD1 + VD2            % Check: VD = VD1 + VD2
vD =   1.4214e+05
P1g2 = total((t>u).*P)
P1g2 = 0.4612
k = [1500 1000 750];
PDk = zeros(1,3);
for i = 1:3
   PDk(i) = (D>=k(i))*PD';
end
disp(PDk)
    0.2556    0.7326    0.8872

Exercise 12

A questionnaire is sent to twenty persons. The number who reply is a random number NN binomial (20, 0.7). If each respondent has probability p=0.8p=0.8 of favoring a certain proposition, what is the probability of ten or more favorable replies? Of fifteen or more?

Solution

gN = ibinom(20,0.7,0:20);
gY = [0.2 0.8];
gend
Do not forget zero coefficients for missing powers
Enter gen fn COEFFICIENTS for gN  gN
Enter gen fn COEFFICIENTS for gY  gY
Results are in N, PN, Y, PY, D, PD, P
May use jcalc or jcalcf on N, D, P
To view the distribution, call for gD.
P10 = (D>=10)*PD'
P10 =   0.7788
P15 = (D>=15)*PD'
P15 =   0.0660
pD = ibinom(20,0.7*0.8,0:20);  % Alternate: use D binomial (pp0)
D = 0:20;
p10 = (D>=10)*pD'
p10 =  0.7788
p15 = (D>=15)*pD'
p15 =  0.0660

Exercise 13

A random number N of students take a qualifying exam. A grade of 70 or more earns a pass. Suppose NN binomial (20, 0.3). If each student has probability p=0.7p=0.7 of making 70 or more, what is the probability all will pass? Ten or more will pass?

Solution

gN = ibinom(20,0.3,0:20);
gY = [0.3 0.7];
gend
Do not forget zero coefficients for missing powers
Enter gen fn COEFFICIENTS for gN  gN
Enter gen fn COEFFICIENTS for gY  gY
Results are in N, PN, Y, PY, D, PD, P
May use jcalc or jcalcf on N, D, P
To view the distribution, call for gD.
Pall = (D==20)*PD'
Pall =  2.7822e-14
pall = (0.3*0.7)^20    % Alternate: use D binomial (pp0)
pall =  2.7822e-14
P10 = (D >= 10)*PD'
P10 = 0.0038

Exercise 14

Five hundred questionnaires are sent out. The probability of a reply is 0.6. The probability that a reply will be favorable is 0.75. What is the probability of at least 200, 225, 250 favorable replies?

Solution

n = 500;
p = 0.6;
p0 = 0.75;
D = 0:500;
PD = ibinom(500,p*p0,D);
k = [200 225 250];
P = zeros(1,3);
for i = 1:3
   P(i) = (D>=k(i))*PD';
end
disp(P)
    0.9893    0.5173    0.0140

Exercise 15

Suppose the number of Japanese visitors to Florida in a week is N1N1 Poisson (500) and the number of German visitors is N2N2 Poisson (300). If 25 percent of the Japanese and 20 percent of the Germans visit Disney World, what is the distribution for the total number D of German and Japanese visitors to the park? Determine P(Dk)P(Dk) for k=150,155,,245,250k=150,155,,245,250.

Solution

JDJD Poisson (500*0.25 = 125); GDGD Poisson (300*0.20 = 60); DD Poisson (185).

k = 150:5:250;
PD = cpoisson(185,k);
disp([k;PD]')
  150.0000    0.9964
  155.0000    0.9892
  160.0000    0.9718
  165.0000    0.9362
  170.0000    0.8736
  175.0000    0.7785
  180.0000    0.6532  
  185.0000    0.5098
  190.0000    0.3663
  195.0000    0.2405
  200.0000    0.1435
  205.0000    0.0776
  210.0000    0.0379
  215.0000    0.0167
  220.0000    0.0067
  225.0000    0.0024
  230.0000    0.0008
  235.0000    0.0002
  240.0000    0.0001
  245.0000    0.0000
  250.0000    0.0000

Exercise 16

A junction point in a network has two incoming lines and two outgoing lines. The number of incoming messages N1 on line one in one hour is Poisson (50); on line 2 the number is N2N2 Poisson (45). On incoming line 1 the messages have probability p1a=0.33p1a=0.33 of leaving on outgoing line a and 1-p1a1-p1a of leaving on line b. The messages coming in on line 2 have probability p2a=0.47p2a=0.47 of leaving on line a. Under the usual independence assumptions, what is the distribution of outgoing messages on line a? What are the probabilities of at least 30, 35, 40 outgoing messages on line a?

Solution

m1a = 50*0.33;  m2a = 45*0.47; ma = m1a + m2a;
PNa = cpoisson(ma,[30 35 40])
PNa =   0.9119    0.6890    0.3722

Exercise 17

A computer store sells Macintosh, HP, and various other IBM compatible personal computers. It has two major sources of customers:

  1. Students and faculty from a nearby university
  2. General customers for home and business computing. Suppose the following assumptions are reasonable for monthly purchases.
  • The number of university buyers N1N1 Poisson (30). The probabilities for Mac, HP, others are 0.4, 0.2, 0.4, respectively.
  • The number of non-university buyers N2N2 Poisson (65). The respective probabilities for Mac, HP, others are 0.2, 0.3, 0.5.
  • For each group, the composite demand assumptions are reasonable, and the two groups buy independently.

What is the distribution for the number of Mac sales? What is the distribution for the total number of Mac and Dell sales?

Solution

Mac sales Poisson (30*0.4 + 65*0.2 = 25); HP sales Poisson (30*0.2 + 65*0.3 = 25.5); total Mac plus HP sales Poisson(50.5).

Exercise 18

The number N of “hits” in a day on a Web site on the internet is Poisson (80). Suppose the probability is 0.10 that any hit results in a sale, is 0.30 that the result is a request for information, and is 0.60 that the inquirer just browses but does not identify an interest. What is the probability of 10 or more sales? What is the probability that the number of sales is at least half the number of information requests (use suitable simple approximations)?

Solution

X = 0:30;
Y = 0:80;
PX = ipoisson(80*0.1,X);
PY = ipoisson(80*0.3,Y);
icalc:  X  Y  PX  PY
- - - - - - - - - - - -
PX10 = (X>=10)*PX'    % Approximate calculation
PX10 =  0.2834
pX10 = cpoisson(8,10)   % Direct calculation
pX10 =  0.2834
M = t>=0.5*u;
PM = total(M.*P)
PM =    0.1572

Exercise 19

The number N of orders sent to the shipping department of a mail order house is Poisson (700). Orders require one of seven kinds of boxes, which with packing costs have distribution

Table 3
Cost (dollars) 0.75 1.25 2.00 2.50 3.00 3.50 4.00
Probability 0.10 0.15 0.15 0.25 0.20 0.10 0.05

What is the probability the total cost of the $2.50 boxes is no greater than $475? What is the probability the cost of the $2.50 boxes is greater than the cost of the $3.00 boxes? What is the probability the cost of the $2.50 boxes is not more than $50.00 greater than the cost of the $3.00 boxes? Suggestion. Truncate the Poisson distributions at about twice the mean value.

Solution

X = 0:400;
Y = 0:300;
PX = ipoisson(700*0.25,X);
PY = ipoisson(700*0.20,Y);
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
P1 = (2.5*X<=475)*PX'
P1 =   0.8785
M = 2.5*t<=(3*u + 50);
PM = total(M.*P)
PM =   0.7500

Exercise 20

One car in 5 in a certain community is a Volvo. If the number of cars passing a traffic check point in an hour is Poisson (130), what is the expected number of Volvos? What is the probability of at least 30 Volvos? What is the probability the number of Volvos is between 16 and 40 (inclusive)?

Solution

P1 = cpoisson(130*0.2,30) = 0.2407
P2 = cpoisson(26,16) - cpoisson(26,41) = 0.9819

Exercise 21

A service center on an interstate highway experiences customers in a one-hour period as follows:

  • Northbound: Total vehicles: Poisson (200). Twenty percent are trucks.
  • Southbound: Total vehicles: Poisson (180). Twenty five percent are trucks.
  • Each truck has one or two persons, with respective probabilities 0.7 and 0.3.
  • Each car has 1, 2, 3, 4, or 5 persons, with probabilities 0.3, 0.3, 0.2, 0.1, 0.1, respectively

Under the usual independence assumptions, let D be the number of persons to be served. Determine E[D]E[D], Var [D] Var [D], and the generating function gD(s)gD(s).

Solution

TT Poisson (200*0.2 + 180*0.25 = 85), PP Poisson (200*0.8 + 180*0.75 = 295).

a =   85
b = 200*0.8 + 180*0.75
b =  295
YT = [1 2];
PYT = [0.7 0.3];
EYT = dot(YT,PYT)
EYT =  1.3000
VYT = dot(YT.^2,PYT) - EYT^2
VYT =  0.2100
YP = 1:5;
PYP = 0.1*[3 3 2 1 1];
EYP = dot(YP,PYP)
EYP =  2.4000
VYP = dot(YP.^2,PYP) - EYP^2
VYP =   1.6400
EDT = 85*EYT
EDT =  110.5000  
EDP = 295*EYP
EDP =  708.0000
ED = EDT + EDP
ED =  818.5000
VT = 85*(VYT + EYT^2)
VT =  161.5000
VP = 295*(VYP + EYP^2)
VP =    2183
VD = VT + VP
VD =   2.2705e+03
 
NT = 0:180;                   % Possible alternative
gNT = ipoisson(85,NT);
gYT = 0.1*[0 7 3];
[DT,PDT] = gendf(gNT,gYT);
EDT = dot(DT,PDT)
EDT =  110.5000
VDT = dot(DT.^2,PDT) - EDT^2
VDT =  161.5000
NP = 0:500;
gNP = ipoisson(295,NP);
gYP = 0.1*[0 3 2 2 1 1];
[DP,PDP] = gendf(gNP,gYP);     %  Requires too much memory
g D T ( s ) = exp ( 85 ( 0 . 7 s + 0 . 3 s 2 - 1 )) g D P ( s ) = exp ( 295 ( 0 . 1 ( 3 s + 3 s 2 2 s 3 + s 4 + s 5 ) - 1 ) ) g D T ( s ) = exp ( 85 ( 0 . 7 s + 0 . 3 s 2 - 1 )) g D P ( s ) = exp ( 295 ( 0 . 1 ( 3 s + 3 s 2 2 s 3 + s 4 + s 5 ) - 1 ) )
(3)
g D ( s ) = g D T ( s ) g D P ( s ) g D ( s ) = g D T ( s ) g D P ( s )
(4)

Exercise 22

The number N of customers in a shop in a given day is Poisson (120). Customers pay with cash or by MasterCard or Visa charge cards, with respective probabilties 0.25, 0.40, 0.35. Make the usual independence assumptions. Let N1, N2, N3 be the numbers of cash sales, MasterCard charges, Visa card charges, respectively. Determine P(N130)P(N130), P(N260)P(N260), P(N350)P(N350), and P(N2>N3)P(N2>N3).

Solution

X = 0:120;
PX = ipoisson(120*0.4,X);
Y = 0:120;
PY = ipoisson(120*0.35,Y);
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 opertions on matrices X, Y, PX, PY, t, u, and P
M = t > u;
PM = total(M.*P)
PM =    0.7190

Exercise 23

A discount retail store has two outlets in Houston, with a common warehouse. Customer requests are phoned to the warehouse for pickup. Two items, a and b, are featured in a special sale. The number of orders in a day from store A is NANA Poisson (30); from store B, the nember of orders is NBNB Poisson (40).

For store A, the probability an order for a is 0.3, and for b is 0.7.

For store B, the probability an order for a is 0.4, and for b is 0.6. What is the probability the total order for item b in a day is 50 or more?

Solution

P = cpoisson(30*0.7+40*0.6,50) = 0.2468

Exercise 24

The number of bids on a job is a random variable NN binomial (7, 0.6). Bids (in thousands of dollars) are iid with Y uniform on [3,5][3,5]. What is the probability of at least one bid of $3,500 or less? Note that “no bid” is not a bid of 0.

Solution

% First solution ---  FY(t) = 1 - gN[P(Y>t)]
P = 1-(0.4 + 0.6*0.75)^7
P  =    0.6794
% Second solution --- Positive number of satisfactory bids,
% i.e. the outcome is indicator for event E, with P(E) = 0.25
pN = ibinom(7,0.6,0:7);
gY = [3/4 1/4];         % Generator function for indicator
[D,PD] = gendf(pN,gY);  % D is number of successes
Pa = (D>0)*PD'          % D>0 means at least one successful bid
Pa =    0.6794

Exercise 25

The number of customers during the noon hour at a bank teller's station is a random number N with distribution

N = 1 : 10 , P N = 0 . 01 * [ 5 7 10 11 12 13 12 11 10 9 ] N = 1 : 10 , P N = 0 . 01 * [ 5 7 10 11 12 13 12 11 10 9 ]
(5)

The amounts they want to withdraw can be represented by an iid class having the common distribution YY exponential (0.01). Determine the probabilities that the maximum withdrawal is less than or equal to t for t=100,200,300,400,500t=100,200,300,400,500.

Solution

Use FW(t)=gN[P(YT)]FW(t)=gN[P(YT)]

gN = 0.01*[0 5 7 10 11 12 13 12 11 10 9];
t = 100:100:500;
PY = 1 - exp(-0.01*t);
FW = polyval(fliplr(gN),PY)  % fliplr puts coeficients in
                             % descending order of powers
FW =    0.1330    0.4598    0.7490    0.8989    0.9615

Exercise 26

A job is put out for bids. Experience indicates the number N of bids is a random variable having values 0 through 8, with respective probabilities

Table 4
Value 0 1 2 3 4 5 6 7 8
Probability 0.05 0.10 0.15 0.20 0.20 0.10 0.10 0.07 0.03

The market is such that bids (in thousands of dollars) are iid, uniform [100, 200]. Determine the probability of at least one bid of $125,000 or less.

Solution

Probability of a successful bid PY=(125-100)/100=0.25PY=(125-100)/100=0.25

PY =0.25;
gN = 0.01*[5 10 15 20 20 10 10 7 3];
P = 1 - polyval(fliplr(gN),PY)
P =  0.9116

Exercise 27

A property is offered for sale. Experience indicates the number N of bids is a random variable having values 0 through 10, with respective probabilities

Table 5
Value 0 1 2 3 4 5 6 7 8 9 10
Probability 0.05 0.15 0.15 0.20 0.10 0.10 0.05 0.05 0.05 0.05 0.05

The market is such that bids (in thousands of dollars) are iid, uniform [150, 200] Determine the probability of at least one bid of $180,000 or more.

Solution

Consider a sequence of N trials with probabiliy p=(180-150)/50=0.6p=(180-150)/50=0.6.

gN = 0.01*[5 15 15 20 10 10 5 5 5 5 5];
gY = [0.4 0.6];
[D,PD] = gendf(gN,gY);
P = (D>0)*PD'
P =   0.8493

Exercise 28

A property is offered for sale. Experience indicates the number N of bids is a random variable having values 0 through 8, with respective probabilities

Table 6
Number 0 1 2 3 4 5 6 7 8
Probability 0.05 0.15 0.15 0.20 0.15 0.10 0.10 0.05 0.05

The market is such that bids (in thousands of dollars) are iid symmetric triangular on [150 250]. Determine the probability of at least one bid of $210,000 or more.

Solution

gN = 0.01*[5 15 15 20 15 10 10 5 5];
PY = 0.5 + 0.5*(1 - (4/5)^2)
PY = 0.6800
>> PW = 1 - polyval(fliplr(gN),PY)
PW = 0.6536
%alternate
gY = [0.68 0.32];
[D,PD] = gendf(gN,gY);
P = (D>0)*PD'
P = 0.6536

Exercise 29

Suppose NN binomial (10,0.3)(10,0.3) and the Yi are iid, uniform on [10,20][10,20]. Let V be the minimum of the N values of the Yi. Determine P(V>t)P(V>t) for integer values from 10 to 20.

Solution

gN = ibinom(10,0.3,0:10);
t = 10:20;
p = 0.1*(20 - t);
P = polyval(fliplr(gN),p) - 0.7^10
P =
  Columns 1 through 7
    0.9718    0.7092    0.5104    0.3612    0.2503    0.1686    0.1092
  Columns 8 through 11
    0.0664    0.0360    0.0147         0
Pa = (0.7 + 0.3*p).^10 - 0.7^10     % Alternate form of gN
Pa =
  Columns 1 through 7
    0.9718    0.7092    0.5104    0.3612    0.2503    0.1686    0.1092
  Columns 8 through 11
    0.0664    0.0360    0.0147         0

Exercise 30

Suppose a teacher is equally likely to have 0, 1, 2, 3 or 4 students come in during office hours on a given day. If the lengths of the individual visits, in minutes, are iid exponential (0.1), what is the probability that no visit will last more than 20 minutes.

Solution

gN = 0.2*ones(1,5);
p = 1 - exp(-2);
FW = polyval(fliplr(gN),p)
FW =    0.7635
gY = [p 1-p];               % Alternate
[D,PD] = gendf(gN,gY);
PW = (D==0)*PD'
PW =    0.7635

Exercise 31

Twelve solid-state modules are installed in a control system. If the modules are not defective, they have practically unlimited life. However, with probability p=0.05p=0.05 any unit could have a defect which results in a lifetime (in hours) exponential (0.0025). Under the usual independence assumptions, what is the probability the unit does not fail because of a defective module in the first 500 hours after installation?

Solution

p = 1 - exp(-0.0025*500);
FW = (0.95 + 0.05*p)^12
FW =   0.8410
gN = ibinom(12,0.05,0:12);
gY = [p 1-p];
[D,PD] = gendf(gN,gY);
PW = (D==0)*PD'
PW =   0.8410

Exercise 32

The number N of bids on a painting is binomial (10,0.3)(10,0.3). The bid amounts (in thousands of dollars) Yi form an iid class, with common density function fY(t)=0.005(37-2t)fY(t)=0.005(37-2t)2t102t10. What is the probability that the maximum amount bid is greater than $5,000?

Solution

P ( Y 5 ) = 0 . 005 2 5 ( 37 - 2 t ) d t = 0 . 45 P ( Y 5 ) = 0 . 005 2 5 ( 37 - 2 t ) d t = 0 . 45
(6)
p = 0.45;
P = 1 - (0.7 + 0.3*p)^10
P =   0.8352
gN = ibinom(10,0.3,0:10);
gY = [p 1-p];
[D,PD] = gendf(gN,gY);  % D is number of "successes"
Pa = (D>0)*PD'
Pa =  0.8352

Exercise 33

A computer store offers each customer who makes a purchase of $500 or more a free chance at a drawing for a prize. The probability of winning on a draw is 0.05. Suppose the times, in hours, between sales qualifying for a drawing is exponential (4). Under the usual independence assumptions, what is the expected time between a winning draw? What is the probability of three or more winners in a ten hour day? Of five or more?

Solution

NtNt Poisson (λt)(λt), NDtNDt Poisson (λpt)(λpt), WDtWDt exponential (λp)(λp).

p = 0.05;
t = 10;
lambda = 4;
EW = 1/(lambda*p)
EW =    5
PND10 = cpoisson(lambda*p*t,[3 5])
PND10 =  0.3233    0.0527

Exercise 34

Noise pulses arrrive on a data phone line according to an arrival process such that for each t>0t>0 the number Nt of arrivals in time interval (0,t](0,t], in hours, is Poisson (7t)(7t). The ith pulse has an “intensity” Yi such that the class {Yi:1i}{Yi:1i} is iid, with the common distribution function FY(u)=1-e-2u2FY(u)=1-e-2u2 for u0u0. Determine the probability that in an eight-hour day the intensity will not exceed two.

Solution

N8 is Poisson (7*8 = 56) gN(s)=e56(s-1)gN(s)=e56(s-1).

t = 2;
FW2 = exp(56*(1 - exp(-t^2) - 1))
FW2 =   0.3586

Exercise 35

The number N of noise bursts on a data transmission line in a period (0,t](0,t] is Poisson (μt)(μt). The number of digit errors caused by the ith burst is Yi, with the class {Yi:1i}{Yi:1i} iid, Yi-1Yi-1 geometric (p)(p). An error correcting system is capable or correcting five or fewer errors in any burst. Suppose μ=12μ=12 and p=0.35p=0.35. What is the probability of no uncorrected error in two hours of operation?

Solution

FW(k)=gN[P(Yk)]FW(k)=gN[P(Yk)]P(Yk)-1-qk-1P(Yk)-1-qk-1NtNt Poisson (12t)(12t)

q = 1 - 0.35;
k = 5;
t = 2;
mu = 12;
FW = exp(mu*t*(1 - q^(k-1) - 1))
FW =  0.0138

Collection Navigation

Content actions

Download module as:

Add:

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? tag icon

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? tag icon

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