<< Chapter < Page | Chapter >> Page > |
For the random variables in [link] , let . Determine the value of W on each and determine the distribution of W .
XY = a.*b
XY = 2 3 5 % XY values4 6 10
6 9 15W PW % Distribution for W = XY
2.0000 0.06003.0000 0.1200
4.0000 0.18005.0000 0.0200
6.0000 0.42009.0000 0.1200
10.0000 0.060015.0000 0.0200
A pair of dice is rolled.
t = 1:6;
c = ones(6,6);[x,y] = meshgrid(t,t)x = 1 2 3 4 5 6 % x-values in each position
1 2 3 4 5 61 2 3 4 5 6
1 2 3 4 5 61 2 3 4 5 6
1 2 3 4 5 6y = 1 1 1 1 1 1 % y-values in each position
2 2 2 2 2 23 3 3 3 3 3
4 4 4 4 4 45 5 5 5 5 5
6 6 6 6 6 6m = min(x,y); % min in each position
M = max(x,y); % max in each positions = x + y; % sum x+y in each position
d = abs(x - y); % |x - y| in each position[X,fX] = csort(m,c) % sorts values and counts occurrencesX = 1 2 3 4 5 6
fX = 11 9 7 5 3 1 % PX = fX/36[Y,fY] = csort(M,c)Y = 1 2 3 4 5 6
fY = 1 3 5 7 9 11 % PY = fY/36[Z,fZ] = csort(s,c)Z = 2 3 4 5 6 7 8 9 10 11 12
fZ = 1 2 3 4 5 6 5 4 3 2 1 %PZ = fZ/36[W,fW] = csort(d,c)W = 0 1 2 3 4 5
fW = 6 10 8 6 4 2 % PW = fW/36
Minterm probabilities through for the class are, in order,
Determine the distribution for random variable
% file
npr06_10.m % Data for
[link] pm = [ 0.072 0.048 0.018 0.012 0.168 0.112 0.042 0.028 ...
0.062 0.048 0.028 0.010 0.170 0.110 0.040 0.032];
c = [-5.3 -2.5 2.3 4.2 -3.7];
disp('Minterm probabilities are in pm, coefficients in c')
npr06_10 Minterm probabilities are in pm, coefficients in c
canonicEnter row vector of coefficients c
Enter row vector of minterm probabilities pmUse row matrices X and PX for calculations
Call for XDBN to view the distributionXDBN
XDBN =-11.5000 0.1700
-9.2000 0.0400-9.0000 0.0620
-7.3000 0.1100-6.7000 0.0280
-6.2000 0.1680-5.0000 0.0320
-4.8000 0.0480-3.9000 0.0420
-3.7000 0.0720-2.5000 0.0100
-2.0000 0.1120-1.4000 0.0180
0.3000 0.02800.5000 0.0480
2.8000 0.0120
Notification Switch
Would you like to follow the 'Applied probability' conversation and receive update notifications?