aboutsummaryrefslogtreecommitdiff
path: root/houdre/hw6.tex
blob: cf6a3a49c6a7c6fbc025928570ceca6d3ddf7b7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
\newfam\rsfs
\newfam\bbold
\def\scr#1{{\fam\rsfs #1}}
\def\bb#1{{\fam\bbold #1}}
\let\oldcal\cal
\def\cal#1{{\oldcal #1}}
\font\rsfsten=rsfs10
\font\rsfssev=rsfs7
\font\rsfsfiv=rsfs5
\textfont\rsfs=\rsfsten
\scriptfont\rsfs=\rsfssev
\scriptscriptfont\rsfs=\rsfsfiv
\font\bbten=msbm10
\font\bbsev=msbm7
\font\bbfiv=msbm5
\textfont\bbold=\bbten
\scriptfont\bbold=\bbsev
\scriptscriptfont\bbold=\bbfiv

\def\Pr{\bb P}
\def\E{\bb E}
\newcount\qnum
\def\q{\afterassignment\qq\qnum=}
\def\qq{\qqq{\number\qnum}}
\def\qqq#1{\bigskip\goodbreak\noindent{\bf#1)}\smallskip}
\def\align#1{\vcenter{\halign{$\displaystyle##\hfil$\tabskip1em&&
    $\hfil\displaystyle##$\cr#1}}}
\def\fr#1#2{{#1\over #2}}
\def\var{\mathop{\rm var}\nolimits}
\def\infint{\int_{-\infty}^\infty}
\def\pa#1#2{\partial#1/\partial#2}

\q1
$$\Pr(U\leq z) = \Pr(XY\leq z) = \int_0^\infty\int_{-\infty}^{z/x}
f_{X,Y}(x,y) dydx + \int_{-\infty}^0\int_{z/x}^\infty f_{X,Y}(x,y) dydx
$$$$= \int_0^\infty \int_{-\infty}^z f_{X,Y}(x,u/x){1\over x}dudx -
\int_{-\infty}^0 \int_{-\infty}^z f_{X,Y}(x,u/x){1\over x}dudx
= \infint \int_{-\infty}^z f_{X,Y}(x,u/x){1\over|x|}dudx
$$$$
\Longrightarrow f_U(u) = \infint f_X(x)f_Y(u/x){1\over|x|}dx,$$
by independence, from the derivative of $\Pr(U\leq z).$
$$\Pr(V\leq z) = \Pr(X/Y\leq z) =
\int_0^\infty \int_{-\infty}^{zy} f_{X,Y}(x,y)dxdy + \int_{-\infty}^0
\int_{zy}^\infty f_{X,Y}(x,y)dxdy$$$$
= \int_0^\infty\int_{-\infty}^{zy}f_{X,Y}(x,y)dxdy - \int_{-\infty^0}
\int_{zy}^\infty f_{X,Y}(x,y)dxdy
= \infint\int_{-\infty}^{zy}f_{X,Y}(x,y){|y|\over y}dxdy$$$$
\to {d\Pr(V\leq z)\over dz} = f_V(z) = \infint f_{X,Y}(zy,y)|y|dy,$$
taking the derivative with respect to $z,$

\q3

The quadratic equation has two distinct real roots when $$Y^2-4XZ>0 \to
Y^2>4XZ \to 1>Y>\sqrt{4XZ}.$$
$$\sqrt{4XZ}<1 \to XZ<1/4 \to Z<1/(4X).$$
$$Z<1,$$
so any integral over this region must partition between $0<X<1/4,$ where
$Z\in(0,1)$ and $1/4<X<1,$ where $Z\in(0,1/(4X)).$
Note that there is a probability density function of $1$ because the
distribution is uniform over a volume of 1.
$$\int\int_A\int_{\sqrt{4xz}}^1 1 dydzdx =
\int\int_A 1-\sqrt{4xz}dzdx =
\int_0^{1/4}\int_0^1 1-\sqrt{4xz}dzdx + \int_{1/4}^1\int_0^{1/(4x)}
1-\sqrt{4xz}dzdx$$$$ =
\int_0^{1/4} 1-(2/3)\sqrt{4x(1)^3}dx + \int_{1/4}^1 1/(4x) -
(2/3)\sqrt{4x(1/(4x))^3}dx =
1/4 - 1/9 + ln(4)/12.$$

\q4

$$\Pr(\min\{X,Y\}\geq z) = \Pr(X\geq z)\Pr(Y\geq z) = e^{-\lambda
z}e^{-\mu z} = e^{-(\lambda+\mu)z}$$
showing, by 1-cdf of an exponential distribution, the minimum of two
exponential distributions combines to a third exponential distribution
of parameter $\lambda+\mu.$

\q9

