<< Chapter < Page | Chapter >> Page > |
uniform on unit square
. Then (see [link] )
Integration shows
For .
% Note that although f = 1, it must be expressed in terms of t, u.
tuapprEnter matrix [a b] of X-range endpoints [0 1]Enter matrix [c d] of Y-range endpoints [0 1]Enter number of X approximation points 200
Enter number of Y approximation points 200Enter expression for joint density (u>=0)&(t>=0)
Use array operations on X, Y, PX, PY, t, u, and PG = t.*u;
[Z,PZ] = csort(G,P);p = (Z<=0.5)*PZ'
p = 0.8465 % Theoretical value 0.8466, above
The pair has joint density on the region bounded by , , , and (see Figure 7). Let . Determine .
ANALYTIC SOLUTION
Reference to [link] shows that
APPROXIMATE SOLUTION
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 (6/37)*(t + 2*u).*(u<=max(t,1))
Use array operations on X, Y, PX, PY, t, u, and PQ = t.*u<=1;
PQ = total(Q.*P)PQ = 0.4853 % Theoretical value 0.4865, above
G = t.*u; % Alternate, using the distribution for Z[Z,PZ] = csort(G,P);PZ1 = (Z<=1)*PZ'
PZ1 = 0.4853
In the following example, the function g has a compound definition. That is, it has a different rule for different parts of the plane.
The pair has joint density on the unit square .
for . Determine .
ANALYTICAL SOLUTION
where and . Reference to [link] shows that this is the part of the unit square for which . We may break up the integral into three parts. Let and . Then
APPROXIMATE SOLUTION
tuappr
Enter matrix [a b]of X-range endpoints [0 1]
Enter matrix [c d]of Y-range endpoints [0 1]
Enter number of X approximation points 200Enter number of Y approximation points 200
Enter expression for joint density (2/3)*(t + 2*u)Use array operations on X, Y, PX, PY, t, u, and P
Q = u<= t.^2;
G = u.*Q + (t + u).*(1-Q);prob = total((G<=1/2).*P)
prob = 0.2328 % Theoretical is 0.2322, above
The setup of the integrals involves careful attention to the geometry of the system. Once set up, the evaluation is elementary but tedious. On the other hand, the approximationproceeds in a straightforward manner from the normal description of the problem. The numerical result compares quite closely with the theoretical value and accuracy could beimproved by taking more subdivision points.
Notification Switch
Would you like to follow the 'Applied probability' conversation and receive update notifications?