<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mathresearch.utsa.edu/wiki/index.php?action=history&amp;feed=atom&amp;title=The_Least-squares_Solution</id>
	<title>The Least-squares Solution - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mathresearch.utsa.edu/wiki/index.php?action=history&amp;feed=atom&amp;title=The_Least-squares_Solution"/>
	<link rel="alternate" type="text/html" href="https://mathresearch.utsa.edu/wiki/index.php?title=The_Least-squares_Solution&amp;action=history"/>
	<updated>2026-05-24T07:35:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://mathresearch.utsa.edu/wiki/index.php?title=The_Least-squares_Solution&amp;diff=3450&amp;oldid=prev</id>
		<title>Khanh at 17:07, 4 November 2021</title>
		<link rel="alternate" type="text/html" href="https://mathresearch.utsa.edu/wiki/index.php?title=The_Least-squares_Solution&amp;diff=3450&amp;oldid=prev"/>
		<updated>2021-11-04T17:07:03Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 17:07, 4 November 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l66&quot; &gt;Line 66:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 66:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:&amp;lt;math&amp;gt;\hat{\boldsymbol{\beta}}= \boldsymbol{\beta} + (\mathbf{X}^\top \mathbf{X} )^{-1}\mathbf {X}^\top \boldsymbol{\varepsilon}.&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:&amp;lt;math&amp;gt;\hat{\boldsymbol{\beta}}= \boldsymbol{\beta} + (\mathbf{X}^\top \mathbf{X} )^{-1}\mathbf {X}^\top \boldsymbol{\varepsilon}.&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Resources&lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Licensing &lt;/ins&gt;==  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Content obtained and/or adapted from:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [https://en.wikipedia.org/wiki/Ordinary_least_squares Ordinary least squares&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;]&lt;/del&gt;, Wikipedia&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [https://en.wikipedia.org/wiki/Ordinary_least_squares Ordinary least squares, Wikipedia&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;] under a CC BY-SA license&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Khanh</name></author>
		
	</entry>
	<entry>
		<id>https://mathresearch.utsa.edu/wiki/index.php?title=The_Least-squares_Solution&amp;diff=2224&amp;oldid=prev</id>
		<title>Lila at 20:51, 12 October 2021</title>
		<link rel="alternate" type="text/html" href="https://mathresearch.utsa.edu/wiki/index.php?title=The_Least-squares_Solution&amp;diff=2224&amp;oldid=prev"/>
		<updated>2021-10-12T20:51:44Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 20:51, 12 October 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l65&quot; &gt;Line 65:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 65:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:&amp;lt;math&amp;gt;\hat{\boldsymbol{\beta}}= \boldsymbol{\beta} + (\mathbf{X}^\top \mathbf{X} )^{-1}\mathbf {X}^\top \boldsymbol{\varepsilon}.&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:&amp;lt;math&amp;gt;\hat{\boldsymbol{\beta}}= \boldsymbol{\beta} + (\mathbf{X}^\top \mathbf{X} )^{-1}\mathbf {X}^\top \boldsymbol{\varepsilon}.&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==Resources==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* [https://en.wikipedia.org/wiki/Ordinary_least_squares Ordinary least squares], Wikipedia&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lila</name></author>
		
	</entry>
	<entry>
		<id>https://mathresearch.utsa.edu/wiki/index.php?title=The_Least-squares_Solution&amp;diff=2223&amp;oldid=prev</id>
		<title>Lila: /* Matrix/vector formulation */</title>
		<link rel="alternate" type="text/html" href="https://mathresearch.utsa.edu/wiki/index.php?title=The_Least-squares_Solution&amp;diff=2223&amp;oldid=prev"/>
		<updated>2021-10-12T20:50:02Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Matrix/vector formulation&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 20:50, 12 October 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l58&quot; &gt;Line 58:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 58:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:&amp;lt;math&amp;gt;(\mathrm{X}^{\mathsf T} \mathrm{X} )\hat{\boldsymbol{\beta}} = \mathrm{X}^{\mathsf T} \mathbf y\ .&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:&amp;lt;math&amp;gt;(\mathrm{X}^{\mathsf T} \mathrm{X} )\hat{\boldsymbol{\beta}} = \mathrm{X}^{\mathsf T} \mathbf y\ .&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The matrix &amp;lt;math&amp;gt;\mathrm{X}^{\mathsf T} \mathrm X&amp;lt;/math&amp;gt; is known as the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;[[&lt;/del&gt;Gram matrix&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;]] &lt;/del&gt;and the matrix &amp;lt;math&amp;gt;\mathrm{X}^{\mathsf T} \mathbf y&amp;lt;/math&amp;gt; is known as the moment matrix of regressand by regressors. Finally, &amp;lt;math&amp;gt;\hat{\boldsymbol{\beta}}&amp;lt;/math&amp;gt; is the coefficient vector of the least-squares hyperplane, expressed as&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The matrix &amp;lt;math&amp;gt;\mathrm{X}^{\mathsf T} \mathrm X&amp;lt;/math&amp;gt; is known as the Gram matrix and the matrix &amp;lt;math&amp;gt;\mathrm{X}^{\mathsf T} \mathbf y&amp;lt;/math&amp;gt; is known as the moment matrix of regressand by regressors. Finally, &amp;lt;math&amp;gt;\hat{\boldsymbol{\beta}}&amp;lt;/math&amp;gt; is the coefficient vector of the least-squares hyperplane, expressed as&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:&amp;lt;math&amp;gt;\hat{\boldsymbol{\beta}}= \left( \mathrm{X}^{\mathsf T} \mathrm{X} \right)^{-1} \mathrm{X}^{\mathsf T} \mathbf y.&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:&amp;lt;math&amp;gt;\hat{\boldsymbol{\beta}}= \left( \mathrm{X}^{\mathsf T} \mathrm{X} \right)^{-1} \mathrm{X}^{\mathsf T} \mathbf y.&amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lila</name></author>
		
	</entry>
	<entry>
		<id>https://mathresearch.utsa.edu/wiki/index.php?title=The_Least-squares_Solution&amp;diff=2222&amp;oldid=prev</id>
		<title>Lila: /* Linear model */</title>
		<link rel="alternate" type="text/html" href="https://mathresearch.utsa.edu/wiki/index.php?title=The_Least-squares_Solution&amp;diff=2222&amp;oldid=prev"/>
		<updated>2021-10-12T20:49:28Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Linear model&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 20:49, 12 October 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l17&quot; &gt;Line 17:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 17:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;: &amp;lt;math&amp;gt; \mathbf{y} = \mathrm{X} \boldsymbol{\beta} + \boldsymbol{\varepsilon}, \,  &amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;: &amp;lt;math&amp;gt; \mathbf{y} = \mathrm{X} \boldsymbol{\beta} + \boldsymbol{\varepsilon}, \,  &amp;lt;/math&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;where &amp;lt;math&amp;gt;\mathbf{y}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\boldsymbol{\varepsilon}&amp;lt;/math&amp;gt; are &amp;lt;math&amp;gt;n \times 1&amp;lt;/math&amp;gt; vectors of the response variables and the errors of the &amp;lt;math&amp;gt; n  &amp;lt;/math&amp;gt; observations, and &amp;lt;math&amp;gt;\mathrm{X}&amp;lt;/math&amp;gt; is an &amp;lt;math&amp;gt;n \times p&amp;lt;/math&amp;gt; matrix of regressors, also sometimes called the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;[[&lt;/del&gt;design matrix&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;]]&lt;/del&gt;, whose row &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\mathbf{x}_i^\mathsf{T}&amp;lt;/math&amp;gt; and contains the &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-th observations on all the explanatory variables.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;where &amp;lt;math&amp;gt;\mathbf{y}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\boldsymbol{\varepsilon}&amp;lt;/math&amp;gt; are &amp;lt;math&amp;gt;n \times 1&amp;lt;/math&amp;gt; vectors of the response variables and the errors of the &amp;lt;math&amp;gt; n  &amp;lt;/math&amp;gt; observations, and &amp;lt;math&amp;gt;\mathrm{X}&amp;lt;/math&amp;gt; is an &amp;lt;math&amp;gt;n \times p&amp;lt;/math&amp;gt; matrix of regressors, also sometimes called the design matrix, whose row &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\mathbf{x}_i^\mathsf{T}&amp;lt;/math&amp;gt; and contains the &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-th observations on all the explanatory variables.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;As a rule, the constant term is always included in the set of regressors &amp;lt;math&amp;gt;\mathrm{X}&amp;lt;/math&amp;gt;, say, by taking &amp;lt;math&amp;gt;x_{i1}=1&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;i=1, \dots, n&amp;lt;/math&amp;gt;. The coefficient &amp;lt;math&amp;gt;\beta_1&amp;lt;/math&amp;gt; corresponding to this regressor is called the ''intercept''.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;As a rule, the constant term is always included in the set of regressors &amp;lt;math&amp;gt;\mathrm{X}&amp;lt;/math&amp;gt;, say, by taking &amp;lt;math&amp;gt;x_{i1}=1&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;i=1, \dots, n&amp;lt;/math&amp;gt;. The coefficient &amp;lt;math&amp;gt;\beta_1&amp;lt;/math&amp;gt; corresponding to this regressor is called the ''intercept''.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lila</name></author>
		
	</entry>
	<entry>
		<id>https://mathresearch.utsa.edu/wiki/index.php?title=The_Least-squares_Solution&amp;diff=2221&amp;oldid=prev</id>
		<title>Lila: Created page with &quot;'''Ordinary least squares''' ('''OLS''') is a type of linear least squares method for estimating the unknown parameters in a linear regression model. OLS chooses the parameter...&quot;</title>
		<link rel="alternate" type="text/html" href="https://mathresearch.utsa.edu/wiki/index.php?title=The_Least-squares_Solution&amp;diff=2221&amp;oldid=prev"/>
		<updated>2021-10-12T20:49:01Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;Ordinary least squares&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;OLS&amp;#039;&amp;#039;&amp;#039;) is a type of linear least squares method for estimating the unknown parameters in a linear regression model. OLS chooses the parameter...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''Ordinary least squares''' ('''OLS''') is a type of linear least squares method for estimating the unknown parameters in a linear regression model. OLS chooses the parameters of a linear function of a set of explanatory variables by the principle of least squares: minimizing the sum of the squares of the differences between the observed dependent variable (values of the variable being observed) in the given dataset and those predicted by the linear function of the independent variable.&lt;br /&gt;
&lt;br /&gt;
Geometrically, this is seen as the sum of the squared distances, parallel to the axis of the dependent variable, between each data point in the set and the corresponding point on the regression surface—the smaller the differences, the better the model fits the data. The resulting estimator can be expressed by a simple formula, especially in the case of a simple linear regression, in which there is a single regressor on the right side of the regression equation.&lt;br /&gt;
&lt;br /&gt;
The OLS estimator is consistent when the regressors are exogenous, and—by the Gauss–Markov theorem-optimal in the class of linear unbiased estimators when the errors are homoscedastic and serially uncorrelated. Under these conditions, the method of OLS provides minimum-variance mean-unbiased estimation when the errors have finite variances. Under the additional assumption that the errors are normally distributed, OLS is the maximum likelihood estimator.&lt;br /&gt;
&lt;br /&gt;
== Linear model ==&lt;br /&gt;
&lt;br /&gt;
[[File:Okuns law quarterly differences.svg|300px|thumb|Okun's law in macroeconomics states that in an economy the GDP growth should depend linearly on the changes in the unemployment rate. Here the ordinary least squares method is used to construct the regression line describing this law.]]&lt;br /&gt;
Suppose the data consists of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; observations &amp;lt;math&amp;gt;\left\{\mathbf{x}_i, y_i\right\}_{i=1}^n&amp;lt;/math&amp;gt;. Each observation &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; includes a scalar response &amp;lt;math&amp;gt;y_i&amp;lt;/math&amp;gt; and a column vector &amp;lt;math&amp;gt;\mathbf{x}_i&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; parameters (regressors), i.e., &amp;lt;math&amp;gt;\mathbf{x}_i=\left[x_{i1}, x_{i2}, \dots, x_{ip}\right]^\mathsf{T}&amp;lt;/math&amp;gt;. In a linear regression model, the response variable, &amp;lt;math&amp;gt;y_i&amp;lt;/math&amp;gt;, is a linear function of the regressors:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;y_i = \beta_1\ x_{i1} + \beta_2\ x_{i2} + \cdots + \beta_p\ x_{ip} + \varepsilon_i,&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or in vector form,&lt;br /&gt;
: &amp;lt;math&amp;gt; y_i = \mathbf{x}_i^\mathsf{T} \boldsymbol{\beta} + \varepsilon_i, \, &amp;lt;/math&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\mathbf{x}_i&amp;lt;/math&amp;gt;, as introduced previously, is a column vector of the &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-th observation of all the explanatory variables; &amp;lt;math&amp;gt;\boldsymbol{\beta}&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;p \times 1&amp;lt;/math&amp;gt; vector of unknown parameters; and the scalar &amp;lt;math&amp;gt;\varepsilon_i&amp;lt;/math&amp;gt; represents unobserved random variables ([[errors and residuals in statistics|errors]]) of the &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-th observation. &amp;lt;math&amp;gt;\varepsilon_i&amp;lt;/math&amp;gt; accounts for the influences upon the responses &amp;lt;math&amp;gt;y_i&amp;lt;/math&amp;gt; from sources other than the explanators &amp;lt;math&amp;gt;\mathbf{x}_i&amp;lt;/math&amp;gt;. This model can also be written in matrix notation as&lt;br /&gt;
: &amp;lt;math&amp;gt; \mathbf{y} = \mathrm{X} \boldsymbol{\beta} + \boldsymbol{\varepsilon}, \,  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;\mathbf{y}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\boldsymbol{\varepsilon}&amp;lt;/math&amp;gt; are &amp;lt;math&amp;gt;n \times 1&amp;lt;/math&amp;gt; vectors of the response variables and the errors of the &amp;lt;math&amp;gt; n  &amp;lt;/math&amp;gt; observations, and &amp;lt;math&amp;gt;\mathrm{X}&amp;lt;/math&amp;gt; is an &amp;lt;math&amp;gt;n \times p&amp;lt;/math&amp;gt; matrix of regressors, also sometimes called the [[design matrix]], whose row &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\mathbf{x}_i^\mathsf{T}&amp;lt;/math&amp;gt; and contains the &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-th observations on all the explanatory variables.&lt;br /&gt;
&lt;br /&gt;
As a rule, the constant term is always included in the set of regressors &amp;lt;math&amp;gt;\mathrm{X}&amp;lt;/math&amp;gt;, say, by taking &amp;lt;math&amp;gt;x_{i1}=1&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;i=1, \dots, n&amp;lt;/math&amp;gt;. The coefficient &amp;lt;math&amp;gt;\beta_1&amp;lt;/math&amp;gt; corresponding to this regressor is called the ''intercept''.&lt;br /&gt;
&lt;br /&gt;
Regressors do not have to be independent: there can be any desired relationship between the regressors (so long as it is not a linear relationship). For instance, we might suspect the response depends linearly both on a value and its square; in which case we would include one regressor whose value is just the square of another regressor. In that case, the model would be ''quadratic'' in the second regressor, but none-the-less is still considered a ''linear'' model because the model ''is'' still linear in the parameters (&amp;lt;math&amp;gt;\boldsymbol{\beta}&amp;lt;/math&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===Matrix/vector formulation===&lt;br /&gt;
Consider an overdetermined system&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\sum_{j=1}^{p} X_{ij} \beta_j = y_i,\ (i=1, 2, \dots, n),&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
of &amp;lt;math&amp;gt; n  &amp;lt;/math&amp;gt; linear equations in &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; unknown coefficients, &amp;lt;math&amp;gt; \beta_1, \beta_2, \dots, \beta_p  &amp;lt;/math&amp;gt;, with &amp;lt;math&amp;gt; n &amp;gt; p  &amp;lt;/math&amp;gt;. (Note: for a linear model as above, not all elements in &amp;lt;math&amp;gt; \mathrm{X}  &amp;lt;/math&amp;gt; contains information on the data points. The first column is populated with ones, &amp;lt;math&amp;gt;X_{i1} = 1&amp;lt;/math&amp;gt;. Only the other columns contain actual data. So here &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; is equal to the number of regressors plus one.) This can be written in matrix form as&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathrm{X} \boldsymbol{\beta} = \mathbf {y},&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathrm{X}=\begin{bmatrix}&lt;br /&gt;
X_{11} &amp;amp; X_{12} &amp;amp; \cdots &amp;amp; X_{1p} \\&lt;br /&gt;
X_{21} &amp;amp; X_{22} &amp;amp; \cdots &amp;amp; X_{2p} \\&lt;br /&gt;
\vdots &amp;amp; \vdots &amp;amp; \ddots &amp;amp; \vdots \\&lt;br /&gt;
X_{n1} &amp;amp; X_{n2} &amp;amp; \cdots &amp;amp; X_{np}&lt;br /&gt;
\end{bmatrix} ,&lt;br /&gt;
\qquad \boldsymbol \beta = \begin{bmatrix}&lt;br /&gt;
\beta_1 \\ \beta_2 \\ \vdots \\ \beta_p \end{bmatrix} ,&lt;br /&gt;
\qquad \mathbf y = \begin{bmatrix}&lt;br /&gt;
y_1 \\ y_2 \\ \vdots \\ y_n&lt;br /&gt;
\end{bmatrix}. &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such a system usually has no exact solution, so the goal is instead to find the coefficients &amp;lt;math&amp;gt;\boldsymbol{\beta}&amp;lt;/math&amp;gt; which fit the equations &amp;quot;best&amp;quot;, in the sense of solving the quadratic minimization problem&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\hat{\boldsymbol{\beta}} = \underset{\boldsymbol{\beta}}{\operatorname{arg\,min}}\,S(\boldsymbol{\beta}), &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the objective function &amp;lt;math&amp;gt; S  &amp;lt;/math&amp;gt; is given by&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;S(\boldsymbol{\beta}) = \sum_{i=1}^n \biggl| y_i - \sum_{j=1}^p X_{ij}\beta_j\biggr|^2 = \bigl\|\mathbf y - \mathrm{X} \boldsymbol \beta \bigr\|^2.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A justification for choosing this criterion is given in Properties below. This minimization problem has a unique solution, provided that the &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; columns of the matrix &amp;lt;math&amp;gt; \mathrm{X}  &amp;lt;/math&amp;gt; are linearly independent, given by solving the normal equation&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;(\mathrm{X}^{\mathsf T} \mathrm{X} )\hat{\boldsymbol{\beta}} = \mathrm{X}^{\mathsf T} \mathbf y\ .&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The matrix &amp;lt;math&amp;gt;\mathrm{X}^{\mathsf T} \mathrm X&amp;lt;/math&amp;gt; is known as the [[Gram matrix]] and the matrix &amp;lt;math&amp;gt;\mathrm{X}^{\mathsf T} \mathbf y&amp;lt;/math&amp;gt; is known as the moment matrix of regressand by regressors. Finally, &amp;lt;math&amp;gt;\hat{\boldsymbol{\beta}}&amp;lt;/math&amp;gt; is the coefficient vector of the least-squares hyperplane, expressed as&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\hat{\boldsymbol{\beta}}= \left( \mathrm{X}^{\mathsf T} \mathrm{X} \right)^{-1} \mathrm{X}^{\mathsf T} \mathbf y.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\hat{\boldsymbol{\beta}}= \boldsymbol{\beta} + (\mathbf{X}^\top \mathbf{X} )^{-1}\mathbf {X}^\top \boldsymbol{\varepsilon}.&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lila</name></author>
		
	</entry>
</feed>