---
# System prepended metadata

title: Probability HW4-2
tags: [Probability]

---

# Probability HW4-2
###### tags: `Probability`
- [name=0716023 曾文鼎]

## 4a
以下求 $c$ $$\begin{align}
\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}f(x,y)~\mathrm dx\mathrm dy
&= \int_{0}^{\infty} Ce^{-x}\cdot2x\mathrm dx \\
&= \left[-2c(x+1)e^{-x}\right]^{\infty}_{0} \\
&= 2c\displaystyle \\
&= 1
\end{align}$$

故 $c=0.5$

## 4b
當 $x$ 為常數時 $f(x,y)=Ce^{-x}$ 也是常數，所以 $f_Y(y)$ 在 $y\in(-x,x)$ 均勻分布。故 $$f_{Y|X}(y|x)=\begin{equation}\begin{cases}
\dfrac{1}{x-(-x)}=\dfrac{1}{2x}, & \text{if}~x\geq0, -x<y<x \\
0, & \text{else}
\end{cases}\end{equation}$$

以下計算 $f_Y(y)$ $$\begin{align}f_Y(y) &= 
\int_{-\infty}^{\infty}f(x,y)~\mathrm dx \\
&= \int_{|y|}^{\infty} \frac 1 2 e^{-x}\mathrm dx \\
&= \left[\frac{-e^{-x}}{2}\right]^{\infty}_{|y|} \\
&= \frac{e^{-|y|}}{2}
\end{align}$$

故 $$f_{X|Y}(x|y)=\begin{equation}\begin{cases}
\dfrac{f(x,y)}{f_Y(y)}=\dfrac{e^{-x}/2}{e^{-|y|}/2}=e^{|y|-x}, & \text{if}~ x\geq0, |y|<x \\
0, & \text{else}
\end{cases}\end{equation}$$

## 4c
因為上下對稱，故 $E[Y|X=x]=0$ 。

## 5
假定這是 Bivartie normal distribution ， 則可以列出 $$\begin{equation}\begin{cases} c=\dfrac{1}{2 \pi \sigma_X \sigma_Y \sqrt{1-\rho^2}} \\ 
\dfrac{-1}{2(1-\rho^2)}\dfrac{(x-\mu_X)^2}{{\sigma_X}^2}=-8x^2 \\
\dfrac{-1}{2(1-\rho^2)}\dfrac{(y-\mu_Y)^2}{{\sigma_Y}^2}=-18y^2 \\
\dfrac{-1}{2(1-\rho^2)}\dfrac{-2\rho(x-\mu_X)(y-\mu_Y)}{\sigma_X\sigma_Y}=-6xy \\
\end{cases}\end{equation}$$

經觀察，顯然
* $\mu_x=0$
* $\mu_y=0$

因此 $$\begin{equation}\begin{cases}
\dfrac{-1}{2(1-\rho^2)}\dfrac{x^2}{{\sigma_X}^2}=-8x^2 
& \implies & \dfrac{-1}{2(1-\rho^2)}\dfrac{1}{{\sigma_X}^2}=-8 \\
\dfrac{-1}{2(1-\rho^2)}\dfrac{y^2}{{\sigma_Y}^2}=-18y^2
& \implies & \dfrac{-1}{2(1-\rho^2)}\dfrac{1}{{\sigma_Y}^2}=-18 \\
\dfrac{-1}{2(1-\rho^2)}\dfrac{-2\rho(x-\mu_X)(y-\mu_Y)}{\sigma_X\sigma_Y}=-6xy
& \implies & \dfrac{-1}{2(1-\rho^2)}\dfrac{-2\rho}{\sigma_X\sigma_Y}=-6
\end{cases}\end{equation}$$

由上式除以中式計算得出 $\dfrac{{\sigma_Y}^2}{{\sigma_X}^2}=\dfrac{-8}{-18}\implies\sigma_X=\dfrac 3 2\sigma_Y$ ，因此 $\dfrac{-1}{2(1-\rho^2)}\dfrac{-2\rho}{\frac 3 2{\sigma_Y}^2}=-6$ 。再將此結果與中式聯立，得到 $$
\begin{equation}\begin{cases}
\dfrac{-1}{2(1-\rho^2)}\dfrac{1}{{\sigma_Y}^2}=-18 \\
\dfrac{-1}{2(1-\rho^2)}\dfrac{-2\rho}{\frac 3 2{\sigma_Y}^2}=-6
\end{cases}
\implies \dfrac{-2\rho}{3/2}=\frac 1 3 
\end{equation}$$

因此
* $\rho=\dfrac{-1}{4}$

將 $\rho$ 代回 $\begin{equation}\begin{cases}
\dfrac{-1}{2(1-\rho^2)}\dfrac{1}{{\sigma_X}^2}=-8 \\
\dfrac{-1}{2(1-\rho^2)}\dfrac{1}{{\sigma_Y}^2}=-18
\end{cases}\end{equation}$ 得到
* $\sigma_X=\dfrac{1}{\sqrt{15}}$ 
* $\sigma_Y=\dfrac{2}{3\sqrt{15}}$

因此 
* $c=\dfrac{1}{2 \pi \sigma_X \sigma_Y \sqrt{1-\rho^2}}=\dfrac{\sqrt{135}}{\pi}$