$$\int_0^\infty {1\over4}(x+3y)e^{-(x+y)} dx =
-{1\over4}(x+3y)e^{-(x+y)}\bigg|^\infty_0 -
\int_0^\infty -{1\over4}e^{-(x+y)} dx$$$$
= {1\over4}(3y)e^{-y} - \left[ {1\over4}e^{-(x+y)} \right]^\infty_0
= {1\over4}(3ye^{-y} - e^{-y}) = {e^{-y}(3y-1)\over4},$$
giving the marginal density function of $Y$ with integration by parts.

$$\Pr(Y>X) = \int_0^\infty \int_x^\infty {1\over4}(x+3y)e^{-(x+y)} dy dx
= {1\over4}\int_0^\infty -(x+3y)e^{-(x+y)} - 3e^{-(x+y)}
\bigg|_{y=x}^\infty dx$$$$
= {1\over4}\int_0^\infty e^{-2x}(x+3x+3)dx
= {1\over4}{1\over2}e^{-2*0}5 = {5\over8}.$$

\q11

\iffalse
The probability density function of the distance between the landing
point and the drop point is $D = \sqrt{(X_1^2-X_0)^2+(Y_1-Y_0)^2}.$ 
The probability density function of each of these variables is
$$f(x) = {1\over\sqrt{2\pi\sigma^2}}e^{-{1\over2\sigma^2}x^2}$$

$$\E D = \infint\infint\infint\infint
D(x_0,x_1,y_0,y_1)f(x_0)f(x_1)f(y_0)f(y_1)dx_0dx_1dy_0dy_1$$$$
= \infint\infint\int_0^{2\pi}\int_0^\infty r{1\over
4\pi^2\sigma^2}e^{-{1\over2\sigma^2}(x_0^2+y_0^2+(x_0+r\cos\theta)^2 +
(y_0+r\sin\theta)^2)}rdrd\theta dx_0dy_0$$$$
= \int_0^\infty\int_0^{2\pi}\int_0^\infty\int_0^{2\pi}
D{1\over4\pi^2\sigma^2}e^{-{1\over2\sigma^2}(r_\theta^2 +
r_\phi^2)}r_\theta r_\phi d\theta dr_\theta d\phi dr_\phi.$$
\fi

The joint probability density function of either location is the product
of two normal distributions on $x$ and $y$:
$$f_{X,Y}(x,y) = {1\over2\pi\sigma^2}e^{-{1\over2\sigma^2}(x^2+y^2)}.$$
The distance between these two is $D=(X_1-X_0, Y_1-Y_0),$ with a
probability distribution of
$$f_{D_X}(x) = f_{X,Y}(x,y)$$
Transforming this into polar coordinates gives the Jacobian (with
$x=r\cos\theta$ and $y=r\sin\theta$)
$$J = \left|\matrix{\pa x\theta&\pa xr\cr\pa y\theta&\pa yr\cr}\right| =
\left|\matrix{-r\sin\theta&\cos\theta\cr r\cos\theta&\sin\theta}\right|
= -r\sin^2\theta - r\cos^2\theta = -r,$$
with the Pythagorean identity.
$$f_{R,\Theta}(r,\theta) = f_{X,Y}(r\cos\theta,r\sin\theta)r =
{r\over2\pi\sigma^2}e^{-r^2/(2\sigma^2)}$$
$$\E R = \int_0^\infty\int_0^{2\pi}
r{r\over2\pi\sigma^2}e^{-r/(2\sigma^2)}d\theta dr
= \int_0^\infty {r^2\over\sigma^2}e^{-r^2/(2\sigma^2)} dr$$$$
= -2re^{-r^2/(2\sigma^2)}\bigg|_0^\infty - \int_0^\infty
-2e^{-r^2/(2\sigma^2)} dr = \int_0^\infty 2e^{-r^2/(2\sigma^2)}dr
= \sigma\sqrt{\pi/2}.$$

$\var(R) = \E(R^2) - \E(R)^2,$ and
$$\E(R^2) = \int_0^\infty \int_0^{2\pi} r^2
{r\over2\pi\sigma^2}e^{-r/(2\sigma^2)}d\theta dr
= \int_0^\infty {r^3\over\sigma^2}e^{-r/(2\sigma^2)}dr$$$$
= -r^2e^{-r^2/(2\sigma^2)}\bigg|_0^\infty - \int_0^\infty
-2re^{-r/(2\sigma^2)}dr = \int_0^\infty 2re^{-r^2/(2\sigma^2)}dr$$$$
= \int_0^\infty e^{-u/(2\sigma^2)}du = 2\sigma^2.$$
$2\sigma^2-\sigma^2\pi/2 = \var(R).$

\q15

$$f_X(x) = {1\over\sqrt{2\pi}}e^{-{1\over2}x^2}.$$
$$f_Y(y) = {1\over2\Gamma(\fr12n)}(\fr12x)^{\fr12n-1}e^{-\fr12x}
    \quad\hbox{on $y>0$}.$$
