Skip to content

Commit b5014be

Browse files
authored
Merge pull request #70 from StatProofBook/master
update to master
2 parents 73bf2e5 + 805202b commit b5014be

9 files changed

Lines changed: 30 additions & 12 deletions

File tree

I/PbA.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: "Proof by Author"
44
---
55

66

7-
### JoramSoch (270 proofs)
7+
### JoramSoch (275 proofs)
88

99
- [(Non-)Multiplicativity of the expected value](/P/mean-mult)
1010
- [Accuracy and complexity for the univariate Gaussian](/P/ug-anc)
@@ -60,6 +60,7 @@ title: "Proof by Author"
6060
- [Differential entropy of the multivariate normal distribution](/P/mvn-dent)
6161
- [Differential entropy of the normal distribution](/P/norm-dent)
6262
- [Differential entropy of the normal-gamma distribution](/P/ng-dent)
63+
- [Distribution of parameter estimates for simple linear regression](/P/slr-olsdist)
6364
- [Distribution of the inverse general linear model](/P/iglm-dist)
6465
- [Distribution of the transformed general linear model](/P/tglm-dist)
6566
- [Distributional transformation using cumulative distribution function](/P/cdf-dt)
@@ -223,6 +224,7 @@ title: "Proof by Author"
223224
- [Probability under mutual exclusivity](/P/prob-exc)
224225
- [Probability under statistical independence](/P/prob-ind)
225226
- [Projection matrix and residual-forming matrix are idempotent](/P/mlr-idem)
227+
- [Projection of a data point to the regression line](/P/slr-proj)
226228
- [Quantile function is inverse of strictly monotonically increasing cumulative distribution function](/P/qf-cdf)
227229
- [Quantile function of the continuous uniform distribution](/P/cuni-qf)
228230
- [Quantile function of the discrete uniform distribution](/P/duni-qf)
@@ -258,10 +260,13 @@ title: "Proof by Author"
258260
- [Relationship between signal-to-noise ratio and R²](/P/snr-rsq)
259261
- [Scaling of the variance upon multiplication with a constant](/P/var-scal)
260262
- [Second central moment is variance](/P/momcent-2nd)
263+
- [Simple linear regression is a special case of multiple linear regression](/P/slr-mlr)
264+
- [Sums of squares for simple linear regression](/P/slr-sss)
261265
- [The regression line goes through the center of mass point](/P/slr-comp)
262266
- [The residuals and the covariate are uncorrelated in simple linear regression](/P/slr-rescorr)
263267
- [The sum of residuals is zero in simple linear regression](/P/slr-ressum)
264268
- [Transformation matrices for ordinary least squares](/P/mlr-mat)
269+
- [Transformation matrices for simple linear regression](/P/slr-mat)
265270
- [Transposition of a matrix-normal random variable](/P/matn-trans)
266271
- [Two-sample t-test for independent observations](/P/ug-ttest2)
267272
- [Two-sample z-test for independent observations](/P/ugkv-ztest2)

I/PbN.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,3 +286,8 @@ title: "Proof by Number"
286286
| P278 | slr-resvar | [Relationship between residual variance and sample variance in simple linear regression](/P/slr-resvar) | JoramSoch | 2021-10-27 |
287287
| P279 | slr-corr | [Relationship between correlation coefficient and slope estimate in simple linear regression](/P/slr-corr) | JoramSoch | 2021-10-27 |
288288
| P280 | slr-rsq | [Relationship between coefficient of determination and correlation coefficient in simple linear regression](/P/slr-rsq) | JoramSoch | 2021-10-27 |
289+
| P281 | slr-mlr | [Simple linear regression is a special case of multiple linear regression](/P/slr-mlr) | JoramSoch | 2021-11-09 |
290+
| P282 | slr-olsdist | [Distribution of parameter estimates for simple linear regression](/P/slr-olsdist) | JoramSoch | 2021-11-09 |
291+
| P283 | slr-proj | [Projection of a data point to the regression line](/P/slr-proj) | JoramSoch | 2021-11-09 |
292+
| P284 | slr-sss | [Sums of squares for simple linear regression](/P/slr-sss) | JoramSoch | 2021-11-09 |
293+
| P285 | slr-mat | [Transformation matrices for simple linear regression](/P/slr-mat) | JoramSoch | 2021-11-09 |

