0% found this document useful (0 votes)
7 views60 pages

Correlation and Regression Analysis Guide

The document discusses correlation and regression techniques used to analyze the relationship between two quantitative variables. It explains how to compute correlation coefficients, create scatter plots, and derive regression equations to predict outcomes based on independent variables. Additionally, it covers the concepts of simple and multiple regression analysis with examples and calculations.

Uploaded by

mahirlokare
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views60 pages

Correlation and Regression Analysis Guide

The document discusses correlation and regression techniques used to analyze the relationship between two quantitative variables. It explains how to compute correlation coefficients, create scatter plots, and derive regression equations to predict outcomes based on independent variables. Additionally, it covers the concepts of simple and multiple regression analysis with examples and calculations.

Uploaded by

mahirlokare
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Dr.

Fauwaz Parkar
Finding the relationship between two
quantitative variables without being able to
infer causal relationships

Correlation is a statistical technique used to


determine the degree to which two
variables are related
A Scatter (XY) Plot has points that show the relationship between two sets of data.
Scatter diagram

• Rectangular coordinate
• Two quantitative variables
• One variable is called independent (X) and
the second is called dependent (Y)
• Points are not joined
• No frequency table Y
* *
*
X
Example
Scatter diagram of weight and systolic blood pressure
Scatter plots

The pattern of data is indicative of the type of


relationship between your two variables:
Ø positive relationship

Ø negative relationship

Ø no relationship
Reliability

Age of Car
Statistic showing the degree of relation
between two variables
strong intermediate weak weak intermediate strong

-1 -0.75 -0.25 0 0.25 0.75 1


indirect Direct
perfect perfect
correlation correlation
no relation
How to compute the simple correlation
coefficient (r)

 xy   x y
r n
 ( x) 2
  ( y) 
2
x 
2 .  y 
2 
 n  n 
  
serial no. Age (years) Weight (kg.)
1 7 12
2 6 8
3 8 12
4 5 10
5 6 11
6 9 13
xy 
 x y
r  n
 ( x) 2
 (  y) 2 
 x2   .  y 
2

 n  n 
  
Age Weight
Sr.
(years) (Kg) xy X2 Y2
no.
(x) (y)

1 7 12 84 49 144
2 6 8 48 36 64
3 8 12 96 64 144
4 5 10 50 25 100
5 6 11 66 36 121
6 9 13 117 81 169
Total ∑x= ∑y= ∑xy= ∑x2= ∑y2=
41 66 461 291 742
41  66
461 
r  6
 (41) 2
  (66) 2

 291  6  .  742  6 
   
( 6 )(129 )  ( 32 )( 32 ) 774  1024
r    . 94
6 ( 230 )  32 6 ( 204 )  32 
2 2
( 356 )( 200 )

r = - 0.94

Indirect strong correlation


6  (di)2
rs  1 
n(n 2  1)

The value of rs denotes the magnitude


and nature of association giving the same
interpretation as simple r.
Calculate a Spearman rank-order correlation on data
without any ties we will use the following data:
Exa
Marks
m

English 56 75 45 71 62 64 58 80 76 61

Maths 66 70 40 60 65 56 59 77 67 63
English Maths Rank Rank
d d2
(mark) (mark) (English) (maths)

1 56 66 9 4 5 25

2 75 70 3 2 1 1

3 45 40 10 10 0 0

4 71 60 4 7 3 9

5 62 65 6 5 1 1

6 64 56 5 9 4 16

7 58 59 8 8 0 0

8 80 77 1 1 0 0

9 76 67 2 3 1 1

10 61 63 7 6 1 1
Income level education sample
(Y) (X) numbers
25 A
10 B
8 C
10 D
15 E
50 F
60 G
Level of Income d d^2
education (Y)
(X)
6 3 3 9
5 5.5 0.5 0.25
1.5 7 5.5 30.25
3.5 5.5 2 4
3.5 4 0.5 0.25
7 2 5 25
1.5 1 0.5 0.25

∑ di2=69
rk= 1- 6*(69+6/12*3)/7(7^2-1)
rk= - 0.2589
Regression: technique concerned with predicting
some variables by knowing others

The process of predicting variable Y using


variable X
linear
relationship between two variables
Ø Linear means “straight line”