$$T={X\over\sqrt{Y/n}} \to X = T\sqrt{Y/n}.$$
$$J=\left|\matrix{\pa xt&\pa xy\cr \pa yt&\pa yy\cr}\right| =
\left|\matrix{\sqrt{Y/n}&T/(2\sqrt{Y/n})\cr0&1\cr}\right| = \sqrt{Y/n}$$

$$\align{f_T(t)
    &=&{d\over dt}\int_0^\infty\int_{-\infty}^t
        f_X(z\sqrt{y/n})f_Y(y)Jdzdy\cr
    &=&\int_0^\infty f_X(t\sqrt{y/n})f_Y(y)\sqrt{y/n}dy\cr
    &=&\int_0^\infty {1\over\sqrt{2\pi}}e^{-\fr12t^2(y/n)}
        {1\over2\Gamma(\fr12n)}\sqrt{y}\left(\fr12y\right)^{\fr12n-1}e^{-\fr12y}\sqrt{y/n}dy\cr
    &=&{1\over\sqrt{2\pi}}{1\over2\Gamma(\fr12n)}\sqrt{1/n}\int_0^\infty
        e^{-\fr12y(t^2/n+1)}\left(\fr y2\right)^{\fr n2-1}\sqrt{y}dy\cr
    &=&{\sqrt2\over\sqrt{2\pi}}{1\over2\Gamma(\fr12n)}\sqrt{1/n}\int_0^\infty
        e^{-\fr12y(t^2/n+1)}\left(\fr y2\right)^{\fr {n-1}2}dy\cr
    &=&{\sqrt2\over\sqrt{2\pi}}{1\over2\Gamma(\fr12n)}\sqrt{1/n}\int_0^\infty
        e^{-u(t^2/n+1)}u^{\fr {n-1}2}2du\cr
    &=&{1\over\sqrt{n\pi}}{\Gamma(\fr12(n+1))\over\Gamma(\fr12n)}
        \left(1+{t^2\over n}\right)^{-\fr12(n+1)},\cr
}$$
because $\int_0^\infty e^{-kx}x^n dx = \Gamma(n+1)/k^{n+1}$ (as may be
discovered by repeated integration by parts and evaluation of that
summation).

\q20

