早稲田大学 創造理工学研究科 経営システム工学専攻 2021年8月実施 概率统计
Author
思齐塾, 祭音Myyura
Description
次の2変数のデータに基づき各設問に解答せよ。
Noxy114224322420530
(1) 相関係数 (correlation coefficient) を求めよ。なお、計算結果に根号を残してもよい。
(2) yを目的変数 (dependent variable), xを説明変数 (independent variable) として、単回帰分析 (single regression analysis) を行って直線をあてはめる。最小2乗法 (least squares method) による直線の推定式 (estimated equation) を求めよ。
题目描述
根据以下两变量数据回答问题:
No.xy114224322420530
- 求相关系数,结果中可以保留根号。
- 以 y 为因变量、x 为自变量作简单线性回归,求最小二乘法拟合直线的估计方程。
Kai
(1) Let's calculate the correlation coefficient r .
First, calculate the means of x and y :
xˉ=51+2+2+2+3=510=2
yˉ=54+4+2+0+0=510=2
Next, calculate the standard deviations of x and y :
sx=5−1(1−2)2+(2−2)2+(2−2)2+(2−2)2+(3−2)2=41+0+0+0+1=42=21=21
sy=5−1(4−2)2+(4−2)2+(2−2)2+(0−2)2+(0−2)2=44+4+0+4+4=416=4=2
Now, calculate the covariance of x and y :
cov(x,y)=5−1∑i=15(xi−xˉ)(yi−yˉ)=4(1−2)(4−2)+(2−2)(4−2)+(2−2)(2−2)+(2−2)(0−2)+(3−2)(0−2)=4(−1)(2)+(0)(2)+(0)(0)+(0)(−2)+(1)(−2)=4−2+0+0+0−2=4−4=−1
Finally, calculate the correlation coefficient:
r=sxsycov(x,y)=21⋅2−1=22−1=2−2=−22
(2) To find the estimated equation y^=a+bx using the least squares method, we need to calculate a and b .
The formula for b is:
b=∑i=1n(xi−xˉ)2∑i=1n(xi−xˉ)(yi−yˉ)
We already calculated the numerator in part (1) as cov(x,y)×(n−1) , so ∑i=15(xi−xˉ)(yi−yˉ)=−4 .
Now, let's calculate the denominator:
i=1∑5(xi−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=2−4=−2 .
The formula for a is:
a=yˉ−bxˉ
We have xˉ=2 , yˉ=2 , and b=−2 , so
a=2−(−2)(2)=2+4=6
Therefore, the estimated equation is:
y^=6−2x