| English | 意味 |
|---|---|
| least-squares line/liːst skweəz laɪn/ | 最小二乗法直線 |
| coefficient of determination/ˌkəʊɪˈfɪʃənt ɒv dɪˌtɜːmɪˈneɪʃn/ | 決定係数 |
Why "least squares"?
- Many lines could pass through a cloud — which is best?
- The least-squares line 最小二乘线 is the one that makes the sum of squared residuals as small as possible.
- Squaring keeps errors positive and punishes big misses extra hard.
- Minimizing that total is what pins down the unique best-fit slope and intercept.
r-squared: variation explained
- The coefficient of determination 决定系数 $r^2$ is the fraction of the variation in $y$ explained by the model.
- It's literally the square of the correlation, so $0 \le r^2 \le 1$.
- $r^2 = 0.64$ means "$64\%$ of the variation in $y$ is explained by the linear relationship with $x$."
- The rest ($36\%$) is due to other factors and scatter.
s: typical prediction error
- The standard deviation of the residuals $s$ is the typical size of a prediction error.
- It's in the units of $y$: "predictions are typically off by about $s$."
- Smaller $s$ = tighter fit; larger $s$ = looser predictions.
- $s$ answers "how far off, in real units?" while $r^2$ answers "what fraction explained?"
Slope from summary stats
- You can build the line from summary statistics without the raw data:
- Slope: $b = r\dfrac{s_y}{s_x}$ — correlation scaled by the ratio of spreads.
- Intercept: the line always passes through $(\bar{x}, \bar{y})$, so $a = \bar{y} - b\bar{x}$.
- These two formulas recover $\hat{y} = a + bx$ from $r$, the means, and the standard deviations.
Don't confuse the two fit numbers. $r^2$ is a unitless fraction ("$64\%$ of variation explained"); $s$ is a typical error in the units of $y$ ("off by about $s$"). And when you compute the slope, mind the order: $b = r\,s_y/s_x$ — it's $s_y$ (response spread) over $s_x$ (explanatory spread), not the reverse.
A fit has $r = 0.8$, $s_x = 2$, $s_y = 10$, $\bar{x}=5$, $\bar{y}=60$.
- Slope: $b = 0.8 \times \dfrac{10}{2} = 4$.
- Intercept: $a = 60 - 4(5) = 40$, so $\hat{y} = 40 + 4x$.
- $r^2 = 0.64$: $64\%$ of the variation in $y$ is explained by the model.
The least-squares line minimizes the sum of squared residuals. $r^2$ is the fraction of variation in $y$ explained (unitless, $0$–$1$); $s$ is the typical prediction error (units of $y$). From summary stats, $b = r\dfrac{s_y}{s_x}$ and the line passes through $(\bar{x}, \bar{y})$.
最適適合の最小二乗直線
垂直距離の二乗和を最小にする直線。
r = 0.8, s_x = 2, s_y = 10 のとき、傾き b = r·(s_y/s_x) を求めよ。
難易度 2/5 · 140 コイン + 今日初回完了時に小ボーナス付与
b = 0.8 × (10/2) = 0.8 × 5 = 4.
相関が r = 0.8 の場合、r-squared はいくつですか?
難易度 2/5 · 140 コイン + 今日初回完了時に小ボーナス付与
r² = 0.8² = 0.64.
r² = 0.64 は以下のように解釈するのが最適です...
難易度 1/5 · 100 コイン + 今日初回完了時に小ボーナス付与
r² は y の変動の中で説明される割合です。
最小二乗直線は、残差の二乗和を最小化します。
難易度 1/5 · 100 コイン + 今日初回完了時に小ボーナス付与
これがそれを定義する基準そのものです。
y の単位で測定される典型的な予測誤差となる量はどれですか?
難易度 1/5 · 100 コイン + 今日初回完了時に小ボーナス付与
sはyの単位で表され、r²とrは無次元である。