I/PbT.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ title: "Proof by Topic"
6969
- [Differential entropy of the multivariate normal distribution](/P/mvn-dent)
7070
- [Differential entropy of the normal distribution](/P/norm-dent)
7171
- [Differential entropy of the normal-gamma distribution](/P/ng-dent)
72+
- [Distribution of parameter estimates for simple linear regression](/P/slr-olsdist)
7273
- [Distribution of the inverse general linear model](/P/iglm-dist)
7374
- [Distribution of the transformed general linear model](/P/tglm-dist)
7475
- [Distributional transformation using cumulative distribution function](/P/cdf-dt)
@@ -271,6 +272,7 @@ title: "Proof by Topic"
271272
- [Probability under mutual exclusivity](/P/prob-exc)
272273
- [Probability under statistical independence](/P/prob-ind)
273274
- [Projection matrix and residual-forming matrix are idempotent](/P/mlr-idem)
275+
- [Projection of a data point to the regression line](/P/slr-proj)
274276
- [Proof Template](/P/-temp-)
275277

276278
### Q
@@ -317,13 +319,16 @@ title: "Proof by Topic"
317319
- [Savage-Dickey Density Ratio for computing Bayes Factors](/P/bf-sddr)
318320
- [Scaling of the variance upon multiplication with a constant](/P/var-scal)
319321
- [Second central moment is variance](/P/momcent-2nd)
322+
- [Simple linear regression is a special case of multiple linear regression](/P/slr-mlr)
323+
- [Sums of squares for simple linear regression](/P/slr-sss)
320324

321325
### T
322326

323327
- [The regression line goes through the center of mass point](/P/slr-comp)
324328
- [The residuals and the covariate are uncorrelated in simple linear regression](/P/slr-rescorr)
325329
- [The sum of residuals is zero in simple linear regression](/P/slr-ressum)
326330
- [Transformation matrices for ordinary least squares](/P/mlr-mat)
331+
- [Transformation matrices for simple linear regression](/P/slr-mat)
327332
- [Transitivity of Bayes Factors](/P/bf-trans)
328333
- [Transposition of a matrix-normal random variable](/P/matn-trans)
329334
- [Two-sample t-test for independent observations](/P/ug-ttest2)

I/PwS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ title: "Proofs without Source"
8686
- [Relationship between R² and maximum log-likelihood](/P/rsq-mll)
8787
- [Relationship between second raw moment, variance and mean](/P/momraw-2nd)
8888
- [Relationship between signal-to-noise ratio and R²](/P/snr-rsq)
89+
- [Simple linear regression is a special case of multiple linear regression](/P/slr-mlr)
90+
- [Sums of squares for simple linear regression](/P/slr-sss)
91+
- [Transformation matrices for simple linear regression](/P/slr-mat)
8992
- [Transitivity of Bayes Factors](/P/bf-trans)
9093
- [Transposition of a matrix-normal random variable](/P/matn-trans)
9194
- [Variance of the Wald distribution](/P/wald-var)

P/prob-exh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ username: "JoramSoch"
3333
---
3434

3535

36-
**Theorem:** Let $B_1, \ldots, B_n$ be mutually exclusive and collectively exhaustive subsets of a [sample space](/D/samp-spc) \Omega. Then, their [total probability](/P/prob-tot) is one:
36+
**Theorem:** Let $B_1, \ldots, B_n$ be mutually exclusive and collectively exhaustive subsets of a [sample space](/D/samp-spc) $\Omega$. Then, their [total probability](/P/prob-tot) is one:
3737

3838
$$ \label{eq:prob-exh}
3939
\sum_i P(B_i) = 1 \; .

