查看“︁簡單線性迴歸”︁的源代码
←
簡單線性迴歸
跳转到导航
跳转到搜索
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{NoteTA |T=zh-tw:簡單線性迴歸;zh-cn:简单线性回归; |G1=Math |1=zh-cn:最小二乘法;zh-tw:最小平方法;zh-hk:最小平方法 |2=zh-hant:迴歸;zh-tw:迴歸;zh-cn:回归; }} {{迴归侧栏}} [[Image:Okuns law quarterly differences.svg|300px|thumb|[[奧肯法則]]在[[總體經濟學]]是簡單線性迴歸的實例。圖中[[應變數]](經濟增長率)被推論為與[[自變數]](失業率變動)存在負向的線性關係。]] 在[[統計學]]中,'''簡單線性迴歸'''是指僅具有單一的[[自變數]]的[[線性迴歸]]<ref>{{cite book |last=Seltman |first=Howard J. |date=2008-09-08 |title=Experimental Design and Analysis |url=http://www.stat.cmu.edu/~hseltman/309/Book/Book.pdf |page=227 |access-date=2024-04-29 |archive-date=2016-11-30 |archive-url=https://web.archive.org/web/20161130131711/http://www.stat.cmu.edu/~hseltman/309/Book/Book.pdf |dead-url=no }}</ref><ref name=":0">{{cite web |url=http://ci.columbia.edu/ci/premba_test/c0331/s7/s7_6.html |title=Statistical Sampling and Regression: Simple Linear Regression |publisher=Columbia University |access-date=2016-10-17 |quote=When one independent variable is used in a regression, it is called a simple regression;(...) |archive-date=2017-12-11 |archive-url=https://web.archive.org/web/20171211014442/http://ci.columbia.edu/ci/premba_test/c0331/s7/s7_6.html |dead-url=yes }}</ref><ref>{{cite book |last=Lane |first=David M. |title=Introduction to Statistics |url=http://onlinestatbook.com/Online_Statistics_Education.pdf |page=462 |access-date=2024-04-29 |archive-date=2019-12-10 |archive-url=https://web.archive.org/web/20191210180208/http://onlinestatbook.com/Online_Statistics_Education.pdf |dead-url=no }}</ref><ref>{{Cite journal|last=Zou KH|last2=Tuncali K|last3=Silverman SG|date=2003|title=Correlation and simple linear regression.|url=https://archive.org/details/sim_radiology_2003-06_227_3/page/617|journal=Radiology|language=English|volume=227|issue=3|pages=617–22|issn=0033-8419|oclc=110941167|doi=10.1148/radiol.2273011499|pmid=12773666}}</ref><ref>{{Cite journal|last=Altman|first=Naomi|last2=Krzywinski|first2=Martin|date=2015|title=Simple linear regression|journal=Nature Methods|language=English|volume=12|issue=11|pages=999–1000|issn=1548-7091|oclc=5912005539|doi=10.1038/nmeth.3627|pmid=26824102}}</ref>,其中「簡單」係單一自變數之意。此迴歸可用於估計有限的[[截距]]與[[斜率]]以推論[[應變數]]在特定自變數為條件下的[[均值]]。 [[普通最小二乘法]]是常見用於尋求簡單線性迴歸式的方法,目的是得到能使[[殘差平方和]]最小的迴歸式。其它方法,諸如{{en-link|最小絕對偏差|Least absolute deviations}}(使殘差絕對值的總和最小)、[[泰爾-森估算]](所有樣本點兩兩配對的斜率中位數做為整體斜率)等,亦可應用於簡單線性迴歸的命題。{{en-link|戴明迴歸|Deming regression}}(考慮自變數與應變數同時為誤差來源)的功能雖然與上述方法相似但不屬於簡單線性迴歸的範疇,因其不區分自變數與應變數且可能得到多個迴歸式。 以最小平方法處理簡單線性迴歸,則求得的斜率{{mvar|β}}等於自變數{{mvar|x}}與應變數{{mvar|y}}的[[皮爾森積動差相關係數]]與二者的[[標準偏差]]比值的乘積, : <math> \hat{\beta} = r_{x, y} \frac{s_y}{s_x}</math> 而再考慮截距{{mvar|α}}則保證使迴歸線通過自變數與應變數的均值 {{math|({{overline|''x''}}, {{overline|''y''}})}}。 ==計算迴歸式== 以下皆以普通最小二乘法求解簡單線性迴歸式。考慮以下的[[數學模型]]函數 : <math> y = \alpha + \beta x</math>, 是一條[[斜率]]為{{mvar|β}}且[[截距|y軸截距]]為{{mvar|α}}的直線。通常實際上自變數與應變數並非如此完美的關係而存在未知的[[誤差]]{{mvar|ε<sub>i</sub>}},即 : <math> y_i = \alpha + \beta x_i + \varepsilon_i, i = 1, \ldots, n</math>, 以表示第<math>i</math>對資料中自變數與應變數的關係。此模型稱為簡單線性模型。 計算迴歸式的目標是根據資料計算估計值<math>\hat\alpha</math>與<math>\hat\beta</math>以「最佳地」估計參數{{mvar|α}}與{{mvar|β}}。由於採用[[最小平方法]]進行計算,「最佳」係指能使[[殘差平方和]]<math>\hat\varepsilon_i =y_i-\alpha -\beta x_i</math>最小的參數估計值為目標。換句話說,我們尋求能使{{mvar|Q}}函數值最小的解, : <math>Q(\alpha, \beta) = \sum_{i=1}^n\hat\varepsilon_i^{\,2} = \sum_{i=1}^n (y_i -\alpha - \beta x_i)^2</math>。 此解為<math>\hat{\alpha}</math>與<math>\hat{\beta}</math><ref>Kenney, J. F. and Keeping, E. S. (1962) "Linear Regression and Correlation." Ch. 15 in ''Mathematics of Statistics'', Pt. 1, 3rd ed. Princeton, NJ: Van Nostrand, pp. 252–285</ref>, : <math display="inline">\begin{align} \hat\alpha & = \bar{y} - ( \hat\beta\,\bar{x}), \\ \hat\beta &= \frac{ \sum_{i=1}^n (x_i - \bar{x})(y_i - \bar{y}) }{ \sum_{i=1}^n (x_i - \bar{x})^2 } \\ &= \frac{ s_{x, y} }{ s^2_{x} } \\ &= r_{xy} \frac{s_y}{s_x} \end{align}</math> 其中 {{unordered list |<math>\bar x</math>與<math>\bar y</math>分別為{{math|''x''<sub>''i''</sub>}}與{{math|''y''<sub>''i''</sub>}}的[[平均數|計數平均數]], |{{math|''r''<sub>''xy''</sub>}}為{{mvar|x}}與{{mvar|y}}的[[皮爾森積動差相關係數]], |{{math|''s''<sub>''x''</sub>}}與{{math|''s<sub>y</sub>''}}分別為{{mvar|x}}與{{mvar|y}}的[[標準偏差|樣本標準偏差]], |<math>s^2_x</math>與<math>s_{x, y}</math>分別為{{mvar|x}}的[[變異數|樣本變異數]]及{{mvar|x}}與{{mvar|y}}間的[[共變異數|樣本共變異數]]。 }} 將<math>\hat{\alpha}</math>與<math>\hat{\beta}</math>帶入 : <math>\hat{y} = \hat{\alpha} + \hat{\beta} x</math> 可得 : <math>\frac{ \hat{y} - \bar{y}}{s_y} = r_{xy} \frac{ x - \bar{x}}{s_x}</math>。 此式呈現了{{math|''r''<sub>''xy''</sub>}}為預先將自變數與應變數預先[[Z-分數|標準化]]後的迴歸斜率。由於{{math|''r''<sub>''xy''</sub>}}界於{{math|-1}}與{{math|1}}之間,左式的絕對值勢必不大於右式,體現了{{en-link|趨中迴歸|Regression toward the mean}}的現象。 以<math>\overline{xy}</math>表示對應的{{mvar|x}}與{{mvar|y}}的乘積和, :<math>\overline{xy} = \frac{1}{n} \sum_{i=1}^n x_i y_i</math>, 可使{{math|''r''<sub>''xy''</sub>}}簡化成 :<math>r_{xy} = \frac{ \overline{xy} - \bar{x}\bar{y} }{ \sqrt{ \left(\overline{x^2} - \bar{x}^2\right)\left(\overline{y^2} - \bar{y}^2\right)} }</math>。 簡單線性迴歸的[[判定係數]]即為二變數間[[皮爾森積動差相關係數]]的平方: : <math>R^2 = r_{xy}^2</math>。 === 迴歸係數(斜率)的意義 === 將<math>\hat\beta</math>的估計式分子乘以<math>\frac{(x_i - \bar{x})}{(x_i - \bar{x})}</math>,可改寫為 <math> \hat\beta = \frac{ \sum_{i=1}^n (x_i - \bar{x})(y_i - \bar{y}) }{ \sum_{i=1}^n (x_i - \bar{x})^2 } = \frac{ \sum_{i=1}^n \left( (x_i - \bar{x})^2 \times \frac{(y_i - \bar{y})}{(x_i - \bar{x})} \right) }{ \sum_{i=1}^n (x_i - \bar{x})^2 } </math>。 可以看出,迴歸式的斜率為<math>\frac{(y_i - \bar{y})}{(x_i - \bar{x})}</math>以<math>(x_i - \bar{x})^2</math>為權數的加權平均。因此,<math>(x_i - \bar{x})^2</math>越大的資料對斜率<math>\hat\beta</math>的影響力越大。 === 截距的意義 === <math>\hat\alpha</math>可經由下列式子估算: <math>\hat\alpha = \bar{y} - \hat\beta\ \bar{x}</math>。 由於<math>\hat\beta = \tan(\theta) = dy / dx \rightarrow dy = dx \times \hat\beta</math>,其中<math>\theta</math>即為與橫軸正值的夾角,可以得到<math>\hat\alpha = \bar{y} - dx \times \hat\beta = \bar{y} - dy</math>。 == 參考文獻 == {{Reflist}} {{-}} {{统计学}} [[Category:迴歸模型]]
该页面使用的模板:
Template:-
(
查看源代码
)
Template:Cite book
(
查看源代码
)
Template:Cite journal
(
查看源代码
)
Template:Cite web
(
查看源代码
)
Template:En-link
(
查看源代码
)
Template:Math
(
查看源代码
)
Template:Mvar
(
查看源代码
)
Template:NoteTA
(
查看源代码
)
Template:Reflist
(
查看源代码
)
Template:Unordered list
(
查看源代码
)
Template:统计学
(
查看源代码
)
Template:迴归侧栏
(
查看源代码
)
返回
簡單線性迴歸
。
导航菜单
个人工具
登录
命名空间
页面
讨论
不转换
查看
阅读
查看源代码
查看历史
更多
搜索
导航
首页
最近更改
随机页面
MediaWiki帮助
特殊页面
工具
链入页面
相关更改
页面信息