<< Chapter < Page | Chapter >> Page > |
tuappr
Enter matrix [a b]of X-range endpoints [0 2]
Enter matrix [c d]of Y-range endpoints [0 3]
Enter number of X approximation points 200Enter number of Y approximation points 300
Enter expression for joint density (3/88)*(2*t + 3*u.^2).*(u<=1+t)
Use array operations on X, Y, PX, PY, t, u, and PG = 4*t.*(t<=1) + (t+u).*(t>1);
[Z,PZ]= csort(G,P);
PZ2 = (Z<=2)*PZ'
PZ2 = 0.1010 % Theoretical = 563/5632 = 0.1000
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 400Enter number of Y approximation points 200
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 PG = 0.5*t.*(u>t) + u.^2.*(u<t);
[Z,PZ]= csort(G,P);
pp = (Z<=1/4)*PZ'
pp = 0.4844 % Theoretical = 85/176 = 0.4830
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 300Enter number of Y approximation points 300
Enter expression for joint density (3/23)*(t + 2*u).*(u<=max(2-t,t))
Use array operations on X, Y, PX, PY, t, u, and PM = max(t,u)<= 1;
G = M.*(t + u) + (1 - M)*2.*u;p = total((G<=1).*P)
p = 0.1960 % Theoretical = 9/46 = 0.1957
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 300Enter number of Y approximation points 300
Enter expression for joint density (12/179)*(3*t.^2 + u).*(u<=min(2,3-t))
Use array operations on X, Y, PX, PY, t, u, and PM = (t<=1)&(u>=1);
Z = M.*(t + u) + (1 - M)*2.*u.^2;G = M.*(t + u) + (1 - M)*2.*u.^2;
p = total((G<=2).*P)
p = 0.6662 % Theoretical = 119/179 = 0.6648
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 400Enter number of Y approximation points 400
Enter expression for joint density (12/227)*(3*t+2*t.*u).*(u<=min(1+t,2))
Use array operations on X, Y, PX, PY, t, u, and PQ = (u<=1).*(t<=1) + (t>1).*(u>=2-t).*(u<=t);
P = total(Q.*P)P = 0.5478 % Theoretical = 124/227 = 0.5463
The class is independent.
. Minterm probabilities are (in the usual order)
. The class is independent with
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 |
Determine .
% file
npr10_16.m Data for
[link] cx = [-2 1 3 0];pmx = 0.001*[255 25 375 45 108 12 162 18];cy = [1 3 1 -3];pmy = minprob(0.01*[32 56 40]);Z = [-1.3 1.2 2.7 3.4 5.8];PZ = 0.01*[12 24 43 13 8];disp('Data are in cx, pmx, cy, pmy, Z, PZ')
npr10_16 % Call for dataData are in cx, pmx, cy, pmy, Z, PZ
[X,PX]= canonicf(cx,pmx);
[Y,PY]= canonicf(cy,pmy);
icalc3Enter row matrix of X-values X
Enter row matrix of Y-values YEnter row matrix of Z-values Z
Enter X probabilities PXEnter Y probabilities PY
Enter Z probabilities PZUse array operations on matrices X, Y, Z,
PX, PY, PZ, t, u, v, and PM = t.^2 + 3*t.*u.^2>3*v;
PM = total(M.*P)PM = 0.3587
The simple random variable X has distribution
X = [-3.1 -0.5 1.2 2.4 3.7 4.9];PX = 0.01*[15 22 33 12 11 7];ddbn
Enter row matrix of VALUES XEnter row matrix of PROBABILITIES PX % Plot not reproduced here
dquanplotEnter VALUES for X X
Enter PROBABILITIES for X PX % Plot not reproduced hererand('seed',0) % Reset random number generator
dsample % for comparison purposesEnter row matrix of VALUES X
Enter row matrix of PROBABILITIES PXSample size n 10000
Value Prob Rel freq-3.1000 0.1500 0.1490
-0.5000 0.2200 0.21641.2000 0.3300 0.3340
2.4000 0.1200 0.11843.7000 0.1100 0.1070
4.9000 0.0700 0.0752Sample average ex = 0.8792
Population mean E[X]= 0.859
Sample variance vx = 5.146Population variance Var[X] = 5.112
Notification Switch
Would you like to follow the 'Applied probability' conversation and receive update notifications?