P/slr-mat.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ E &= (X^\mathrm{T} X)^{-1} X^\mathrm{T} \\
6868
&= \left( \left[ \begin{matrix} n & n\bar{x} \\ n\bar{x} & x^\mathrm{T} x \end{matrix} \right] \right)^{-1} \left[ \begin{matrix} 1_n^\mathrm{T} \\ x^\mathrm{T} \end{matrix} \right] \\
6969
&= \frac{1}{n x^\mathrm{T} x - (n\bar{x})^2} \left[ \begin{matrix} x^\mathrm{T} x & -n\bar{x} \\ -n\bar{x} & n \end{matrix} \right] \left[ \begin{matrix} 1_n^\mathrm{T} \\ x^\mathrm{T} \end{matrix} \right] \\
7070
&= \frac{1}{x^\mathrm{T} x - n\bar{x}^2} \left[ \begin{matrix} x^\mathrm{T} x/n & -\bar{x} \\ -\bar{x} & 1 \end{matrix} \right] \left[ \begin{matrix} 1_n^\mathrm{T} \\ x^\mathrm{T} \end{matrix} \right] \\
71-
&= \frac{1}{(n-1)\,s_x^2} \left[ \begin{matrix} (x^\mathrm{T} x/n) \, 1_n^\mathrm{T} - \bar{x} \, x^\mathrm{T} \\ - \bar{x} \, 1_n^\mathrm{T} + x^\mathrm{T} \end{matrix} \right] \; .
71+
&\overset{\eqref{eq:b-est-cov-den}}{=} \frac{1}{(n-1)\,s_x^2} \left[ \begin{matrix} (x^\mathrm{T} x/n) \, 1_n^\mathrm{T} - \bar{x} \, x^\mathrm{T} \\ - \bar{x} \, 1_n^\mathrm{T} + x^\mathrm{T} \end{matrix} \right] \; .
7272
\end{split}
7373
$$
7474

@@ -83,7 +83,7 @@ which is an $n \times n$ matrix and can be reformulated as follows:
8383

8484
$$ \label{eq:P-qed}
8585
\begin{split}
86-
P &= X \, E = \left[ \begin{matrix} 1_n & x \end{matrix} \right] \left[ \begin{matrix} e_1 \\ e_2 \end{matrix} \right] \\
86+
P &= X \, E = \left[ 1_n, \, x \right] \left[ \begin{matrix} e_1 \\ e_2 \end{matrix} \right] \\
8787
&= \frac{1}{(n-1)\,s_x^2} \left[ \begin{matrix} 1 & x_1 \\ \vdots & \vdots \\ 1 & x_n \end{matrix} \right] \left[ \begin{matrix} (x^\mathrm{T} x/n) - \bar{x} x_1 & \cdots & (x^\mathrm{T} x/n) - \bar{x} x_n \\ -\bar{x} + x_1 & \cdots & -\bar{x} + x_n \end{matrix} \right] \\
8888
&= \frac{1}{(n-1)\,s_x^2} \left[ \begin{matrix} (x^\mathrm{T} x/n) - 2 \bar{x} x_1 + x_1^2 & \cdots & (x^\mathrm{T} x/n) - \bar{x} (x_1 + x_n) + x_1 x_n \\ \vdots & \ddots & \vdots \\ (x^\mathrm{T} x/n) - \bar{x} (x_1 + x_n) + x_1 x_n & \cdots & (x^\mathrm{T} x/n) - 2 \bar{x} x_n + x_n^2 \end{matrix} \right] \; .
8989
\end{split}
@@ -101,7 +101,7 @@ which also is an $n \times n$ matrix and can be reformulated as follows:
101101
$$ \label{eq:R-qed}
102102
\begin{split}
103103
R &= I_n - P = \left[ \begin{matrix} 1 & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & 1 \end{matrix} \right] - \left[ \begin{matrix} p_{11} & \cdots & p_{1n} \\ \vdots & \ddots & \vdots \\ p_{n1} & \cdots & p_{nn} \end{matrix} \right] \\
104-
&= \frac{1}{(n-1)\,s_x^2} \left[ \begin{matrix} x^\mathrm{T} x - n\bar{x}^2 & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & x^\mathrm{T} x - n\bar{x}^2 \end{matrix} \right] \\
104+
&\overset{\eqref{eq:b-est-cov-den}}{=} \frac{1}{(n-1)\,s_x^2} \left[ \begin{matrix} x^\mathrm{T} x - n\bar{x}^2 & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & x^\mathrm{T} x - n\bar{x}^2 \end{matrix} \right] \\
105105
&- \frac{1}{(n-1)\,s_x^2} \left[ \begin{matrix} (x^\mathrm{T} x/n) - 2 \bar{x} x_1 + x_1^2 & \cdots & (x^\mathrm{T} x/n) - \bar{x} (x_1 + x_n) + x_1 x_n \\ \vdots & \ddots & \vdots \\ (x^\mathrm{T} x/n) - \bar{x} (x_1 + x_n) + x_1 x_n & \cdots & (x^\mathrm{T} x/n) - 2 \bar{x} x_n + x_n^2 \end{matrix} \right] \\
106106
&= \frac{1}{(n-1)\,s_x^2} \left[ \begin{matrix} (n-1) (x^\mathrm{T} x/n) + \bar{x} (2 x_1 - n\bar{x}) - x_1^2 & \cdots & -(x^\mathrm{T} x/n) + \bar{x} (x_1 + x_n) - x_1 x_n \\ \vdots & \ddots & \vdots \\ -(x^\mathrm{T} x/n) + \bar{x} (x_1 + x_n) - x_1 x_n & \cdots & (n-1) (x^\mathrm{T} x/n) + \bar{x} (2 x_n - n\bar{x}) - x_n^2 \end{matrix} \right] \; .
107107
\end{split}

