Simple Linear Regression & Correlation (X1,Y1) (X2,Y2) (X3,Y3) (X4,Y4) … (Xn,Yn) Relationship Between Two Variables: Linear Relationship Curvilinear Relationship No Relationship + + + + + + + + + + + + + + + + 1) Measure the Degree of Association Between the 2 Variables 2) Forecast Future Values 3) Measure the Error
Simple Linear Regression
Method of Least Squares Want to Minimize this This leads to 2 Equations:
Example 1: Test scores 1st 2nd X Y 80 90 60 70 40 40 30 40 40 60
Example 2: Ads vs Sales Ads Sales X Y 0 1 1 2 2 3 3 5 4 8 5 11 6 12
Partition the Sum of Squares: Total Variation of Y Total = Unexplained + Explained Variation Variation Variation TSS = SSE + SSR
Regression ANOVA Table: Source df SS MS Regression 1 SSR = b1SSxy MSR = SSR/1 Error n-2 SSE = SSy - b1SSxy MSE = SSE/n-2 Total n-1 TSS = SSy Coefficient of Determination: r2 = SSR/TSS % of Variation of Y Explained by X Model Hypothesis Test: H0: Model is Not Significant HA: Model is Significant R: F > Fα(1,n-2) F = MSR/MSE
Ex 1: Ex 2:
MSE = Estimated Error Variance Se2 Parameter Estimator (Standard Error)2 β0 b0 β1 b1 Interval Estimate: b0 - e ≤ β0 ≤ b0 + e ; e = t•Sb0 Ex 1:
Interval Estimate: b1 - e ≤ β1 ≤ b1 + e ; e = t•Sb1 Ex 2: Hypothesis Test: Ex 2: H0: β1 = 0 HA: β1 ≠ 0 R: t > tα/2,df=n-2 t < -tα/2,df=n-2
Parameter Estimator (Std Error)2 Y E(Y|X)
Confidence Interval for the Mean Value of Y for a Given X Ex 2: Xg = 5
Interval Estimate for a Single Value of Y for a Given X Ex 2: Xg = 5 Prediction Interval
Correlation Coefficient: -1 ≤ r ≤ 1
Sample Correlation Coefficient: Ex1: Ex 2: Hypothesis Test: H0: ρ = 0 HA: ρ ≠ 0 R: t > tα/2,df=n-2 t < -tα/2,df=n-2 Ex 2:
Ex 3: Units Cost X2 X XY Y Y2 1 8 2 8 3 10 4 14 5 16 6 16 7 18 8 22 SSx = SSxy = SSy =
Prediction Equation: ANOVA Table for the Model: Test the Model:
Test for β1 = 0: 95% CI for β0: Test for ρ = 0:
95% CI for Mean Value of Y when X = 7: 95% PI for Single Value of Y when X = 7:
Human Resource Selection Ho: Other Performer – Do Not Hire HA: Superior Performer – Do Hire R: Test Score > Xc Superior False Negative False positive Other Do Not Hire Do Hire