From b080d4aa6ccfd51732d463a23add0f94e91908ce Mon Sep 17 00:00:00 2001 From: Holden Rohrer Date: Tue, 6 Oct 2020 19:13:38 -0400 Subject: did two homeworks in math --- houdre/hw5.tex | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 houdre/hw5.tex (limited to 'houdre/hw5.tex') diff --git a/houdre/hw5.tex b/houdre/hw5.tex new file mode 100644 index 0000000..a952e76 --- /dev/null +++ b/houdre/hw5.tex @@ -0,0 +1,111 @@ +\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\fr#1#2{{#1\over #2}} +\def\var{\mathop{\rm var}\nolimits} +\def\infint{\int_{-\infty}^\infty} + +\q1 + +The mean of this distribution $\E(X)$ is +$$\E(X) = \infint xf(x) dx.$$ +This integral evaluates to 0 by symmetry because $f(x) = +{1\over2}ce^{-c|x|}$ is an even function, so $xf(x)$ is odd. + +The variance of this distribution is $\var(X) = \E(X^2) - \E(X)^2 = +\E(X^2).$ By theorem 5.58, +$$\E(X^2) = \infint x^2f(x) dx = \infint x^2{1\over2}ce^{-c|x|} dx += \int_0^\infty x^2ce^{-cx} dx += ce^0{2\over c^3} = 2c^{-2}.$$ +by repeated integration by parts + +\q2 + +$$\Pr(X\geq w) = \sum_{k=w}^\infty {1\over k!}\lambda^ke^{-\lambda}.$$ +$$\Pr(Y\leq \lambda) = \int_0^\lambda {1\over\Gamma(w)} x^{w-1}e^{-x}dx += \int_0^\lambda {x^{w-1}e^{-x}\over (w-1)!} dx,$$ +because $\Gamma(w) = (w-1)!$ + +We are going to prove this equality by induction on $w$. +It is true for $w=1$ because the Poisson distribution will sum to +$1-e^{-\lambda}$ (because $\Pr(X\geq0) = 1$ and $\Pr(X<1) = \Pr(X=0) = +e^{-\lambda}\lambda^0/0!.$) +The Gamma distribution is ${1\over\Gamma(1)}\int_0^\lambda x^0e^{-x}dx = +-e^{-x}\big|^\lambda_0 = -e^{-\lambda} + 1.$ + +Assuming the following equality holds for $w,$ it will be shown to +hold for $w+1$: +$$\sum_{k=w}^\infty {1\over k!}\lambda^ke^{-\lambda} = \int_0^\lambda +{x^{w-1}e^{-x}\over (w-1)!} dx.$$ +$$\sum_{k=w}^\infty {1\over k!}\lambda^ke^{-\lambda} += {1\over w!}\lambda^we^{-\lambda} + \sum_{k=w+1}^\infty +{\lambda^ke^{-\lambda}\over k!}.$$ +$${1\over (w-1)!}\int_0^\lambda x^{w-1}e^{-x}dx += {1\over (w-1)!}\left({x^we^{-x}\over w}\big|^\lambda_0 + +\int_0^\lambda {x^we^{-x}\over w} dx\right) = +{\lambda^we^{-\lambda}\over w!} + \int_0^\lambda {x^we^{-x}\over +\Gamma(w+1)} dx$$ +by integration by parts. +$$\Longrightarrow \sum_{k=n+1}^\infty {\lambda^ke^{-\lambda}\over k!} = +\int_0^\lambda {x^we^{-x}\over \Gamma(w+1)} dx.$$ + +QED + +\q3 + +The density function $f(x)$ is proportional, so there is some constant +$c$ such that $$1 = f(x) = c\infint g(x)dx = 2c\int_1^\infty x^{-n}dx = +2c\left(-{x^{1-n}\over n-1}\right)\big|^\infty_1 = 2c\left({1\over +n-1}\right) \to c = {n-1\over2}.$$ + +The mean and variance of $X$ exist when $\E(X)$ and $\E(X^2)$ exist, +respectively. The first exists when $n>2$ because for $n=2,$ +$$\E(X) = \int_1^\infty xx^{-n}dx = \ln(x)\big|^\infty_1,$$ and, +similarly for $\E(X^2)$ under $n\leq3.$ $n>3$ is the condition that it +exists because $$\int_1^\infty x^2x^{-n}dx = \ln(x)\big|^\infty_1,$$ for +$n=3$ (and $\int\ln(x)dx$ for $n=2$). + +\q4 + +The density function of $Y=|X|$ is: +$$\{x\geq0: {2\over\sqrt{2\pi}}\exp(-{1\over2}x^2).\hbox{ 0 +otherwise.}\}$$ + +$$\E(Y) = \int_0^\infty {2x\over \sqrt{2\pi}}\exp(-{1\over2}x^2)dx = +{1\over\sqrt{2\pi}}\int_0^\infty\exp(-\fr u2)du,$$ +by u-substitution, becoming +$$-{2\over\sqrt{2\pi}}e^{-u\over2}\big|_0^\infty = +{\sqrt{2}\over\sqrt{\pi}}.$$ + +Similarly, $\var(x) = \E(Y^2) - \E(Y)^2.$ +$$\E(Y^2) = \int_0^\infty {2x^2\over \sqrt{2\pi}}\exp(-\fr12 x^2)dx += -{2\over\sqrt{2\pi}}x\exp(-\fr12 x^2)\big|^\infty_0 +- {2\over\sqrt{2\pi}}\int_0^\infty -e^{-\fr12 x^2}dx,$$ +by integration by parts, turning into +$$0 + 1,$$ +because the first evaluates to zero at both extrema and the second is +the distribution function of the normal distribution so integrates to 1. + +\bye -- cgit