P/slr-olsdist.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ $$ \label{eq:slr-olsdist}
3939
\left[ \begin{matrix} \hat{\beta}_0 \\ \hat{\beta}_1 \end{matrix} \right] \sim \mathcal{N}\left( \left[ \begin{matrix} \beta_0 \\ \beta_1 \end{matrix} \right], \, \frac{\sigma^2}{(n-1) \, s_x^2} \cdot \left[ \begin{matrix} x^\mathrm{T}x/n & -\bar{x} \\ -\bar{x} & 1 \end{matrix} \right] \right)
4040
$$
4141

42-
where $s_x^2$ is the [sample variance](/D/var-samp) of $x$.
42+
where $\bar{x}$ is the [sample mean](/D/mean-samp) and $s_x^2$ is the [sample variance](/D/var-samp) of $x$.
4343

4444

4545
**Proof:** [Simple linear regression is a special case of multiple linear regression](/P/slr-mlr) with

P/slr-proj.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ P\left(w \mid \hat{\beta}_0 + \hat{\beta}_1 w\right) \quad \text{with} \quad w =
4040
$$
4141

4242

43-
**Proof:** The intersection point of the regression line with the y-axis is
43+
**Proof:** The intersection point of the [regression line](/D/regline) with the y-axis is
4444

4545
$$ \label{eq:S}
4646
S(0 \vert \hat{\beta}_0) \; .
@@ -89,8 +89,8 @@ With \eqref{eq:a} and \eqref{eq:b}, $w$ can be calculated as
8989
$$ \label{eq:w-qed}
9090
\begin{split}
9191
w &= \frac{a^\mathrm{T} b}{a^\mathrm{T} a} \\
92-
&= \frac{\left( \begin{matrix} 1 \\ \hat{\beta}_1 \end{matrix} \right)^\mathrm{T} \left( \begin{matrix} x_o \\ y_o - \hat{\beta}_0 \end{matrix} \right)}{\left( \begin{matrix} 1 \\ \hat{\beta}_1 \end{matrix} \right)^\mathrm{T} \left( \begin{matrix} 1 \\ \hat{\beta}_1 \end{matrix} \right)} \\
93-
&= \frac{x_0 + (y_o - \hat{\beta}_0) \hat{\beta}_1}{1 + \hat{\beta}_1^2}
92+
w &= \frac{\left( \begin{matrix} 1 \\ \hat{\beta}_1 \end{matrix} \right)^\mathrm{T} \left( \begin{matrix} x_o \\ y_o - \hat{\beta}_0 \end{matrix} \right)}{\left( \begin{matrix} 1 \\ \hat{\beta}_1 \end{matrix} \right)^\mathrm{T} \left( \begin{matrix} 1 \\ \hat{\beta}_1 \end{matrix} \right)} \\
93+
w &= \frac{x_0 + (y_o - \hat{\beta}_0) \hat{\beta}_1}{1 + \hat{\beta}_1^2}
9494
\end{split}
9595
$$
9696

