For the distributions in Exercises 1-3
(See Exercise 17 from "Problems on Mathematical Expectation"). The pair
| t = | -3.1 | -0.5 | 1.2 | 2.4 | 3.7 | 4.9 |
| u = 7.5 | 0.0090 | 0.0396 | 0.0594 | 0.0216 | 0.0440 | 0.0203 |
| 4.1 | 0.0495 | 0 | 0.1089 | 0.0528 | 0.0363 | 0.0231 |
| -2.0 | 0.0405 | 0.1320 | 0.0891 | 0.0324 | 0.0297 | 0.0189 |
| -3.8 | 0.0510 | 0.0484 | 0.0726 | 0.0132 | 0 | 0.0077 |
The regression line of Y on X is
The regression line of Y on X is
npr08_07
Data are in X, Y, P
jcalc
- - - - - - - - - - -
EYx = sum(u.*P)./sum(P);
disp([X;EYx]')
-3.1000 -0.0290
-0.5000 -0.6860
1.2000 1.3270
2.4000 2.1960
3.7000 3.8130
4.9000 2.5700
G = t.^2.*u + abs(t+u);
EZx = sum(G.*P)./sum(P);
disp([X;EZx]')
-3.1000 4.0383
-0.5000 3.5345
1.2000 6.0139
2.4000 17.5530
3.7000 59.7130
4.9000 69.1757
(See Exercise 18 from "Problems on Mathematical Expectation"). The pair
| t = | 1 | 3 | 5 | 7 | 9 | 11 | 13 | 15 | 17 | 19 |
| u = 12 | 0.0156 | 0.0191 | 0.0081 | 0.0035 | 0.0091 | 0.0070 | 0.0098 | 0.0056 | 0.0091 | 0.0049 |
| 10 | 0.0064 | 0.0204 | 0.0108 | 0.0040 | 0.0054 | 0.0080 | 0.0112 | 0.0064 | 0.0104 | 0.0056 |
| 9 | 0.0196 | 0.0256 | 0.0126 | 0.0060 | 0.0156 | 0.0120 | 0.0168 | 0.0096 | 0.0056 | 0.0084 |
| 5 | 0.0112 | 0.0182 | 0.0108 | 0.0070 | 0.0182 | 0.0140 | 0.0196 | 0.0012 | 0.0182 | 0.0038 |
| 3 | 0.0060 | 0.0260 | 0.0162 | 0.0050 | 0.0160 | 0.0200 | 0.0280 | 0.0060 | 0.0160 | 0.0040 |
| -1 | 0.0096 | 0.0056 | 0.0072 | 0.0060 | 0.0256 | 0.0120 | 0.0268 | 0.0096 | 0.0256 | 0.0084 |
| -3 | 0.0044 | 0.0134 | 0.0180 | 0.0140 | 0.0234 | 0.0180 | 0.0252 | 0.0244 | 0.0234 | 0.0126 |
| -5 | 0.0072 | 0.0017 | 0.0063 | 0.0045 | 0.0167 | 0.0090 | 0.0026 | 0.0172 | 0.0217 | 0.0223 |
The regression line of Y on X is
The regression line of Y on X is
npr08_08
Data are in X, Y, P
jcalc
- - - - - - - - - - - -
EYx = sum(u.*P)./sum(P);
disp([X;EYx]')
1.0000 5.5350
3.0000 5.9869
5.0000 3.6500
7.0000 2.3100
9.0000 2.0254
11.0000 2.9100
13.0000 3.1957
15.0000 0.9100
17.0000 1.5254
19.0000 0.9100
M = u<=t;
G = (u-4).*sqrt(t).*M + t.*u.^2.*(1-M);
EZx = sum(G.*P)./sum(P);
disp([X;EZx]')
1.0000 58.3050
3.0000 166.7269
5.0000 175.9322
7.0000 185.7896
9.0000 119.7531
11.0000 105.4076
13.0000 -2.8999
15.0000 -11.9675
17.0000 -10.2031
19.0000 -13.4690
(See Exercise 19 from "Problems on Mathematical Expectation"). Data were kept on the effect of training time on the time to perform a job on a production line. X is the amount of training, in hours, and Y is the time to perform the task, in minutes. The data are as follows (in file npr08_09.m):
| t = | 1 | 1.5 | 2 | 2.5 | 3 |
| u = 5 | 0.039 | 0.011 | 0.005 | 0.001 | 0.001 |
| 4 | 0.065 | 0.070 | 0.050 | 0.015 | 0.010 |
| 3 | 0.031 | 0.061 | 0.137 | 0.051 | 0.033 |
| 2 | 0.012 | 0.049 | 0.163 | 0.058 | 0.039 |
| 1 | 0.003 | 0.009 | 0.045 | 0.025 | 0.017 |
The regression line of Y on X is
The regression line of Y on X is
npr08_09
Data are in X, Y, P
jcalc
- - - - - - - - - - - -
EYx = sum(u.*P)./sum(P);
disp([X;EYx]')
1.0000 3.8333
1.5000 3.1250
2.0000 2.5175
2.5000 2.3933
3.0000 2.3900
G = (u - 2.8)./t;
EZx = sum(G.*P)./sum(P);
disp([X;EZx]')
1.0000 1.0333
1.5000 0.2167
2.0000 -0.1412
2.5000 -0.1627
3.0000 -0.1367
For the joint densities in Exercises 4-11 below
(See Exercise 10 from "Problems On Random Vectors and Joint Distributions", Exercise 20 from "Problems on Mathematical Expectation", and Exercise 23 from "Problems on Variance, Covariance, Linear Regression").
The regression line of Y on X is
The regression line of Y on X is
tuappr: [0 1] [0 2] 200 400 u<=2*(1-t)
- - - - - - - - - - - - -
EYx = sum(u.*P)./sum(P);
plot(X,EYx) % Straight line thru (0,1), (1,0)
(See Exercise 13 from " Problems On Random Vectors and Joint Distributions", Exercise 23 from "Problems on Mathematical Expectation", and Exercise 24 from "Problems on Variance, Covariance, Linear Regression").
The regression line of Y on X is
The regression line of Y on X is
tuappr: [0 2] [0 2] 200 200 (1/8)*(t+u)
EYx = sum(u.*P)./sum(P);
eyx = 1 + 1./(3*X+3);
plot(X,EYx,X,eyx) % Plots nearly indistinguishable
(See Exercise 15 from "Problems On Random Vectors and Joint Distributions", Exercise 25 from "Problems on Mathematical Expectation", and Exercise 25 from "Problems on Variance, Covariance, Linear Regression").
The regression line of Y on X is
The regression line of Y on X is
tuappr: [0 2] [0 3] 200 300 (3/88)*(2*t + 3*u.^2).*(u<=1+t)
EYx = sum(u.*P)./sum(P);
eyx = (X+1).*(X+3).*(3*X+1)./(4*(1 + 4*X + X.^2));
plot(X,EYx,X,eyx) % Plots nearly indistinguishable
(See Exercise 16 from " Problems On Random Vectors and Joint Distributions", Exercise 26 from "Problems on Mathematical Expectation", and Exercise 26 from "Problems on Variance, Covariance, Linear Regression").
The regression line of Y on X is
The regression line of Y on X is
tuappr: [-1 1] [0 1] 200 100 12*t.^2.*u.*((u<= min(t+1,1))&(u>=max(0,t)))
EYx = sum(u.*P)./sum(P);
M = X<=0;
eyx = (2/3)*(X+1).*M + (2/3)*(1-M).*(X.^2 + X + 1)./(X + 1);
plot(X,EYx,X,eyx) % Plots quite close
(See Exercise 17 from " Problems On Random Vectors and Joint Distributions", Exercise 27 from "Problems on Mathematical Expectation", and Exercise 27 from "Problems on Variance, Covariance, Linear Regression").
The regression line of Y on X is
The regression line of Y on X is
tuappr: [0 2] [0 1] 200 100 (24/11)*t.*u.*(u<=min(1,2-t))
EYx = sum(u.*P)./sum(P);
M = X <= 1;
eyx = (2/3)*M + (2/3).*(2 - X).*(1-M);
plot(X,EYx,X,eyx) % Plots quite close
(See Exercise 18 from " Problems On Random Vectors and Joint Distributions", Exercise 28 from "Problems on Mathematical Expectation", and Exercise 28 from "Problems on Variance, Covariance, Linear Regression").
The regression line of Y on X is
The regression line of Y on X is
tuappr: [0 2] [0 2] 200 200 (3/23)*(t+2*u).*(u<=max(2-t,t))
EYx = sum(u.*P)./sum(P);
M = X<=1;
eyx = (1/12)*(X-2).*(X-8).*M + (7/12)*X.*(1-M);
plot(X,EYx,X,eyx) % Plots quite close
(See Exercise 21 from " Problems On Random Vectors and Joint Distributions", Exercise 31 from "Problems on Mathematical Expectation", and Exercise 29 from "Problems on Variance, Covariance, Linear Regression").
The regression line of Y on X is
The regression line of Y on X is
tuappr: [0 2] [0 2] 200 200 (2/13)*(t+2*u).*(u<=min(2*t,3-t))
EYx = sum(u.*P)./sum(P);
M = X<=1;
eyx = (11/9)*X.*M + (1/18)*(X.^2 - 15*X + 36).*(1-M);
plot(X,EYx,X,eyx) % Plots quite close
(See Exercise 22 from " Problems On Random Vectors and Joint Distributions", Exercise 32 from "Problems on Mathematical Expectation", and Exercise 30 from "Problems on Variance, Covariance, Linear Regression").
for
The regression line of Y on X is
The regression line of Y on X is
tuappr: [0 2] [0 1] 200 100 (3/8)*(t.^2 + 2*u).*(t<=1) + ...
(9/14)*t.^2.*u.^2.*(t>1)
EYx = sum(u.*P)./sum(P);
M = X<=1;
eyx = M.*(3*X.^2 + 4)./(6*(X.^2 + 1)) + (3/4)*(1 - M);
plot(X,EYx,X,eyx) % Plots quite close
For the distributions in Exercises 12-16 below
% Continuation of Exercise 6
G = 4*t.*(t<=1) + (t + u).*(t>1);
EZx = sum(G.*P)./sum(P);
M = X<=1;
ezx = 4*X.*M + (X + (X+1).*(X+3).*(3*X+1)./(4*(1 + 4*X + X.^2))).*(1-M);
plot(X,EZx,X,ezx) % Plots nearly indistinguishable
% Continuation of Exercise 6
Q = u>t;
G = (1/2)*t.*Q + u.^2.*(1-Q);
EZx = sum(G.*P)./sum(P);
M = X <= 1;
ezx = (1/2)*X.*(1-X.^2+X.^3).*M + (1/2)*(2-X).^2.*(1-M);
plot(X,EZx,X,ezx) % Plots nearly indistinguishable
% Continuation of Exercise 9
M = X <= 1;
Q = (t<=1)&(u<=1);
G = (t+u).*Q + 2*u.*(1-Q);
EZx = sum(G.*P)./sum(P);
ezx = (1/12)*M.*(2*X.^3 - 30*X.^2 + 69*X -60)./(X-2) + (7/6)*X.*(1-M);
plot(X,EZx,X,ezx)
tuappr: [0 2] [0 2] 200 200 (2/13)*(t + 2*u).*(u<=min(2*t,3-t))
M = (t<=1)&(u>=1);
Q = (t+u).*M + 2*(1-M).*u.^2;
EZx = sum(Q.*P)./sum(P);
N1 = X <= 1/2;
N2 = (X > 1/2)&(X<=1);
N3 = X > 1;
ezx = (32/9)*N1.*X.^2 + (1/36)*N2.*(80*X.^3 - 6*X.^2 - 5*X + 2)./X.^2 ...
+ (1/9)*N3.*(-X.^3 + 15*X.^2 - 63.*X + 81);
plot(X,EZx,X,ezx)
tuappr: [0 2] [0 1] 200 100 (t<=1).*(t.^2 + 2*u)./(t.^2 + 1) +3*u.^2.*(t>1)
M = u<=min(1,2-t);
G = M.*t + (1-M).*t.*u;
EZx = sum(G.*P)./sum(P);
N = X<=1;
ezx = X.*N + (1-N).*(-(13/4)*X + 12*X.^2 - 12*X.^3 + 5*X.^4 - (3/4)*X.^5);
plot(X,EZx,X,ezx)
Suppose
n = 50; X = 0:n; Y = 0:n;
P0 = zeros(n+1,n+1);
for i = 0:n
P0(i+1,1:i+1) = (1/((n+1)*(i+1)))*ones(1,i+1);
end
P = rot90(P0);
jcalc: X Y P
- - - - - - - - - - -
EY = dot(Y,PY)
EY = 12.5000 % Comparison with part (a): 50/4 = 12.5
Suppose
n = 50; X = 1:n; Y = 1:n;
P0 = zeros(n,n);
for i = 1:n
P0(i,1:i) = (1/(n*i))*ones(1,i);
end
P = rot90(P0);
jcalc: P X Y
- - - - - - - - - - - -
EY = dot(Y,PY)
EY = 13.2500 % Comparison with part (a): 53/4 = 13.25
Suppose
n = 50; p = 0.3; X = 1:n; Y = 0:n;
P0 = zeros(n,n+1); % Could use randbern
for i = 1:n
P0(i,1:i+1) = (1/n)*ibinom(i,p,0:i);
end
P = rot90(P0);
jcalc: X Y P
- - - - - - - - - - -
EY = dot(Y,PY)
EY = 7.6500 % Comparison with part (a): 0.3*51/2 = 0.765
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 joint distribution for
n = 100; p = 1/6; X = 1:n; Y = 0:n; PX = (1/n)*ones(1,n);
P0 = zeros(n,n+1); % Could use randbern
for i = 1:n
P0(i,1:i+1) = (1/n)*ibinom(i,p,0:i);
end
P = rot90(P0);
jcalc
EY = dot(Y,PY)
EY = 8.4167 % Comparison with part (a): 101/12 = 8.4167
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
joint distribution and then determine
Same as Exercise 20, except
n = 100; p = 0.1; X = 1:n; Y = 0:n; PX = (1/n)*ones(1,n);
P0 = zeros(n,n+1); % Could use randbern
for i = 1:n
P0(i,1:i+1) = (1/n)*ibinom(i,p,0:i);
end
P = rot90(P0);
jcalc
- - - - - - - - - -
EY = dot(Y,PY)
EY = 5.0500 % Comparison with part (a): EY = 101/20 = 5.05
Suppose the pair
Put
Use the fact that
Use the result of Exercise 26 and properties (CE9a) and (CE10) to show that
By (CE9),
By (CE10),
By Exercise 26,
A shop which works past closing time to complete jobs on hand tends to speed
up service on any job received during the last hour before closing. Suppose the arrival
time of a job in hours before closing time is a random variable
Time to failure X of a manufactured unit has an exponential distribution.
The parameter is dependent upon the manufacturing process. Suppose the parameter is
the value of random variable
A system has n components. Time to failure of the ith component is Xi and the class
Suggestion. Note that
Let
If FX is continuous, strictly increasing, zero for