《现代统计分析方法与应用习题答案 第十章.docx》由会员分享,可在线阅读,更多相关《现代统计分析方法与应用习题答案 第十章.docx(3页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、第十章104 解:如果用Matlab计算,操作简便,过程如下:1 .将题给数据存在Matlab工作空间的文本文档xl0.txt,中;2 .运行如下m文件,load xlO.txtx=zscore(xlO);pc,princ,egenvalue =princomp(x);p3=pc(:,1:3)sc=princ(:, 1:3)egenvalueper=100*egenvalue/sum(egenvalue)P3 =-0.4025-0.23840.0054-0.2387-0.4509-0.2119-0.4282-0.04780.2796-0.3682-0.2908-0.1433-0.31170.3
2、0600.61550.3074-0.36450.35650.2447-0.41300.5760-0.22020.46540.1337-0.4026-0.19820.0266说明:p3是前三个主成分的系数,例如从这里可以看出,第一主成分X = -0.4025% 02387%2 -0.4282x3 -0.3682x4-0.3117x5 +0.3074x6+ 0.2447x7 -0.2202x8-0.4026x9SC =-3.09984.7663-0.2501-0.05532.29690.2946-0.6876-1.2889-0.66560.83340.1450-0.28160.58630.5626
3、-0.4262-0.6487-0.77410.33180.83890.5264-0.65311.5111-0.94020.7033-3.74723.75771.8746-4.7543-1.4832-0.4434-3.0144-0.10810.56500.5860-0.9506-0.21040.2470-0.19120.43891.0509-0.2690-0.6667-4.1120-2.4245-0.6793-0.9232-2.2607-0.49320.2807-0.6293-0.34570.5285-0.9882-0.0320-5.6449-1.35420.29401.5646-0.91190
4、.35922.15680.9217-0.28680.92540.6505-0.38350.3078-2.08640.39342.1848-0.48300.08741.5477-0.69310.03550.81303.8365-1.93151.2631-0.46850.19962.06970.0410-0.05323.1479-0.15941.56092.19381.10930.18522.0501-0.14940.4787说明:sc是各样本(行)对各主成分(列)的得分。比如sc(l,2)=4.7663表明第一个城 市(北京)对第二个主成分的得分为4.7663。egenvalue =5.08132.88940.48340.17760.16910.09760.07590.02030.0054 per =56.459132.10435.37131.97331.87851.08420.8439以看出,第一主成分解释了样本56.4591%的变化, 卜主成分累积解释88.5634%变化,可以代表八个变0.22500.0603量了。