资源描述:
《北大暑期课程《回归分析》(Linear Regression Analysis)讲义2》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、Class2,Page7Class2:Basicsofmatrix(2)Linearregression.I.Basicsofmatrix(2)1.InverseofaMatrixTheinverseofasquarematrixexistsifthematrixisnonsingular.TheinverseA-1isdefinedas:A-1A=AA-1=IAlternatively,theconditioncanbeexpressedinthreeotherforms:(1)Ahasrank
2、n,(2)thenrowsarelinearlyindependent,and(3)thencolumnsarelinearlyindependent.Inverseisadifficultoperation.Usuallywecanusecomputersoftwarestofindtheinverse.Hereweonlywanttoknowasimpleexample.Fora2x2matrix:A-1=whereDisthedeterminantofA.D(A)=ad-bc.2.Deter
3、minantofaMatrixThedeterminantofamatrixisascale.Anonsingularmatrixhasanon-zerodeterminant.3.OperationRulesofMatricesA=Bmeansforalli,jA+B=B+A(A+B)+C=A+(B+C)(AB)C=A(BC)C(A+B)=CA+CBc(A+B)=cA+cB,wherecisascalarIA=AI=AA+O=AAO=OA=O(A')'=A(A+B)'=A'+B'(AB)'=B'
4、A'(ABC)'=C'B'A'(AB)-1=B-1A-1,providedAandBareeachnonsingular(proof:ABB-1A-1=I)(ABC)-1=C-1B-1A-1(A-1)-1=A(A’)-1=(A-1)’4.Variance-covariancematrixForavectorofvariablesbwithelements(b0,b1,…bk),itsvariance-covariancematrixClass2,Page7II.LinearRegressionwi
5、thaSingleRegressor(SimpleRegression)Forsimplelinearregression,welearned,Weassumethatthismodelistrueonlyinthepopulation.Whatwecanobserve,however,isasample.Forasampleoffixedsizei=1,...n,wecanwritethemodelinthefollowingway:(1)whereLetusfurtherassumethata
6、ndEquation(1)becomes(2)[expandfromthematrixformintotheelementform]Class2,Page7...Pre-multiply(2)byX'(3)Weset(orthogonalitycondition),meaning(firstelement);(secondelement).Giventheorthogonalitycondition,wecaneasilysolvebas(5),Whydoweassumetheorthogonal
7、itycondition?Becauseorthogonalitygivestheleastsquaressolution–bestlinearpredictor.[Blackboard]Partialwithrespecttosettozero.Inpractice,wedon'tknowwhetherXsatisfiestheorthogonalitycondition.Weusuallymaketheassumption:Notethatthefirstassumptionmeansorth
8、ogonalitybetween1and.Thesecondassumptionmeansthatxisnotcorrelatedwith.Similarly,Class2,Page7DetLetussolveforbThus,bisindeedyouroldfriend:Class2,Page7b=III.InferenceofRegressionCoefficients(simpleregression)A.Defineexpectationofavector:takeexpe