網頁

2019年9月22日 星期日

106年地方特考-三等-統計學詳解


106年特種考試地方政府公務人員考試
等 別:三等
類 科 :統計
科 目:統計學


(一)$$M_{(X,Y)}(t_1,t_2)= \exp(2t_1+t_2 +{1\over 2}t_1t_2 +{5\over 2}t_1^2 +2t_2^2)\Rightarrow \begin{cases} X\sim N(\mu_x=2,\sigma_x^2=5) \\Y\sim N(\mu_y=1,\sigma_y^2=4) \\ \rho=1/4\sqrt{5}\end{cases}\\
X|Y=y\;\sim N(\mu_x+\rho{\sigma_x\over \sigma_y}(y-\mu_y),\sigma_x^2(1-\rho^2))=N(2+{1\over 4\sqrt{5}}\cdot{\sqrt{5}\over 2} (y-1),5(1-({1\over 4\sqrt{5}})^2))\\ =N(2+{1\over 8}(y-1),{79\over 16}) \Rightarrow X|Y=1\;\sim N(2,{79\over 16}) \Rightarrow f(X|Y=1)={1\over \sigma\sqrt{2\pi}}e^{(x-\mu)^2\over 2\sigma^2} = {1\over \sqrt{79\over 16}\sqrt{2\pi}}e^{(x-2)^2\over 2\cdot{79\over 16}}\\ = {4\over \sqrt{158\pi}}e^{8(x-2)^2\over 79}\Rightarrow \bbox[red, 2pt]{f(X|Y=1)= {4\over \sqrt{158\pi}}e^{8(x-2)^2\over 79}},-\infty< x< \infty$$(二)$$Var(X)=Var(E(X|Y))+E(Var(X|Y)) \Rightarrow Var(E(X|Y))=Var(X)-E(Var(X|Y)) \\= \sigma_x^2-E(\sigma_x^2(1-\rho^2)) = \sigma_x^2-\sigma_x^2(1-\rho^2) =\sigma_x^2\rho^2 =5 \times ({1\over 4\sqrt{5}})^2 =\bbox[red, 2pt]{{1\over 16}}$$(三)$$X|Y=1\; \sim N(2,{79\over 16}) \Rightarrow P(X>2|Y=1)= P\left(Z>{2-2\over \sqrt{79\over 16}} \right)=P(Z>0)=\bbox[red, 2pt]{{1\over 2}}$$(四)$$Y為常態分配\Rightarrow \left({Y-1\over 2}\right)為常態分配 \Rightarrow \left({Y-1\over 2}\right)^2為\text{chi-square}分配,\\ 即\left({Y-1\over 2}\right)^2\sim \chi^2(1)\sim Gamma(\alpha=1/2,\beta=2) \Rightarrow Z=(Y-1)^2 \sim Gamma(\alpha=1/2, \beta=8)\\ \Rightarrow f(z)={1 \over \Gamma(\alpha)\beta^\alpha}z^{\alpha-1}e^{-z\over \beta} ={1 \over \Gamma(1/2)8^{1/2}}z^{(1/2-1)}e^{-z\over 8} ={1\over \sqrt{8\pi}}z^{-1/2}e^{-1/8}\\ \Rightarrow \bbox[red, 2pt]{f(z)= {1\over \sqrt{8\pi}}z^{-1/2}e^{-1/8},z>0}$$



