<< Chapter < Page | Chapter >> Page > |
jdemo1
jcalcEnter JOINT PROBABILITIES (as on the plane) P
Enter row matrix of VALUES of X XEnter row matrix of VALUES of Y Y
Use array operations on matrices X, Y, PX, PY, t, u, and PEX = total(t.*P)
EX = 0.6420EY = total(u.*P)
EY = 0.0783VX = total(t.^2.*P) - EX^2
VX = 3.3016CV = total(t.*u.*P) - EX*EY
CV = -0.1633a = CV/VX
a = -0.0495b = EY - a*EX
b = 0.1100 % The regression line is u = -0.0495t + 0.11
Suppose the pair has joint density on the triangular region bounded by , , . Determine the regression line of Y on X .
ANALYTIC SOLUTION
By symmetry, , so . The regression curve is
Note that the pair is uncorrelated, but by the rectangle test is not independent. With zero values of and , the approximation procedure is not very satisfactory unless a very large number of approximation points are employed.
The pair has joint density on the region , (see Figure [link] ). Determine the regression line of Y on X . If the value is observed, what is the best mean-square linear estimate of ?
ANALYTIC SOLUTION
The other quantities involve integrals over the same regions with appropriate integrands, as follows:
Quantity | Integrand | Value |
779/370 | ||
127/148 | ||
232/185 |
Then
and
The regression line is . If , the best linear estimate (in the mean square sense) is (see [link] for an approximate plot).
APPROXIMATION
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 (6/37)*(t+2*u).*(u<=max(t,1))
Use array operations on X, Y, PX, PY, t, u, and PEX = total(t.*P)
EX = 1.3517 % Theoretical = 1.3514EY = total(u.*P)
EY = 0.8594 % Theoretical = 0.8581VX = total(t.^2.*P) - EX^2
VX = 0.2790 % Theoretical = 0.2793CV = total(t.*u.*P) - EX*EY
CV = 0.0947 % Theoretical = 0.0944a = CV/VX
a = 0.3394 % Theoretical = 0.3382b = EY - a*EX
b = 0.4006 % Theoretical = 0.4011y = 1.7*a + b
y = 0.9776 % Theoretical = 0.9760
An interpretation of ρ 2
The analysis above shows the minimum mean squared error is given by
If , then , the mean squared error in the case of zero linear correlation. Then, ρ 2 is interpreted as the fraction of uncertainty removed by the linear rule and X . This interpretation should not be pushed too far, but is a common interpretation, often found in the discussion of observations orexperimental results.
More general linear regression
Consider a jointly distributed class. . We wish to deterimine a function U of the form
If U satisfies this minimum condition, then , or, equivalently
To see this, set and let . Now, for any α
If we select the special
This implies , which can only be satisfied by , so that
On the other hand, if for all V of the form above, then is a minimum. Consider
Since is of the same form as V , the last term is zero. The first term is fixed. The second term is nonnegative, with zero value iff Hence, is a minimum when .
If we take V to be , successively, we obtain linear equations in the unknowns , as follows.
For each , we take and use the calculating expressions for variance and covariance to get
These n equations plus equation (1) may be solved alagebraically for the a i .
In the important special case that the X i are uncorrelated (i.e., for ), we have
and
In particular, this condition holds if the class is iid as in the case of a simple random sample (see the section on "Simple Random Samples and Statistics ).
Examination shows that for , with , , and , the result agrees with that obtained in the treatment of the regression line, above.
Suppose , , , , , , , and . Then the three equations are
Solution of these simultaneous linear equations with MATLAB gives the results
, , and .
Notification Switch
Would you like to follow the 'Applied probability' conversation and receive update notifications?