Ø Regression tells us how to draw the straight line


described by the correlation
Regression

Regression minimizes residuals


Y
Y = bX + a
Change
b = Slope in Y
Change in X
a = Y-intercept
X
ŷ  a  bX
x y 
 xy  n
b 1b 
(  x) 2

ŷ  y  b(x  x)  x 
2

n
Regression Equation

Ø Regression equation
describes the
regression line
mathematically
n Intercept

n Slope
Y
ŷ  a  bX
Y = bX + a
Change
b = Slope in Y
Change in X
a = Y-intercept
X
Regressing


Linear Regression


90.00 Final grade in course = 59.95 + 3.17 * study
R-Square = 0.88
Final grade in course


80.00  

 
70.00

2.00 4.00 6.00 8.00 10.00

Number of hours spent studying

Predicted final grade in class =


59.95 + 3.17*(number of hours you study per week)
Predicted final grade in class = 59.95 + 3.17*(hours of study)

n Someone who studies for 12 hours


n Final grade = 59.95 + (3.17*12)
n Final grade = 97.99

n Someone who studies for 1 hour:


n Final grade = 59.95 + (3.17*1)
n Final grade = 63.12
Serial no. Age (x) Weight (y)
1 7 12
2 6 8
3 8 12
4 5 10
5 6 11
6 9 13
Y2 X2 xy Weight (y) Age (x) Serial no.
144 49 84 12 7 1
64 36 48 8 6 2
144 64 96 12 8 3
100 25 50 10 5 4
121 36 66 11 6 5
169 81 117 13 9 6

742 291 461 66 41 Total


41 66
x  6.83 y  11
6 6

41  66
461 
b 6  0.92
2
( 41)
291 
6

Regression equation

ŷ (x)  11  0.9(x  6.83)


ŷ (x)  4.675  0.92x

ŷ (8.5)  4.675  0.92 * 8.5  12.50Kg

ŷ(7.5)  4.675 0.92* 7.5 11.58Kg


we create a regression line by plotting two
estimated values for y against their X component,
then extending the line right and left.
Age B.P Age B.P
(x) (y) (x) (y)

46 128 20 120
53 136 43 128
60 146 63 141
20 124 26 126
63 143 53 134
43 130 31 128
26 124 58 136
19 121 46 132
31 126 58 140
23 123 70 144
Sr. No. x y xy x2
1 20 120 2400 400
2 43 128 5504 1849
3 63 141 8883 3969
4 26 126 3276 676
5 53 134 7102 2809
6 31 128 3968 961
7 58 136 7888 3364
8 46 132 6072 2116
9 58 140 8120 3364
10 70 144 10080 4900
Sr. No. x y xy x2
11 46 128 5888 2116
12 53 136 7208 2809
13 60 146 8760 3600
14 20 124 2480 400
15 63 143 9009 3969
16 43 130 5590 1849
17 26 124 3224 676
18 19 121 2299 361
19 31 126 3906 961
20 23 123 2829 529
Total 852 2630 114486 41678
 x y
 xy 
n 114486 
852  2630
b1  = 20  0.4547
( x) 2 852 2

 
x 2

n
41678 
20

ŷ =112.13 + 0.4547 x

for age 25
B.P = 112.13 + 0.4547 * 25=123.49 = 123.5 mm hg
Multiple Regression

Multiple regression analysis is a


straightforward extension of simple
regression analysis which allows more
than one independent variable.
Advertising (X) Sales (Y)
10 25
12 28
14 32
16 36
18 40

1. Fit a simple linear regression model of the form Y= a + bX


2. Predict the sales when the advertisement spend is ₹20,000.
3. Interpret the slope of the regression line.
Sr. No. Compressive strength of Concrete Water Cement Ratio
(N/mm^2)
1 30 0.365

2 32 0.256

3 34 0.342

4 31 0.234

5 36 0.451

6 29 0.234

7 28 0.345

8 33 0.345

9 45 0.451

10 50 0.453
Sr. No. Compressive strength of Concrete Water Cement Ratio
(N/mm^2)
1 30 0.365

2 32 0.256

3 34 0.342

4 31 0.234

5 36 0.451

6 29 0.234

7 28 0.345

8 33 0.345

9 45 0.451

10 50 0.453

You might also like