Correlation and Regression
Correlation and Regression
Correlation Analysis
Dr Richa Chaudhary
IESMCRC
Dr Richa Chaudhary
Correlation means association - more precisely it is a measure of the
extent to which two variables are related.
There are three possible results of a correlational study:
• Positive correlation
• Negative correlation
• Zero correlation.
Dr Richa Chaudhary
Positive correlation is a relationship between two variables in which both
variables move in the same direction. Therefore, when one variable
increases as the other variable increases, or one variable decreases while the
other decreases.
An example of positive correlation would be Income and Expenditure.
Dr Richa Chaudhary
Degree Of Correlation
Correlation +ve Correlation -ve
Perfect +1 Perfect -1
Zero 0 Zero 0
Dr Richa Chaudhary
Scatter Plots and Correlation
• A scatter plot (or scatter diagram) is used to show the
relationship between two variables
• Correlation analysis is used to measure strength of the
association (linear relationship) between two variables
• Only concerned with strength of the relationship
• No causal effect is implied
Dr Richa Chaudhary
Scatter Plot Examples
Linear relationships Curvilinear relationships
y y
x x
y y
x x
Dr Richa Chaudhary
Scatter Plot Examples
(continued)
Strong relationships Weak relationships
y y
x x
y y
x x
Dr Richa Chaudhary
Scatter Plot Examples
(continued)
No relationship
x
Dr Richa Chaudhary
Correlation Coefficient
(continued)
Dr Richa Chaudhary
Features of r
• Unit free
• Range between -1 and 1
• The closer to -1, the stronger the negative linear
relationship
• The closer to 1, the stronger the positive linear
relationship
• The closer to 0, the weaker the linear relationship
Dr Richa Chaudhary
Examples of Approximate
r Values
y y y
x x x
r = -1 r = -.6 r=0
y y
x x
r = +.3 Dr Richa Chaudhary r = +1
Calculating the
Correlation Coefficient
Sample correlation coefficient:
r=
( x − x)( y − y)
[ ( x − x ) ][ ( y − y ) ]
2 2
Dr Richa Chaudhary
Simple Linear Regression Model
Dr Richa Chaudhary
Types of Regression Models
Positive Linear Relationship Relationship NOT Linear
Dr Richa Chaudhary
Population Linear Regression
y = β0 + β1x + ε
Variable
Dr Richa Chaudhary
Estimated Regression Model
The sample regression line provides an estimate of
the population regression line
Independent
ŷ i = b0 + b1x variable
Dr Richa Chaudhary
Interpretation of the
Slope and the Intercept
• Intercept- b0 is the estimated average value
of y when the value of x is zero
Dr Richa Chaudhary
Finding the
Least Squares Equation
• The coefficients b0 and b1 will usually be
found using computer software, such as Excel
or Minitab
Dr Richa Chaudhary
Simple Linear Regression Example
• A real estate agent wishes to examine the relationship
between the selling price of a home and its size
(measured in square feet)
Dr Richa Chaudhary
Sample Data for
House Price Model
House Price in $1000s Square Feet
(y) (x)
245 1400
312 1600
279 1700
308 1875
199 1100
219 1550
405 2350
324 2450
319 1425
255 1700
Dr Richa Chaudhary
Regression Using Excel
• Data / Data Analysis / Regression
Dr Richa Chaudhary
Excel Output
Regression Statistics
Multiple R 0.76211 The regression equation is:
R Square 0.58082
Adjusted R Square 0.52842 house price = 98.24833 + 0.10977 (square feet)
Standard Error 41.33032
Observations 10
ANOVA
df SS MS F Significance F
Regression 1 18934.9348 18934.9348 11.0848 0.01039
Residual 8 13665.5652 1708.1957
Total 9 32600.5000
Dr Richa Chaudhary
Graphical Presentation
• House price model: scatter plot and regression
line
450
400
Dr Richa Chaudhary
Interpretation of the
Slope Coefficient, b1
Dr Richa Chaudhary
Coefficient of Determination, R 2
0 R2 1
Dr Richa Chaudhary
Coefficient of Determination, R 2
(continued)
Coefficient of determination
SSR sum of squares explained by regression
R =
2
=
SST total sum of squares
R =r2 2
where:
R2 = Coefficient of determination
r = Simple correlation coefficient
Dr Richa Chaudhary
Examples of Approximate
R2 Values
y
R2 = 1
x
R2 = +1
Dr Richa Chaudhary
Examples of Approximate
R2 Values
(continued)
y
0 < R2 < 1
x
Dr Richa Chaudhary
Examples of Approximate
R2 Values
(continued)
R2 = 0
y
No linear relationship
between x and y:
Dr Richa Chaudhary
THANKS
Dr Richa Chaudhary