aboutsummaryrefslogtreecommitdiff
path: root/zhilova/midterm2.tex
blob: 8e74cf87a9aa78b1e9763fad1a40ee14dd0293d6 (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
\def\problem#1{\goodbreak\bigskip\noindent{\bf #1)}\smallskip\penalty500}
\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\E{\bb E}
\def\P{\bb P}
\newcount\qnum
\def\fr#1#2{{#1\over #2}}
\def\var{\mathop{\rm var}\nolimits}
\def\cov{\mathop{\rm cov}\nolimits}
\def\dd#1#2{\fr{\partial #1}{\partial #2}}

\problem{1}
\noindent{\bf (a)}
$$\E(Z) = \pmatrix{1\cr0}\qquad \var(Z) = \pmatrix{2&c\cr c&4}$$

\noindent{\bf (b)}
Covariance is a bilinear function, and $\var (kX) = \cov(kX,kX) =
k^2\var X.$ Also, $\cov(c, X) = 0,$ if $c$ is a constant, regardless of
$X.$ (because $\cov(c, X) = \E(cX) - \E(c)\E(X) = c\E(X) - c\E(X) = 0.$)
With linearity, this means $\cov(X+c, Y+b) = \cov(X, Y).$
$$\rho(2X-1, 5-Y) =
{\cov(2X-1, 5-Y)\over\sqrt{\var(2X-1)}\sqrt{\var(5-Y)}} =
{\cov(2X, -Y)\over\sqrt{\var(2X)}\sqrt{\var(-Y)}} = $$$$
{-2\cov(X, Y)\over2\sqrt{\var(X)}\sqrt{\var(Y)}} =
-{.5\over\sqrt{2}\sqrt{4}} =
-{\sqrt2\over8}.$$

\noindent{\bf (c)}

$X$ and $Y$ are not necessarily independent from each other, although
independence would give a covariance of 0 ($p_XY(x,y) = p_X(x)p_Y(y)
\to \E(XY) = \E(X)\E(Y).$)

Let $W \sim \cal N(0, 1),$ and $Z \sim 2\cal B(.5) - 1$ (i.e. it has a
.5 probability of being -1 or 1).
$X := \sqrt2 W + 1$ and $Y := 2ZW.$
These are strictly dependent because $Y = \sqrt2Z(X-1),$ so $Y$ has
conditional distribution $\sqrt2(x-1)(2\cal B(.5) - 1),$ which is
clearly not equal to its normal distribution (which can be fairly easily
verified by symmetry of $W$).
However, they have covariance 0:
$$\E(XY) - \E X\E Y = \E((\sqrt2 W + 1)2ZW) - \E(\sqrt 2 W + 1)\E(2ZW)
$$$$
= \E(2\sqrt2 ZW^2) - \E(\sqrt 2 W)\E(2ZW)
= 0 - 0\E(2ZW) = 0.
$$

% wikipedia says no

\problem{2}
\noindent{\bf (a)}

\def\idd#1#2{\dd{#1}{#2}^{-1}}
$Y_1 = 2X_2$ and $Y_2 = X_1 - X_2$ give us $X_2 = Y_1/2$ and
$X_1 = Y_2 + Y_1/2.$ This lets us compute Jacobian
$$J = \left|\matrix{\idd{x_1}{y_1} &\idd{x_1}{y_2}\cr
                    \idd{x_2}{y_1} &\idd{x_2}{y_2}}\right|
    = \left|\matrix{2&1\cr2&0}\right| = -2.$$
$$g(y_1, y_2) = \left\{\vcenter{\halign{\strut$#$,&\quad$#$\cr
                       |J|2e^{-(y_2+y_1/2)}e^{-y_1/2} & 0 < y_2+y_1/2 < y_1/2\cr
                       0 & {\rm elsewhere}\cr
                       }}\right.$$
$y_2+y_1/2 < y_1/2 \to y_2 < 0 \to -y_2 > 0.$
And $0 < y_2 + y_1/2 \to y_1 > -2y_2 > 0.$
$$ = \left\{\vcenter{\halign{\strut$#$,&\quad$#$\cr
            4e^{-y_2}e^{-y_1}&y_1 > -2y_2 > 0\cr
            0&{\rm elsewhere}\cr
            }}\right.$$

\noindent{\bf (b)}

$$g(y_1) = \int_{-\infty}^\infty g(y_1,y_2)dy_2 =
\bb I(y_1>0)\int_{-y_1/2}^0 4e^{-y_1}e^{-y_2} dy_2 =
\bb I(y_1>0)4e^{-y_1}(1-e^{y_1/2}).$$
$$g(y_2) = \int_{-\infty}^\infty g(y_1,y_2)dy_1 =
\bb I(y_2<0)\int_{-2y_2}^\infty 4e^{-y_1}e^{-y_2} dy_1 =
\bb I(y_2<0)4e^{-y_2}(-e^{2y_2})
.$$

\noindent{\bf (c)}

They are independent iff $g(y_1,y_2) \bb I(y_1 > -2y_2 > 0)e^{-y_1-y_2}
= g(y_1)g(y_2) = \bb I(y_1 > 0)\bb I(y_2 < 0) h(x),$
where $h(x)$ is the strictly non-zero product of exponents that would
result, showing that they are dependent (if $y_1 = -y_2 = 1,$ the right
indicators are satisfied but not the left indicator, and since $h(x)$ is
non-zero, we see a contradiction.)

\problem{3}
\noindent{\bf (a)}
We start determining the mgf from the pdf of $X,$
$p_X(x) =
\fr1{\sqrt{2\pi}}e^{-\fr12x^2}.$
$$\E(e^{tX}) =
\int_{-\infty}^\infty e^{tx}\fr1{\sqrt{2\pi}}e^{-\fr12x^2} dx =
\fr1{\sqrt{2\pi}} \int_{-\infty}^\infty e^{tx-\fr12x^2} dx = $$$$
\fr1{\sqrt{2\pi}} \int_{-\infty}^\infty e^{tx-\fr12x^2-\fr12t^2 + \fr12t^2} dx =
e^{\fr12t^2} \int_{-\infty}^\infty \fr1{\sqrt{2\pi}}e^{-\fr12(x-t)^2} dx
= e^{\fr12t^2},
$$
by the final integrand being a normal pdf and therefore integrating to
1.

\noindent{\bf (b)}
$$M_Y(t) = \E(e^{t(aX+b)}) = \E(e^{bt}e^{atX}) = e^{bt}\E(e^{atX}) =
e^{bt}M_X(at) = e^{bt}e^{\fr12(at)^2}.$$

\noindent{\bf (c)}

Theorem 1.9.2 states that two probability distribution functions are
alike if and only if their moment generating functions are equal in some
vicinity of zero.
The mgf of $Y$ corresponds to $\cal N(b, a^2),$ which has the following
mgf (by computation from its pdf definition):
$$\int_{-\infty}^\infty e^{tx}\fr1{a\sqrt{2\pi}}e^{-(x-b)^2\over
2a^2} dx =
\fr1{a\sqrt{2\pi}}\int_{-\infty}^\infty e^{2a^2tx - x^2 + 2bx - b^2\over
2a^2} dx =$$$$
\fr1{a\sqrt{2\pi}}\int_{-\infty}^\infty e^{-(b+a^2t)^2 +
2(a^2t+b)x - x^2 - b^2 + (b+a^2t)^2\over 2a^2} dx =
e^{(b+a^2t)^2-b^2\over 2a^2}\int_{-\infty}^\infty
\fr1{a\sqrt{2\pi}}e^{-(b+a^2t+x)^2 \over 2a^2} dx =
e^{bt}e^{(at)^2\over2},
$$
proving $Y \sim \cal N(b, a^2),$ because this function is convergent
everywhere, and reusing the fact that the final integrand is a normal
pdf, so it must integrate to 1.

\bye