Вы находитесь на странице: 1из 6

Scatter Plot

Linear relationships Nonlinear relationships Y

Linear Correlation Analysis

X Y Y

Linear Correlation Coefficient


( X
i =1 n i

Sign of the Correlation Coefficient


Quadrant
I

r :=

X )(Yi Y )
2

sgn( xi x )

sgn( yi y ) sgn( xi x )( yi y )

( X
i =1

X)

(Y Y )
i =1 i

II III IV

Magnitude measures the strength of a linear relationship Sign reflects the direction (positive / negative) of a linear relationship Dimensionless Always lies between -1 and +1

+ +

+ + -

+ + -

Strength of Linear Relationships

Examples of No Linear Relationship


Y

Strong +

Weak +

0<r<1
X Y Y X

X Y Weak -

r=0

Strong -

-1 < r < 0
X X

Examples of Perfect Linear Relationship

Example : House Prices


Price in $1000s (Y) Area in ft2 (X) 1400 1600 1700 1875 1100 1550 2350 2450 1425 1700

245 312 279 308

X r = -1 r = +1

199 219 405 324 319 255

Scatter Plot : House Price


500 400 300 200 100 0 0 500 1000 1500 2000 2500 3000 Area (sq ft)

Scatter Plot : SPSS

House Price ($1000s)

Scatter Plot : SPSS

Test for Correlation Significance : SPSS

400

350

Price

300

250

200

1000

1250

1500

1750

2000

2250

2500

Area

Test for Correlation Significance : SPSS


Correlations Price Price Pearson Correlation Sig. (2-tailed) N Pearson Correlation Sig. (2-tailed) N 1 10 .762* .010 10 Area .762* .010 10 1 10

Linear Regression Analysis

Area

*. Correlation is significant at the 0.05 level (2-tailed).

Regression Analysis : Purpose


Regression analysis allows us to build a model relating Y : dependent variable response and X : independent variable explanatory variable predictor

The Regression Line


Y
Yi

i
i
Yi = b0 + b1Xi

Error for this Xi value

Xi

Least Squares Method


b0 and b1 are values that minimize the sum of the squared errors (SSE) :
SSE =

Simple Linear Regression Example


A real estate agent wishes to examine the relationship between : price of a house (in $1000) & its area (in sq ft) A random sample of 10 houses is selected Y = price X = area

i2 = Y

( b0 + b1 X i )

They are given by

b1

( X X )(Y Y ) = r (Y Y ) = ( X X ) ( X X )
i i i 2 i i

2 2

b0 = Y b1 X

Regression Using EXCEL


Tools / Data Analysis / Regression
Multiple R R Square

Excel Output : House Price


Regression Statistics 0.76211 0.58082 0.52842 41.33032 10

|correlation coefficient|

Adjusted R Square Standard Error Observations

price = 98.24833 +0.10977*area


SS MS 18934.9348 1708.1957 F 11.0848 Significance F 0.01039

ANOVA
df Regression Residual Total 1 8 9 18934.9348 13665.5652 32600.5000

Coefficients Intercept Area 98.24833 0.10977

Standard Error 58.03348 0.03297

t Stat 1.69296 3.32938

P-value 0.12892 0.01039

Lower 95% -35.57720 0.03374

Upper 95% 232.07386 0.18580

Interpretation of the Slope, b1


price = 98.24833 + 0.10977*area
b1 measures the estimated change in the average value of Y as a result of a one-unit change in X
b1 = 0.10977 says that the value of a house increases by 0.10977($1000) = $109.77, on average, for each sq ft increase in area

Linear Regression : SPSS

Linear Regression : SPSS

Вам также может понравиться