$$f_{X,Y}(x,y) = \bigg\{\align{2&0<y<x<1,\cr 0&{\rm otherwise.}\cr}$$
$$\Pr(X+Y<1) = \int_{x=0}^1 \int_{y=0}^{1-x} f_{X,Y}(x,y) dy dx
= \int_{x=0}^{1/2} \int_{y=0}^x 2dydx + \int_{x=1/2}^1 \int_{y=0}^{1-x}
2dydx$$$$ = \int_{x=0}^{1/2} 2x + \int_{x=1/2}^1 2(1-x) dx = (1/2)^2 + 2
- 1^2 - (2(1/2) - (1/2)^2) = 1/4 + 2 - 1 - 1 + 1/4 = 1/2.$$

$$f_X(x) = \int_0^x 2dy = 2x,$$
because $y\in(0,x).$
$$\E(X) = \int_0^1 xf_X(x)dx = \int_0^1 2x^2dx = 2/3.$$
$$f_{Y|X}(y|x) = {f_{X,Y}(x,y)\over f_X(x)} = {2\over 2x} = {1\over
x}.$$
$$\E(Y|X=x) = \int_0^x yf_{Y|X}(y|x) dy = x^2/2x = x/2.$$

\q21

$$f_X(x) = f_Y(x) = \bigg\{\align{1&0\leq x\leq 1,\cr 0&{\rm
otherwise.}\cr}$$
$$U = \min\{X,Y\}. V = \max\{X,Y\}$$
$$\Pr(U\geq u) = \Pr(X\geq u)\Pr(Y\geq u) = \int_u^1\int_u^1 1dydx =
(1-u)^2 \to {d\over du}\Pr(U\leq u) = 2(1-u).$$
$$\E U = \int_0^1 u(2(1-u))du = \int_0^1 2u-2u^2 du = 1^2-2(1)^3/3 =
1/3.$$
Similarly, $${d\over dv}\Pr(V\leq v) = 2v \to \E V = \int_0^1 2v^2dv =
2/3.$$
With symmetry, we can calculate the covariance using $X\leq Y \to X = U,
Y = V.$
$${\rm Cov}[X,Y] = \E[XY]-\E[X]\E[Y] = \int_0^1\int_0^1 xydxdy - 2/9 =
1/4 - 2/9 = 1/36.$$
%\int_0^1 \int_0^1 (\min\{x,y\}-1/3)(\max\{x,y\}-2/3)dxdy$$$$=
%\int_0^1 \int_0^y (x-1/3)(y-2/3)dxdy +
%    \int_0^1 \int_y^1 (y-1/3)(x-2/3)dxdy = 1/36.$$
% with the other definition, it is still possible but annoying af

\q24

$$U = X.$$
$$V = X+aY.$$
$$X = U.$$
$$Y = (V-U)/a.$$
$$J = \left|\matrix{\pa xu&\pa xv\cr\pa yu&\pa yv\cr}\right| =
\left|\matrix{1&0\cr -1/a&1/a\cr}\right| = 1/a.$$

$$f_{U,V}(u,v) = f(u)g((v-u)/a)/a.$$

Given the particular constraints $f(x) = g(x) = \lambda e^{-\lambda
x}$ for $x\geq0,$ and $a=1/2,$
$$f_V(v) = \int_0^\infty {f(u)g((v-u)/a)\over a} du =
\int_0^v 2\lambda^2 e^{-\lambda u}e^{-\lambda 2(v-u)} du =$$$$
2\lambda^2 \int_0^v e^{\lambda(u-2v)} du =
2\lambda^2 (e^{-\lambda v}-e^{-2\lambda v})/\lambda =
2\lambda e^{-\lambda v}(1-e^{-\lambda v}).
$$

Yes. This distribution is the same as $\max\{X,Y\}$ because, for
independent and identically distributed continuous distributions, by
symmetry, $\Pr(X\geq Y) = 1/2 = \Pr(X>Y)+\Pr(X=Y) = \Pr(X>Y).$
Therefore, $\Pr(\max\{X,Y\}\leq x) = \Pr(X\leq x)\Pr(Y\leq x) \to
f_{\max\{X,Y\}}(x) = f(x)\Pr(Y\leq x) + \Pr(X\leq x)g(x) = 2\lambda
e^{-\lambda v}(1-e^{-\lambda v}).$

\q26

$$X = 2U+V.$$
$$Y = V.$$
$$J(u,v) = \left|\matrix{\pa xu&\pa xv\cr\pa yu&\pa yv\cr}\right| =
\left|\matrix{2& 0\cr 1 & 1\cr}\right| = 2.$$

$$f_{U,V}(u,v) = f_{X,Y}(x(u,v), y(u,v))J(u,v) = 2f_{X,Y}(2u+v, v) =
{1\over2}e^{-{1\over2}(2u+v+v)} = {1\over2}e^{-u-v} \quad\hbox{when
$(u,v)\in A$}$$

Given $x\geq 0, y\geq 0,$ $2u+v\geq 0 \to v \geq -2u,$ and $y = v\geq 0.$
For $u\geq0,$
$$f_U(u) = \int_0^\infty {1\over2}e^{-u-v}dv = {1\over2}e^{-u}
\int_0^\infty e^{-v}dv = {1\over2}e^{-u} = {1\over2}e^{-|u|}.$$
and for $u<0,$
$$f_U(u) = \int_{-2u}^\infty {1\over2}e^{-u-v}dv = {1\over2}e^{-u}
\int_{-2u}^\infty e^{-v}dv = {1\over2}e^{-u}(e^{2u}) = {1\over2}e^u =
{1\over2}e^{-|u|}$$

\q0
Let $f(x,y) = 2\exp(-x-y),$ $0< x \leq y < +\infty,$ and $f(x,y) = 0$
elsewhere, be the joint pdf of $(X, Y)$ studied in our last lecture.
Find $F_{(X,Y)}$ the joint cdf of $(X,Y)$ and $F_X$ the marginal cdf of
$X$ as well as $F_Y$ the marginal cdf of $Y$.

Does there exist positive values of $x$ and $y$ for which
$F_{(X,Y)}(x,y) = F_X(x)F_Y(y)$?

$$F_{(X,Y)}(x,y) = \int_{u=0}^y \int_{v=0}^{\min\{u,x\}} 2e^{-u-v} dvdu
= \int_{u=0}^x \int_{v=0}^u 2e^{-u-v}dvdu + \int_{u=x}^y \int_{v=0}^x
2e^{-u-v}dvdu$$$$
= \int_{u=0}^x -2e^{-2u} + 2e^{-u}du +
\int_{u=x}^y -2e^{-u-x}+2e^{-u}du$$$$
= (e^{-2x} - 2e^{-x}) - (e^0 - 2e^0) + (2e^{-y-x} - 2e^{-y}) -
(2e^{-2x} - 2e^{-x})
= 1 + 2e^{-y-x} - 2e^{-y} - e^{-2x}
= (1-2e^{-y})(1-e^{-2x})
$$

$$F_X(x) = \lim_{y\to\infty} F_{(X,Y)}(x,y) = 1-e^{-2x}.$$
Similarly,
$$F_Y(y) = 1-2e^{-y}.$$
For all positive values of $x$ and $y,$ the given equality holds.

\bye