diff options
-rw-r--r-- | houdre/hw6.tex | 225 |
1 files changed, 225 insertions, 0 deletions
diff --git a/houdre/hw6.tex b/houdre/hw6.tex index 8de9006..cf6a3a4 100644 --- a/houdre/hw6.tex +++ b/houdre/hw6.tex @@ -23,28 +23,253 @@ \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 |