(一)$$Y_i=\beta_1\sqrt{X_i}+\varepsilon_i \Rightarrow \varepsilon_i=Y_i -\beta_1\sqrt{X_i} \Rightarrow \varepsilon_i^2= \left(Y_i -\beta_1\sqrt{X_i} \right)^2 \\\Rightarrow SSE=\sum_{i=1}^n\varepsilon_i^2= \sum_{i=1}^n \left(Y_i -\beta_1\sqrt{X_i} \right)^2 \\ 令 {\partial \over \partial \beta_1}SSE =0 \Rightarrow 2\sum_{i=1}^n\left(Y_i -\beta_1\sqrt{X_i} \right)\left(-\sqrt{X_i} \right) =0 \Rightarrow \sum_{i=1}^n \left(Y_i\sqrt{X_i}-\beta_1 X_i\right)=0 \\\Rightarrow \sum_{i=1}^n \left(Y_i\sqrt{X_i}\right)= \beta_1\sum_{i=1}^n\left( X_i\right) \Rightarrow \bbox[red, 2pt]{\hat{\beta_1}= {\sum_{i=1}^n Y_i\sqrt{X_i} \over \sum_{i=1}^n X_i}}$$(二)$$Var\left(\hat{\beta_1} \right)= Var\left({\sum_{i=1}^n Y_i\sqrt{X_i} \over \sum_{i=1}^n X_i} \right) = {\sum_{i=1}^n Var(Y_i)X_i \over \left( \sum_{i=1}^n X_i \right)^2} = \sigma^2{\sum_{i=1}^n X_i \over \left( \sum_{i=1}^n X_i \right)^2} = {\sigma^2 \over\sum_{i=1}^n X_i } \\ \Rightarrow \bbox[red, 2pt] {Var\left(\hat{\beta_1} \right)={\sigma^2 \over\sum_{i=1}^n X_i } }$$(三)$$\begin{array}{cccc}
X_i & Y_i &\sqrt{X_i} &Y_i\sqrt{X_i}\\\hline
4 & 2 & 2 & 4\\
9 & 5 & 3 & 15\\
4 & 2 & 2 & 4\\
16 &10 & 4 & 40\\
1 & 1& 1& 1\\\hline
\sum{X_i}=34& \sum{Y_i}=20& &\sum{Y_i\sqrt{X_i}}=64
\end{array} \\\Rightarrow \hat{\beta_1}= {\sum{Y_i\sqrt{X_i}}\over \sum{X_i}} ={64\over 34 }\approx 1.88 \\\Rightarrow \begin{array}{cccc}
X_i & Y_i &\sqrt{X_i} &Y_i\sqrt{X_i} & a_i=Y_i-\hat{\beta_1}\sqrt{X_i} &a_i^2\\\hline
4 & 2 & 2 & 4 &-1.76 & 3.0976\\
9 & 5 & 3 & 15 & -0.64 & 0.4096\\
4 & 2 & 2 & 4& -1.76 & 3.0976\\
16 &10 & 4 & 40 & 2.48 & 6.1504\\
1 & 1& 1& 1& -0.88 & 0.7744\\\hline
 & & & & & \sum{a_i}=13.53
\end{array} \\ \Rightarrow MSE ={SSE \over n-1}={ \sum(Y_i-\hat{\beta_1} Y_i\sqrt{X_i})^2\over 5-1}={13.53\times 64\over 4} \approx 3.3825\\ \begin{cases}H_0:\beta_1=0 \\ H_1:\beta_1\ne 0\\ \alpha=0.05 \end{cases} \Rightarrow 拒絕區域R=\{t\mid |t|> t_{0.025}(4)=2.776\}\\
檢定統計量t^*={\hat{\beta_1}-\beta_1 \over \sqrt{MSE\over \sum{X_i}}} = {1.88 \over \sqrt{3.3825 \over 34}}\approx 5.96 \in R \Rightarrow \bbox[red, 2pt]{拒絕H_0}$$(四)$$Y_i=\beta_0+\beta_1\sqrt{X_i}+ \varepsilon_i \Rightarrow \hat{\beta_1} ={\sum{Y_i\sqrt{X_i}-\left(\sum{\sqrt{X_i}} \right)\sum{Y_i}/n} \over \sum{X_i}-{\left(\sum{\sqrt{X_i}} \right)^2}/n} ={64-12\times 20/5 \over 34-12^2/5} \approx 3.08\\ \Rightarrow 偏誤為1.88-3.08=\bbox[red, 2pt]{-1.2}$$




(一)$$X代表從早上八點到下午五點接種疫苗人數\\\Rightarrow X\sim P(\lambda),其中\lambda=6(人/時)且t=9 \Rightarrow f(x)={e^{-\lambda t} (\lambda t)^x \over x!} \Rightarrow f(0)=\bbox[red, 2pt]{e^{-54}}$$(二)$$S\sim Gamma(\alpha=100,\beta=1/6) \Rightarrow Var(S)= \alpha\beta^2 = {100\over 36}= \bbox[red, 2pt]{25\over 9}$$


考選部未公布答案,解題僅供參考

沒有留言:

張貼留言