<< Chapter < Page | Chapter >> Page > |
Suppose the pair $\{X,\phantom{\rule{0.166667em}{0ex}}Y\}$ has joint density ${f}_{XY}(t,\phantom{\rule{0.166667em}{0ex}}u)=3u$ on the triangular region bounded by $u=0$ , $u=1+t$ , $u=1-t$ . Let $Z=g(X,\phantom{\rule{0.166667em}{0ex}}Y)={X}^{2}+2XY$ .
Determine $E\left[Z\right]$ and $\mathrm{Var}\phantom{\rule{0.166667em}{0ex}}\left[Z\right]$ .
ANALYTIC SOLUTION
APPROXIMATION
tuappr
Enter matrix [a b]of X-range endpoints [-1 1]
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 3*u.*(u<=min(1+t,1-t))
Use array operations on X, Y, PX, PY, t, u, and PG = t.^2 + 2*t.*u; % g(X,Y) = X^2 + 2XY
EG = total(G.*P) % E[g(X,Y)]EG = 0.1006 % Theoretical value = 1/10
VG = total(G.^2.*P) - EG^2VG = 0.0765 % Theoretical value 53/700 = 0.0757
[Z,PZ]= csort(G,P); % Distribution for Z
EZ = Z*PZ' % E[Z]from distribution
EZ = 0.1006VZ = Z.^2*PZ' - EZ^2
VZ = 0.0765
The pair $\{X,\phantom{\rule{0.166667em}{0ex}}Y\}$ has joint density ${f}_{XY}(t,\phantom{\rule{0.166667em}{0ex}}u)=1/2$ on the square region bounded by $u=1+t$ , $u=1-t$ , $u=3-t$ , and $u=t-1$ .
where $Q=\left\{\right(t,\phantom{\rule{0.166667em}{0ex}}u):max\{t,\phantom{\rule{0.166667em}{0ex}}u\}\le 1\}=\left\{\right(t,\phantom{\rule{0.166667em}{0ex}}u):t\le 1,u\le 1\}$ .
Determine $E\left[W\right]$ and $\mathrm{Var}\phantom{\rule{0.166667em}{0ex}}\left[W\right]$ .
ANALYTIC SOLUTION
The intersection of the region Q and the square is the set for which $0\le t\le 1$ and $1-t\le u\le 1$ . Reference to Figure 11.3.2 shows three regions of integration.
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 200Enter number of Y approximation points 200
Enter expression for joint density ((u<=min(t+1,3-t))&...
(u$gt;=max(1-t,t-1)))/2Use array operations on X, Y, PX, PY, t, u, and P
M = max(t,u)<=1;
G = t.*M + 2*u.*(1 - M); % Z = g(X,Y)EG = total(G.*P) % E[g(X,Y)]
EG = 1.8340 % Theoretical 11/6 = 1.8333VG = total(G.^2.*P) - EG^2
VG = 0.9368% Theoretical 67/72 = 0.9306
[Z,PZ]= csort(G,P); % Distribution for Z
EZ = Z*PZ' % E[Z]from distribution
EZ = 1.8340VZ = (Z.^2)*PZ' - EZ^2
VZ = 0.9368
The value t _{0} where the line $u=1-t$ and the curve $u={t}^{2}$ meet satisfies ${t}_{0}^{2}=1-{t}_{0}$ .
For $E\left[{Z}^{2}\right]$ replace t by t ^{2} in the integrands to get $E\left[{Z}^{2}\right]=(25{t}_{0}-1)/20$ .
Using ${t}_{0}=(\sqrt{5}-1)/2\approx 0.6180$ , we get $\mathrm{Var}\phantom{\rule{0.166667em}{0ex}}\left[Z\right]=(2125{t}_{0}-1309)/80\approx 0.0540$ .
APPROXIMATION
% Theoretical values
t0 = (sqrt(5) - 1)/2t0 = 0.6180
EZ = (3/4)*(5*t0 -2)EZ = 0.8176
EZ2 = (25*t0 - 1)/20EZ2 = 0.7225
VZ = (2125*t0 - 1309)/80VZ = 0.0540
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 3*(u<= t.^2)
Use array operations on X, Y, t, u, and PG = (t+u<= 1).*t + (t+u>1);
EG = total(G.*P)EG = 0.8169 % Theoretical = 0.8176VG = total(G.^2.*P) - EG^2
VG = 0.0540 % Theoretical = 0.0540[Z,PZ] = csort(G,P);EZ = Z*PZ'
EZ = 0.8169VZ = (Z.^2)*PZ' - EZ^2
VZ = 0.0540
Standard deviation and the Chebyshev inequality
In Example 5 from "Functions of a Random Variable," we show that if $X\sim N(\mu ,\phantom{\rule{0.166667em}{0ex}}{\sigma}^{2})$ then $Z=\frac{X-\mu}{\sigma}\sim N(0,\phantom{\rule{0.166667em}{0ex}}1)$ . Also, $E\left[X\right]=\mu $ and $\mathrm{Var}\phantom{\rule{0.166667em}{0ex}}\left[X\right]={\sigma}^{2}$ . Thus
For the normal distribution, the standard deviation σ seems to be a natural measure of the variation away from the mean.
For a general distribution with mean μ and variance σ ^{2} , we have the
Chebyshev inequality
In this general case, the standard deviation appears as a measure of the variation from the mean value. This inequality is useful in many theoretical applications as wellas some practical ones. However, since it must hold for any distribution which has a variance, the bound is not a particularly tight. It may be instructive to comparethe bound on the probability given by the Chebyshev inequality with the actual probability for the normal distribution.
t = 1:0.5:3;
p = 2*(1 - gaussian(0,1,t));c = ones(1,length(t))./(t.^2);
r = c./p;h = [' t Chebyshev Prob Ratio'];m = [t;c;p;r]';disp(h)
t Chebyshev Prob Ratiodisp(m)
1.0000 1.0000 0.3173 3.15151.5000 0.4444 0.1336 3.3263
2.0000 0.2500 0.0455 5.49452.5000 0.1600 0.0124 12.8831
3.0000 0.1111 0.0027 41.1554
— $\square $
DERIVATION OF THE CHEBYSHEV INEQUALITY
Let $A=\left\{\right|X-\mu |\ge a\sigma \}=\{{(X-\mu )}^{2}\ge {a}^{2}{\sigma}^{2}\}$ . Then ${a}^{2}{\sigma}^{2}{I}_{A}\le {(X-\mu )}^{2}$ .
Upon taking expectations of both sides and using monotonicity, we have
from which the Chebyshev inequality follows immediately.
— $\square $
We consider three concepts which are useful in many situations.
Definition . A random variable X is centered iff $E\left[X\right]=0$ .
Definition . A random variable X is standardized iff $E\left[X\right]=0$ and $\mathrm{Var}\phantom{\rule{0.166667em}{0ex}}\left[X\right]=1$ .
Definition . A pair $\{X,\phantom{\rule{0.166667em}{0ex}}Y\}$ of random variables is uncorrelated iff
It is always possible to derive an uncorrelated pair as a function of a pair $\{X,\phantom{\rule{0.166667em}{0ex}}Y\}$ , both of which have finite variances. Consider
Now $E\left[U\right]=E\left[V\right]=0$ and
so the pair is uncorrelated.
We use the distribution for Examples Example 10 from "Mathematical Expectation: Simple Random Variables" and [link] , for which
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.0783EXY = total(t.*u.*P)
EXY = -0.1130c = EXY - EX*EY
c = -0.1633 % {X,Y} not uncorrelated
VX = total(t.^2.*P) - EX^2
VX = 3.3016VY = total(u.^2.*P) - EY^2
VY = 3.6566SX = sqrt(VX)
SX = 1.8170SY = sqrt(VY)
SY = 1.9122x = (t - EX)/SX; % Standardized random variables
y = (u - EY)/SY;uu = x + y; % Uncorrelated random variables
vv = x - y;EUV = total(uu.*vv.*P) % Check for uncorrelated condition
EUV = 9.9755e-06 % Differs from zero because of roundoff
Notification Switch
Would you like to follow the 'Applied probability' conversation and receive update notifications?