@@ -100,4 +100,4 @@ $$ \label{eq:P-qed}
100100
\left( \begin{matrix} x_p \\ y_p \end{matrix} \right) = \left( \begin{matrix} 0 \\ \hat{\beta}_0 \end{matrix} \right) + w \cdot \left( \begin{matrix} 1 \\ \hat{\beta}_1 \end{matrix} \right) = \left( \begin{matrix} w \\ \hat{\beta}_0 + \hat{\beta}_1 w \end{matrix} \right) \; .
101101
$$
102102

103-
Together, \eqref{eq:P-qed} and \eqref{eq:w-qed} constitute the proof of \eqref{eq:slr-proj}.
103+
Together, \eqref{eq:P-qed} and \eqref{eq:w-qed} constitute the proof of equation \eqref{eq:slr-proj}.

P/slr-sss.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ $$ \label{eq:RSS-qed}
9292
\begin{split}
9393
\mathrm{RSS} &= \sum_{i=1}^n (y_i - \hat{y}_i)^2 \\
9494
&= \sum_{i=1}^n (y_i - \hat{\beta}_0 - \hat{\beta}_1 x_i)^2 \\
95-
&= \sum_{i=1}^n (y_i - \bar{y} + \hat{\beta}_1 \bar{x} - \hat{\beta}_1 x_i)^2 \\
95+
&\overset{\eqref{eq:slr-ols}}{=} \sum_{i=1}^n (y_i - \bar{y} + \hat{\beta}_1 \bar{x} - \hat{\beta}_1 x_i)^2 \\
9696
&= \sum_{i=1}^n \left( (y_i - \bar{y}) - \hat{\beta}_1 (x_i - \bar{x}) \right)^2 \\
9797
&= \sum_{i=1}^n \left( (y_i - \bar{y})^2 - 2 \hat{\beta}_1 (x_i - \bar{x}) (y_i - \bar{y}) + \hat{\beta}_1^2 (x_i - \bar{x})^2 \right) \\
9898
&= \sum_{i=1}^n (y_i - \bar{y})^2 - 2 \hat{\beta}_1 \sum_{i=1}^n (x_i - \bar{x}) (y_i - \bar{y}) + \hat{\beta}_1^2 \sum_{i=1}^n (x_i - \bar{x})^2 \\
9999
&= (n-1) \, s_y^2 - 2 (n-1) \, \hat{\beta}_1 \, s_{xy} + (n-1) \, \hat{\beta}_1^2 \, s_x^2 \\
100-
&= (n-1) \, s_y^2 - 2 (n-1) \left( \frac{s_{xy}}{s_x^2} \right) s_{xy} + (n-1) \left( \frac{s_{xy}}{s_x^2} \right)^2 s_x^2 \\
100+
&\overset{\eqref{eq:slr-ols}}{=} (n-1) \, s_y^2 - 2 (n-1) \left( \frac{s_{xy}}{s_x^2} \right) s_{xy} + (n-1) \left( \frac{s_{xy}}{s_x^2} \right)^2 s_x^2 \\
101101
&= (n-1) \, s_y^2 - (n-1) \, \frac{s_{xy}^2}{s_x^2} \\
102102
&= (n-1) \left( s_y^2 - \frac{s_{xy}^2}{s_x^2} \right) \; .
103103
\end{split}

0 commit comments

Comments
 (0)