跳到主要内容

早稲田大学 創造理工学研究科 経営システム工学専攻 2021年8月実施 概率统计

Author

思齐塾, 祭音Myyura

Description

次の2変数のデータに基づき各設問に解答せよ。

No12345x12223y44200\begin{array}{|c|c|c|c|c|c|} \hline No & 1 & 2 & 3 & 4 & 5 \\ \hline x & 1 & 2 & 2 & 2 & 3 \\ \hline y & 4 & 4 & 2 & 0 & 0 \\ \hline \end{array}

(1) 相関係数 (correlation coefficient) を求めよ。なお、計算結果に根号を残してもよい。

(2) yを目的変数 (dependent variable), xを説明変数 (independent variable) として、単回帰分析 (single regression analysis) を行って直線をあてはめる。最小2乗法 (least squares method) による直線の推定式 (estimated equation) を求めよ。

题目描述

根据以下两变量数据回答问题:

No.12345x12223y44200\begin{array}{|c|c|c|c|c|c|} \hline \mathrm{No.}&1&2&3&4&5\\ \hline x&1&2&2&2&3\\ \hline y&4&4&2&0&0\\ \hline \end{array}
  1. 求相关系数,结果中可以保留根号。
  2. yy 为因变量、xx 为自变量作简单线性回归,求最小二乘法拟合直线的估计方程。

Kai

(1) Let's calculate the correlation coefficient rr .

First, calculate the means of xx and yy :

xˉ=1+2+2+2+35=105=2\bar{x} = \frac{1+2+2+2+3}{5} = \frac{10}{5} = 2
yˉ=4+4+2+0+05=105=2\bar{y} = \frac{4+4+2+0+0}{5} = \frac{10}{5} = 2

Next, calculate the standard deviations of xx and yy :

sx=(12)2+(22)2+(22)2+(22)2+(32)251=1+0+0+0+14=24=12=12s_x = \sqrt{\frac{(1-2)^2 + (2-2)^2 + (2-2)^2 + (2-2)^2 + (3-2)^2}{5-1}} = \sqrt{\frac{1+0+0+0+1}{4}} = \sqrt{\frac{2}{4}} = \sqrt{\frac{1}{2}} = \frac{1}{\sqrt{2}}
sy=(42)2+(42)2+(22)2+(02)2+(02)251=4+4+0+4+44=164=4=2s_y = \sqrt{\frac{(4-2)^2 + (4-2)^2 + (2-2)^2 + (0-2)^2 + (0-2)^2}{5-1}} = \sqrt{\frac{4+4+0+4+4}{4}} = \sqrt{\frac{16}{4}} = \sqrt{4} = 2

Now, calculate the covariance of xx and yy :

cov(x,y)=i=15(xixˉ)(yiyˉ)51=(12)(42)+(22)(42)+(22)(22)+(22)(02)+(32)(02)4=(1)(2)+(0)(2)+(0)(0)+(0)(2)+(1)(2)4=2+0+0+024=44=1cov(x, y) = \frac{\sum_{i=1}^5 (x_i - \bar{x})(y_i - \bar{y})}{5-1} = \frac{(1-2)(4-2) + (2-2)(4-2) + (2-2)(2-2) + (2-2)(0-2) + (3-2)(0-2)}{4} = \frac{(-1)(2) + (0)(2) + (0)(0) + (0)(-2) + (1)(-2)}{4} = \frac{-2 + 0 + 0 + 0 - 2}{4} = \frac{-4}{4} = -1

Finally, calculate the correlation coefficient:

r=cov(x,y)sxsy=1122=122=22=22r = \frac{cov(x, y)}{s_x s_y} = \frac{-1}{\frac{1}{\sqrt{2}} \cdot 2} = \frac{-1}{\frac{2}{\sqrt{2}}} = \frac{-\sqrt{2}}{2} = -\frac{\sqrt{2}}{2}

(2) To find the estimated equation y^=a+bx\hat{y} = a + bx using the least squares method, we need to calculate aa and bb .

The formula for bb is:

b=i=1n(xixˉ)(yiyˉ)i=1n(xixˉ)2b = \frac{\sum_{i=1}^n (x_i - \bar{x})(y_i - \bar{y})}{\sum_{i=1}^n (x_i - \bar{x})^2}

We already calculated the numerator in part (1) as cov(x,y)×(n1)cov(x, y) \times (n-1) , so i=15(xixˉ)(yiyˉ)=4\sum_{i=1}^5 (x_i - \bar{x})(y_i - \bar{y}) = -4 .

Now, let's calculate the denominator:

i=15(xixˉ)2=(12)2+(22)2+(22)2+(22)2+(32)2=1+0+0+0+1=2\sum_{i=1}^5 (x_i - \bar{x})^2 = (1-2)^2 + (2-2)^2 + (2-2)^2 + (2-2)^2 + (3-2)^2 = 1 + 0 + 0 + 0 + 1 = 2

So, b=42=2b = \frac{-4}{2} = -2 .

The formula for aa is:

a=yˉbxˉa = \bar{y} - b\bar{x}

We have xˉ=2\bar{x} = 2 , yˉ=2\bar{y} = 2 , and b=2b = -2 , so

a=2(2)(2)=2+4=6a = 2 - (-2)(2) = 2 + 4 = 6

Therefore, the estimated equation is:

y^=62x\hat{y} = 6 - 2x