|
2 | 2 | <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head> |
3 | 3 |
|
4 | 4 | <meta charset="utf-8"> |
5 | | -<meta name="generator" content="quarto-1.8.25"> |
| 5 | +<meta name="generator" content="quarto-1.8.26"> |
6 | 6 |
|
7 | 7 | <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> |
8 | 8 |
|
|
38 | 38 | <script src="../../site_libs/quarto-html/tippy.umd.min.js"></script> |
39 | 39 | <script src="../../site_libs/quarto-html/anchor.min.js"></script> |
40 | 40 | <link href="../../site_libs/quarto-html/tippy.css" rel="stylesheet"> |
41 | | -<link href="../../site_libs/quarto-html/quarto-syntax-highlighting-065a5179aebd64318d7ea99d77b64a9e.css" rel="stylesheet" id="quarto-text-highlighting-styles"> |
| 41 | +<link href="../../site_libs/quarto-html/quarto-syntax-highlighting-597958c53c93a607afca12fd375c57ed.css" rel="stylesheet" id="quarto-text-highlighting-styles"> |
42 | 42 | <script src="../../site_libs/bootstrap/bootstrap.min.js"></script> |
43 | 43 | <link href="../../site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet"> |
44 | 44 | <link href="../../site_libs/bootstrap/bootstrap-87f2a376d176e4e5e755e23f537f413f.min.css" rel="stylesheet" append-hash="true" id="quarto-bootstrap" data-mode="light"> |
|
125 | 125 | <div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article"> |
126 | 126 | <!-- sidebar --> |
127 | 127 | <nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation floating overflow-auto"> |
128 | | - <div class="pt-lg-2 mt-2 text-left sidebar-header sidebar-header-stacked"> |
129 | | - <a href="../../index.html" class="sidebar-logo-link"> |
130 | | - </a> |
| 128 | + <div class="pt-lg-2 mt-2 text-left sidebar-header"> |
131 | 129 | <div class="sidebar-title mb-0 py-0"> |
132 | 130 | <a href="../../">Data Analysis and Visualization in Python</a> |
133 | 131 | </div> |
|
235 | 233 | <a href="../../topic09_Statistical-Testing-III/script/script_09.html" class="sidebar-item-text sidebar-link"> |
236 | 234 | <span class="menu-text"><span class="chapter-number">9</span> <span class="chapter-title">Statistical Assessments for Big Data</span></span></a> |
237 | 235 | </div> |
| 236 | +</li> |
| 237 | + <li class="sidebar-item"> |
| 238 | + <div class="sidebar-item-container"> |
| 239 | + <a href="../../topic10_LinearRegression/script/script_10.html" class="sidebar-item-text sidebar-link"> |
| 240 | + <span class="menu-text"><span class="chapter-number">10</span> <span class="chapter-title">Linear Regression</span></span></a> |
| 241 | + </div> |
238 | 242 | </li> |
239 | 243 | </ul> |
240 | 244 | </li> |
@@ -270,7 +274,7 @@ <h2 id="toc-title">Table of contents</h2> |
270 | 274 | <li><a href="#probability-conditional-probability-and-dependence" id="toc-probability-conditional-probability-and-dependence" class="nav-link active" data-scroll-target="#probability-conditional-probability-and-dependence"><span class="header-section-number">B.1</span> Probability, conditional probability, and dependence</a></li> |
271 | 275 | <li><a href="#expected-value-variance-and-covariance" id="toc-expected-value-variance-and-covariance" class="nav-link" data-scroll-target="#expected-value-variance-and-covariance"><span class="header-section-number">B.2</span> Expected value, variance, and covariance</a></li> |
272 | 276 | <li><a href="#probs-sample-estimates" id="toc-probs-sample-estimates" class="nav-link" data-scroll-target="#probs-sample-estimates"><span class="header-section-number">B.3</span> Sample estimates</a></li> |
273 | | - <li><a href="#appendix-lin-reg" id="toc-appendix-lin-reg" class="nav-link" data-scroll-target="#appendix-lin-reg"><span class="header-section-number">B.4</span> Linear regression</a></li> |
| 277 | + <li><a href="#sec-appendix-lin-reg" id="toc-sec-appendix-lin-reg" class="nav-link" data-scroll-target="#sec-appendix-lin-reg"><span class="header-section-number">B.4</span> Linear regression</a></li> |
274 | 278 | <li><a href="#resources" id="toc-resources" class="nav-link" data-scroll-target="#resources"><span class="header-section-number">B.5</span> Resources</a></li> |
275 | 279 | </ul> |
276 | 280 | </nav> |
@@ -410,8 +414,8 @@ <h2 data-number="B.3" class="anchored" data-anchor-id="probs-sample-estimates">< |
410 | 414 | \end{align}\]</span></p> |
411 | 415 | <p>where <span class="math inline">\(\bar{x}=\frac{1}{n}\sum_{i=1}^n x_i\)</span> is the sample mean, and analogously for <span class="math inline">\(\bar{y}\)</span>.</p> |
412 | 416 | </section> |
413 | | -<section id="appendix-lin-reg" class="level2" data-number="B.4"> |
414 | | -<h2 data-number="B.4" class="anchored" data-anchor-id="appendix-lin-reg"><span class="header-section-number">B.4</span> Linear regression</h2> |
| 417 | +<section id="sec-appendix-lin-reg" class="level2" data-number="B.4"> |
| 418 | +<h2 data-number="B.4" class="anchored" data-anchor-id="sec-appendix-lin-reg"><span class="header-section-number">B.4</span> Linear regression</h2> |
415 | 419 | <p>This is the proof for the univariate linear regression estimates.</p> |
416 | 420 | <p>For a data set <span class="math inline">\((x, y)_i\)</span> with <span class="math inline">\(i \in \{1 \dots N\}\)</span> the univariate linear model is defined as <span class="math display">\[y_i = \alpha + \beta x_i + \epsilon_i\]</span> with free parameters <span class="math inline">\(\alpha\)</span> and <span class="math inline">\(\beta\)</span> and a random error <span class="math inline">\(\epsilon_i \sim N(0, \sigma^2)\)</span> that is i.i.d. (independently and identically distributed).</p> |
417 | 421 | <p>The normal distribution is defined as <span class="math display">\[N(\epsilon | 0, \sigma^2) = \frac{1}{\sqrt{2 \pi \sigma^2}} \exp(-\frac{\epsilon^2}{2 \sigma^2}) .\]</span></p> |
|
0 commit comments