Prediction with RegressionAnalysis(HK: Chapter 7.8)Qiang YangHKUST
Prediction with Regression Analysis (HK: Chapter 7.8) Qiang Yang HKUST
Goal To predict numerical valuesMany software packages support this SASSPSS S-PlusWekaPoly-Analyst
Goal ◼ To predict numerical values ◼ Many software packages support this ◼ SAS ◼ SPSS ◼ S-Plus ◼ Weka ◼ Poly-Analyst
Linear Regression (HK 7.8.1)Table 7.7X (years)Y (salary,Given one variable$1,000)Goal: Predict YExample:GivenYearsofExperience Predict SalaryQuestions:When X=10, what is Y?When X=25, what is Y?Thisisknownasregression
Linear Regression (HK 7.8.1) ◼ Given one variable ◼ Goal: Predict Y ◼ Example: ◼ Given Years of Experience ◼ Predict Salary ◼ Questions: ◼ When X=10, what is Y? ◼ When X=25, what is Y? ◼ This is known as regression X (years) Y (salary, $1,000) Table 7.7
Linear Regression ExampleLinear Regression:Y=3.5*X+23.212010080Kie60o402005101520250Years
Linear Regression Example Linear Regression: Y=3.5*X+23.2 0 20 40 60 80 100 120 0 5 10 15 20 25 Years Salary
Basic Idea (Equations 7.23, 7.24) Learn a linear equationY=α+βXZ(x, -x)(y, -)To be learned:β=Z(x, -x)2iα=-
Basic Idea (Equations 7.23, 7.24) ◼ Learn a linear equation ◼ To be learned: Y = + X y x x x x x y y i i i i i = − − − − = 2 ( ) ( )( )