第二章一元线性回归2.14解答:(1)散点图为:(2)x与y之间大致呈线性关系。(3)设回归方程为01yx1=12217()niiiniixynxyxnx0120731yx17yx可得回归方程为(4)22ni=11()n-2iiyy2n01i=11(())n-2iyx=2222213(10-(-1+71))(10-(-1+72))(20-(-1+73))(20-(-1+74))(40-(-1+75))1169049363110/3113306.13(5)由于211(,)xxNL1112()/xxxxLtL服从自由度为n-2的t分布。因而1/2()||(2)1xxLPtn也即:1/211/2()xxxxpttLL=1可得11195%333333的置信度为的置信区间为(7-2.353,7+2.353)即为:(2.49,11.5)22001()(,())xxxNnL00002221()1()()xxxxtxxnLnL服从自由度为n-2的t分布。因而00/22||(2)11()xxPtnxnL即220/200/21()1()()1xxxxxxpttnLnL可得195%7.77,5.77的置信度为的置信区间为()2(6)x与y的决定系数22121()490/6000.817()niiniiyyryy(7)ANOVAx平方和df均方F显著性组间(组合)9.00024.5009.000.100线性项加权的8.16718.16716.333.056偏差.8331.8331.667.326组内1.0002.500总数10.0004由于(1,3)FF,拒绝0H,说明回归方程显著,x与y有显著的线性关系。(8)112/xxxxLtL其中2221111()22nniiiiieyynn710213.661333303/22.353t/23.66tt接受原假设01:0,H认为1显著不为0,因变量y对自变量x的一元线性回归成立。(9)相关系数1211()()()()niixyinnxxyyiiiixxyyLrLLxxyy=7070.9041060060r小于表中1%的相应值同时大于表中5%的相应值,x与y有显著的线性关系.3(10)序号xyye111064221013-33320200442027-75540346残差图为:从图上看,残差是围绕e=0随机波动,从而模型的基本假定是满足的。(11)当广告费0x=4.2万元时,销售收入028.4y万元,95%置信度为的置信区间y2近似为,即(17.1,39.7)2.15解答:(1)散点图为:4(2)x与y之间大致呈线性关系。(3)设回归方程为01yx1=1221(2637021717)0.0036(71043005806440)()niiiniixynxyxnx012.850.00367620.1068yx0.10680.0036yx可得回归方程为(4)22ni=11()n-2iiyy2n01i=11(())n-2iyx5=0.23050.4801(5)由于211(,)xxNL1112()/xxxxLtL服从自由度为n-2的t分布。因而1/2()||(2)1xxLPtn也即:1/211/2()xxxxpttLL=1可得195%的置信度为的置信区间为0.4801/12978600.4801/1297860(0.0036-1.860,0.0036+1.860)即为:(0.0028,0.0044)22001()(,())xxxNnL00002221()1()()xxxxtxxnLnL服从自由度为n-2的t分布。因而00/22||(2)11()xxPtnxnL即220/200/21()1()()1xxxxxxpttnLnL6可得195%0.3567,0.5703的置信度为的置信区间为()(6)x与y的决定系数22121()()niiniiyyryy16.8202718.525=0.908(7)ANOVAx平方和df均方F显著性组间(组合)1231497.5007175928.2145.302.168线性项加权的1168713.03611168713.03635.222.027偏差62784.464610464.077.315.885组内66362.500233181.250总数1297860.0009由于(1,9)FF,拒绝0H,说明回归方程显著,x与y有显著的线性关系。(8)112/xxxxLtL其中2221111()22nniiiiieyynn0.003612978608.5420.04801/21.895t/28.542tt接受原假设01:0,H认为1显著不为0,因变量y对自变量x的一元线性回归成立。(9)相关系数1211()()()()niixyinnxxyyiiiixxyyLrLLxxyy=46530.9489129786018.5257r小于表中1%的相应值同时大于表中5%的相应值,x与y有显著的线性关系.(10)序号xyye18253.53.07680.4232221510.88080.11923107043.95880.0412455022.0868-0.0868548011.8348-0.8348692033.4188-0.4188713504.54.9688-0.466883251.51.27680.2232967032.51880.481210121554.48080.5192从图上看,残差是围绕e=0随机波动,从而模型的基本假定是满足的。(11)0010003.7x新保单时,需要加班的时间为y小时。(12)00/200y(2)1ytnh的置信概率为1-的置信区间精确为,即为(2.7,4.7)近似置信区间为:02y,即(2.74,4.66)(13)可得置信水平为1-的置信区间为0/200(2)ytnh,即为(3.33,4.07).2.16(1)散点图为:8可以用直线回归描述y与x之间的关系.(2)回归方程为:12112.6293.314yx(3)9从图上可看出,检验误差项服从正态分布。第三章多元线性回归3.11解:(1)用SPSS算出y,x1,x2,x3相关系数矩阵:相关性yx1x2x3Pearson相关性y1.000.556.731.724x1.5561.000.113.398x2.731.1131.000.547x3.724.398.5471.000y..048.008.009x1.048..378.127x2.008.378..05110x3.009.127.051.Ny10101010x110101010x210101010x310101010所以r~=(2)所以三元线性回归方程为3447.122101.71754.328.348ˆxxxy(3)由于决定系数R方=0.708R=0.898较大所以认为拟合度较高(4)Anovab模型平方和df均方FSig.系数a模型非标准化系数标准系数tSig.B的95.0%置信区间相关性共线性统计量B标准误差试用版下限上限零阶偏部分容差VIF1(常量)-348.280176.459-1.974.096-780.06083.500x13.7541.933.3851.942.100-.9778.485.556.621.350.8251.211x27.1012.880.5352.465.049.05314.149.731.709.444.6871.455x312.44710.569.2771.178.284-13.41538.310.724.433.212.5861.708a.因变量:y模型汇总模型RR方调整R方标准估计的误差更改统计量R方更改F更改df1df2Sig.F更改1.898a.806.70823.44188.8068.28336.015a.预测变量:(常量),x3,x1,x2。111回归13655.37034551.7908.283.015a残差3297.1306549.522总计16952.5009a.预测变量:(常量),x3,x1,x2。b.因变量:y因为F=8.283P=0.0150.05所以认为回归方程在整体上拟合的好(5)系数a模型非标准化系数标准系数tSig.B的95.0%置信区间相关性共线性统计量B标准误差试用版下限上限零阶偏部分容差VIF1(常量)-348.280176.459-1.974.096-780.06083.500x13.7541.933.3851.942.100-.9778.485.556.621.350.8251.211x27.1012.880.5352.465.049.05314.149.731.709.444.6871.455x312.44710.569.2771.178.284-13.41538.310.724.433.212.5861.708a.因变量:y(6)可以看到P值最大的是x3为0.284,所以x3的回归系数没有通过显著检验,应去除。去除x3后作F检验,得:Anovab模型平方和df均方FSig.1回归12893.19926446.60011.117.007a残差4059.3017579.900总计16952.5009a.预测变量:(常量),x2,x1。b.因变量:y由表知通过F检验继续做回归系数检验12系数a模型非标准化系数标准系数tSig.B的95.0%置信区间相关性共线性统计量B标准误差试用版下限上限零阶偏部分容差VIF1(常量)-459.624153.058-3.003.020-821.547-97.700x14.6761.816.4792.575.037.3818.970.556.697.476.9871.013x28.9712.468.6763.634.0083.13414.808.731.808.672.9871.013a.因变量:y此时,我们发现x1,x2的显著性大大提高。(7)x1:(-0.997,8.485)x2:(0.053,14.149)x3:(-13.415,38.310)(8)****3277.02535.01385.0ˆxxxy(9)残差统计量a极小值极大值均值标准偏差N预测值175.4748292.5545231.500038.9520610标准预测值-1.4381.567.0001.00010预测值的标准误差10.46620.19114.5263.12710调整的预测值188.3515318.1067240.183549.8391410残差-25.1975933.22549.0000019.1402210标准残差-1.0751.417.000.81610Student化残差-2.1161.754-.