




免费预览已结束,剩余69页可下载查看
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
business statistics: a first course, 5e 2009 prentice-hall, inc.,chap 12-1,第12章 一元线性回归,商务统计学(第5版),business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-2,学习目标,在本章中你将学到: 如何利用一元线性回归分析理论,由自变量来预测因变量 回归系数 b0 和 b1的含义 如何评价一元线性回归分析的假设条件,并且了解假设违背时的处理方法 斜率和相关系数的推断 均值估计和个值预测,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-3,相关与回归,一个 散点图 可以用来表示两个变量之间的关系 相关性 分析是用来测量两个变量之间的关联(线性关系)强度 相关性仅仅是关心关联的强度 没有因果关系是隐含相关性 散点图首次出现在第2章 相关性首次出现在第3章,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-4,回归分析简介,回归分析被应用于: 基于至少一个自变量的值,预测因变量的值 解释一个自变量的变化对因变量的影响 因变量: 我们要预测或解释的变量 自变量: 用来预测或解释因变量的变量,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-5,一元线性回归模型,只有一个自变量x x与y的关系可以通过线性函数表示 假定y的变化与x的变化有关,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-6,相关类型,y,x,y,x,y,y,x,x,线性相关,曲线相关,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-7,关系类型,y,x,y,x,y,y,x,x,强相关,弱相关,(续),business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-8,相关类型,y,x,y,x,不相关,(续),business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-9,线性组成部分,一元线性回归模型,总体的 y轴截距,总体的斜率,随机误差项,因变量,自变量,随机误差部分,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-10,(续),取值xi时,因变量的随机误差,y,x,与xi对应的y的观测值,与xi 对应的y的预测值,xi,斜率 = 1,截距 0,i,一元线性回归模型,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-11,一元线性回归方程可以估计总体回归直线,一元线性回归方程 (预测线),回归截距的估计值,回归斜率的估计值,第i个观测值的y的估计(预测)值,第 i个观测值x的值,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-12,最小二乘法,我们可以求出使得y 和 的离差平方和最小的b0 和 b1的值,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-13,求出最小二乘方程的解,系数 b0 和 b1 ,以及本章的其它回归结果,通过excel或者minitab求出,文章中为感兴趣的读者列出了公式,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-14,b0 是当x 为零时, y 的期望值 b1 是当x 发生一个单元的变化时,y的期望值发生的变化,对斜率和截距的解释,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-15,一个房地产经纪人希望得出房屋售价与房屋大小(以平方英尺为单位)的关系 随意抽取10间房子作为一个样本 因变量 (y) = 房价( 1000美元) 自变量 (x) = 平方英尺,一元线性回归的例子,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-16,一元线性回归例子:数据,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-17,一元线性回归例子: 散点图,房价模型: 散点图,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-18,一元线性回归的例子: 利用 excel,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-19,一元线性回归的例子: excel 输出,回归方程为:,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-20,一元线性回归的例子: minitab 输出,the regression equation is price = 98.2 + 0.110 square feet predictor coef se coef t p constant 98.25 58.03 1.69 0.129 square feet 0.10977 0.03297 3.33 0.010 s = 41.3303 r-sq = 58.1% r-sq(adj) = 52.8% analysis of variance source df ss ms f p regression 1 18935 18935 11.08 0.010 residual error 8 13666 1708 total 9 32600,回归方程为:,房价 = 98.24833 + 0.10977 (平方英尺),business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-21,一元线性回归的例子: 图表分析法,房价模型: 散点图和预测线,斜率 = 0.10977,截距 = 98.248,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-22,一元线性回归的例子: 对 bo的解释,b0 是当x 的值为零时,y 的期望值(如果 0 在被观测到的x的取值范围内) 因为一个房子的面积不可能为0,所以截距b0没有实际解释意义,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-23,b1 是x增加一个单位,导致y的期望值发生的变化 这里, b1 = 0.10977意味着,房子每增加一平方英尺,房价的期望值平均增加0.10977(1000美元) = 109.77 美元,一元线性回归的例子: 对b1的解释,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-24,预测有2000平方英尺的房子的价格:,一个有2000平方英尺的房子的预测价格是317.85(1,000美元) = 317,850美元,一元线性回归的例子 :预测,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-25,一元线性回归的例子: 预测,使用回归模型进行预测时,只能在数据的相关范围内做预测,相关范围内插值,不要试图推断超出观测x的相关范围的房价,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-26,离差的度量,总方差有两部分组成:,总平方和,回归平方和,残差平方和,其中: = 因变量的均值 yi = 因变量的观测值 = 与xi 对应的y的观测值,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-27,(续),离差的度量,sst = 总平方和 (总变差) 度量 观测值yi与均值y的差异 ssr = 回归平方和 (能解释的离差平方和) 由x和y之间的关系所决定的偏差 sse = 残差平方和 (不能解释的离差平方和) 由x和y关系以外的其它因素所造成的偏差,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-28,(续),xi,y,x,yi,sst = (yi - y)2,sse = (yi - yi )2,ssr = (yi - y)2,_,_,_,y,y,y,_,y,离差的度量,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-29,可决系数 是总变差中由回归模型解释的部分所占的比例 可决系数也被称为: r-平方 ,并以 r2表示,可决系数 r2,注意:,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-30,r2 = 1,r2 值的例子,y,x,y,x,r2 = 1,r2 = 1,x 和 y是强线性关系: 100% 的y的离差可以由 x的离差来解释,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-31,r2 值的例子,y,x,y,x,0 r2 1,x 和 y之间是弱线性关系: 一部分但并不是所有的y的离差都可以用x的离差可以解释,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-32,r2 值的例子,r2 = 0,x 和 y之间没有线性关系: y 的值不依赖于x. (y的离差不能用x的离差解释),y,x,r2 = 0,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-33,一元线性回归的例子: 在excel输出中的可决系数r2,58.08%的房价离差可以由平方英尺的离差来解释,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-34,一元线性回归的例子: 在minitab 输出中的可决系数r2,the regression equation is price = 98.2 + 0.110 square feet predictor coef se coef t p constant 98.25 58.03 1.69 0.129 square feet 0.10977 0.03297 3.33 0.010 s = 41.3303 r-sq = 58.1% r-sq(adj) = 52.8% analysis of variance source df ss ms f p regression 1 18935 18935 11.08 0.010 residual error 8 13666 1708 total 9 32600,58.08%的房价离差可以有平方英尺的离差来解释,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-35,估计值的标准误差,观测值偏离回归线的标准差的计算公式为:,其中 sse = 残差平方和 n = 样本量,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-36,一元线性回归的例子:在excel中,估计值的标准差,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-37,一元线性回归的例子: 在 minitab中,估计值的标准差,the regression equation is price = 98.2 + 0.110 square feet predictor coef se coef t p constant 98.25 58.03 1.69 0.129 square feet 0.10977 0.03297 3.33 0.010 s = 41.3303 r-sq = 58.1% r-sq(adj) = 52.8% analysis of variance source df ss ms f p regression 1 18935 18935 11.08 0.010 residual error 8 13666 1708 total 9 32600,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-38,标准差的比较,y,y,x,x,syx表示y的观测值偏离回归线的程度,syx的 大小应该是相对于样本数据中y值的大小而言的,例如,相对于房价在200000美元-400000美元的范围 syx = $41.33k 比较小,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-39,回归的假设条件 l.i.n.e,线性(linearity) x 和y 之间的关系是线性的 误差项相互独立(independence of errors) 误差值是在统计上是独立的 误差项呈正态分布(normality of error) 给定任意 x值,误差项是服从正态分布的 同方差(方差齐性)(equal variance) 误差项所服从分布的方差为常数,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-40,残差分析,对于第 i个观测的残差 ei,是观测值与预测值之间的差 通过残差检验回归的假设条件 检验线性假设 评估独立性假设 评估正态分布假设 对各种层次的x,检验方差相同(方差齐性)的假设 残差的图形分析 可以画出残差随x的变化图,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-41,检验线性的残差分析,非线性,线性,x,残差,x,y,x,y,x,残差,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-42,检验独立性的残差分析,不独立,独立,x,x,残差,残差,x,残差,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-43,检验正态性,检查残差的茎叶图 检查残差的盒须图 检查残差的直方图 建立残差的正态概率图,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-44,检验正态性的残差分析,百分率,残差,当使用正态概率图时, 正态误差大约将会排列在一条直线上,-3 -2 -1 0 1 2 3,0,100,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-45,检验同方差的残差分析,不同方差,同方差,x,x,y,x,x,y,residuals,residuals,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-46,一元线性回归的例子:残差在excel 中的输出,没有违背任何回归假设,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-47,有关斜率的统计推断,回归的斜率(b1) 的标准差可以通过下式求出:,其中: = 斜率标准差的估计值 = 这个估计值的标准差,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-48,有关斜率的统计推断: t 检验,总体斜率的t检验 x 和 y之间存在线性关系吗? 零假设与备择假设 h0: 1 = 0 (不存在线性关系) h1: 1 0 (线性关系确实存在) 检验统计量,其中: b1 = 回归斜率系数 1 = 斜率假定值 sb1 = 样本斜率的标准差,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-49,有关斜率的统计推断: t 检验的例子,估计的回归方程:,这个模型的斜率 0.1098 房价与房子建筑面积(平方英尺)有关系吗?,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-50,h0: 1 = 0 h1: 1 0,来自 excel 的输出:,b1,predictor coef se coef t p constant 98.25 58.03 1.69 0.129 square feet 0.10977 0.03297 3.33 0.010,来自 minitab 的输出:,b1,有关斜率的统计推断: t 检验的例子,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-51,检验统计量: tstat = 3.329,有足够的证据表明建筑面积影响房价,决策: 拒绝 h0,拒绝 h0,拒绝 h0,a/2=.025,-t/2,不拒绝 h0,0,t/2,a/2=.025,-2.3060,2.3060,3.329,d.f. = 10- 2 = 8,h0: 1 = 0 h1: 1 0,有关斜率的统计推断: t 检验的例子,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-52,h0: 1 = 0 h1: 1 0,来自 excel输出 :,p-值,有足够的证据表明建筑面积影响房价.,决策: 拒绝 h0, 因为 p-值 ,predictor coef se coef t p constant 98.25 58.03 1.69 0.129 square feet 0.10977 0.03297 3.33 0.010,来自 minitab输出:,有关斜率的统计推断: t 检验的例子,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-53,显著性的f检验,f 检验统计量: 其中,其中 fstat 服从自由度为1和 (n 2)的f 分布,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-54,显著性f检验的 excel 输出,自由度为1和8,f检验的p-值,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-55,显著性f检验的 minitab 输出,analysis of variance source df ss ms f p regression 1 18935 18935 11.08 0.010 residual error 8 13666 1708 total 9 32600,自由度为1和8,f检验的p-值,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-56,h0: 1 = 0 h1: 1 0 = .05 df1= 1 df2 = 8,检验统计量: 决策: 结论:,拒绝 h0 ,在显著性水平 = 0.05的 情况下,有足够的证据表明房子的大小影响销售价格,0, = .05,f.05 = 5.32,拒绝 h0,不拒绝 h0,临界值: f = 5.32,显著性的f检验,(续),f,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-57,斜率的置信区间估计,斜率置信区间的估计:,房价的excel打印输出:,在 95%的置信水平下, 斜率的置信区间为 (0.0337, 0.1858),d.f. = n - 2,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-58,由于变量房价的变化单元为1000美元,我们有 95% 的把握保证,每平方英尺的建筑面积对销售价格的影响在33.74美元到185.8美元之间,95% 的置信区间 不包括 0. 结论: 在0.05的显著性水平下,房价与平方英尺的关系是显著的,(续),斜率的置信区间估计,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-59,相关系数的t检验,假设 h0: = 0 (x 与 y不相关) h1: 0 (相关) 检验统计量 (自由度为 n 2),business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-60,在.05的显著性水平下,有证据显示平方英尺与房价是线性关系吗?,h0: = 0 (不相关) h1: 0 (相关) =.05 , df = 10 - 2 = 8,(续),相关系数的t检验,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-61,结论: 在5%的显著性水平下,有证据表明存在线性关系,决策: 拒绝 h0,拒绝 h0,拒绝 h0,a/2=.025,-t/2,不拒绝 h0,0,t/2,a/2=.025,-2.3060,2.3060,3.329,d.f. = 10-2 = 8,(续),相关系数的t检验,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-62,均值的估计和单个数值的预测,y,x,xi,y = b0+b1xi,给定xi,y 均值的置信区间,给定xi, 单个y值的预测区间,目标: 对于给定的xi, 形成因变量均值的置信区间表示对其值的不确定,y,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-63,给定x,y均值的置信区间,给定特定的xi,估计 y 均值的置信区间,区间的大小取决于与均值x的距离,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-64,给定x,单个因变量y的预测值区间,给定特定的xi,估计单个因变量y的预测值区间,为了反映单个个别事件的不确定性,将区间宽度增加一项额外项,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-65,均值估计的例子,求面积为2,000英尺的房子平均售价的95%置信区间,预测价格 yi = 317.85 (1,000美元),估计y|x=x置信区间,置信区间的端点是 280.66 和 354.90,或者从 280,660美元到 354,900美元,i,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-66,单个因变量估计的例子,一个面积有2,000英尺的95%预测价格区间,预测价格 yi = 317.85 (1,000美元),估计 yx=x的预测值区间,预测区间的端点是 215.50 和 420.07, 或者从215,500美元到420,070美元,i,business statistics: a first course, 5e 2009 prentice-hall, inc,chap 12-67,用excel得到的对置信区间的估计与预测区间的估计,在 excel中, 利用 phstat | regression | simple linear regression 选择对话框 “confidence and prediction interval for x=” , 并且输入x的值,以及置信水平,business statistics: a first course, 5e 20
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 中国兔子养殖项目创业计划书
- 中国红枣深加工项目创业计划书
- 中国基围虾养殖项目创业计划书
- 中国康复器具项目创业计划书
- 2025商务英语对话之合同洽谈
- 中国南天竺项目创业计划书
- 中国冬瓜项目创业计划书
- 中国独尾草项目创业计划书
- 四川医疗项目创业计划书
- 文化创意产业合作保密合同
- DB51T 1349-2011 油菜脱粒机规范
- 《高低压配电室施工工艺标准》
- 工务安全与应急处理
- 2021热性惊厥临床路径
- 我的家乡山东枣庄
- 铁路专业职业生涯规划书
- 部编版课件-道德与法治九年级上册课件第五课第一框延续文化血脉
- 《危险化学品仓库企业安全风险评估细则(试行)》解读
- 2024年辽宁省中考数学真题卷及答案解析
- 新教科版小学1-6年级科学需做实验目录
- 信息工程部岗位职责表、绩效评估表
评论
0/150
提交评论