<< Chapter < Page | Chapter >> Page > |
A game is played as follows:
Let Y represent the number of points made and $X=Y-16$ be the net gain (possibly negative) of the player. Determine the maximum value of
X , $E\left[X\right]$ , $\mathrm{Var}\phantom{\rule{0.166667em}{0ex}}\left[X\right]$ , $P(X>0)$ , $P(X>=10)$ , $P(X>=16)$ .
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.5EX = -0.2500 % 4.5*3.5 - 16 = -0.25
VX = dot(X.^2,PX) - EX^2VX = 114.1875
Ppos = (X>0)*PX'
Ppos = 0.4667P10 = (X>=10)*PX'
P10 = 0.2147P16 = (X>=16)*PX'
P16 = 0.0803
Marvin calls on four customers. With probability ${p}_{1}=0.6$ he makes a sale in each case. Geraldine calls on five customers, with probability ${p}_{2}=0.5$ of a sale in each case. Customers who buy do so on an iid basis, and order an amount Y _{i} (in dollars) with common distribution:
Let D _{1} be the total sales for Marvin and D _{2} the total sales for Geraldine. Let $D={D}_{1}+{D}_{2}$ . Determine the distribution and mean and variance for D _{1} , D _{2} , and D . Determine $P({D}_{1}\ge {D}_{2})$ and $P(D\ge 1500)$ , $P(D\ge 1000)$ , and $P(D\ge 750)$ .
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^2VD1 = 6.1968e+04
ED2 = dot(D2,PD2)ED2 = 625.0000 % Check: ED2 = EnG*EY = 2.5*250
VD2 = dot(D2.^2,PD2) - ED2^2VD2 = 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+03eD = ED1 + ED2 % Check: ED = ED1 + ED2
eD = 1.2250e+03 % (Continued next page)VD = dot(D.^2,PD) - ED^2VD = 1.4214e+05
vD = VD1 + VD2 % Check: VD = VD1 + VD2vD = 1.4214e+05
P1g2 = total((t>u).*P)
P1g2 = 0.4612k = [1500 1000 750];PDk = zeros(1,3);
for i = 1:3PDk(i) = (D>=k(i))*PD';
enddisp(PDk)
0.2556 0.7326 0.8872
A questionnaire is sent to twenty persons. The number who reply is a random number $N\sim $ binomial (20, 0.7). If each respondent has probability $p=0.8$ of favoring a certain proposition, what is the probability of ten or more favorable replies? Of fifteen or more?
gN = ibinom(20,0.7,0:20);
gY = [0.2 0.8];
gendDo not forget zero coefficients for missing powers
Enter gen fn COEFFICIENTS for gN gNEnter gen fn COEFFICIENTS for gY gY
Results are in N, PN, Y, PY, D, PD, PMay use jcalc or jcalcf on N, D, P
To view the distribution, call for gD.P10 = (D>=10)*PD'
P10 = 0.7788P15 = (D>=15)*PD'
P15 = 0.0660pD = ibinom(20,0.7*0.8,0:20); % Alternate: use D binomial (pp0)
D = 0:20;p10 = (D>=10)*pD'
p10 = 0.7788p15 = (D>=15)*pD'
p15 = 0.0660
Notification Switch
Would you like to follow the 'Applied probability' conversation and receive update notifications?