Chapter 9: Correlation and Regression

Correlation

Correlation

Correlation: The relationship between two variables.

Variable Types:

Types of Correlation:

Correlative Data Descriptive Statistics

Sample correlative data can be organized is a table:

Scatter Plot

Scatter Plot:

Scatter Plots can visually demonstrate the relationship between variables:

Correlation Coefficient

Correlation Coefficient

Correlation Coefficient:

Pearson product moment correlation coefficient (PPMC):

Formula for Calculating the Correlation Coefficient

The formula for calculating the correlation coefficient is:

\[r= \frac{n(\Sigma xy)-(\Sigma x)(\Sigma y)}{\sqrt{[n(\Sigma x^2) - (\Sigma x)^2][n(\Sigma y^2)-(\Sigma y)^2]}}\]

Setting up a table with the relevant data and sums makes it easier to substitute terms in the equation:

$x$ $y$ $xy$ $x^2$ $y^2$
50 4 200 2500 16
65 4 260 4225 16
59 4 236 3481 16
60 3 180 3600 9
45 6 270 2025 36
52 2 104 2704 4
56 6 336 3136 36
35 7 245 1225 49
65 4 260 4225 16
487 40 2091 27121 198

Substituting these sums in the above equation gives us:

\[r=\frac{(9\cdot2091)-(487\cdot40)}{\sqrt{[(9\cdot27121)-(487)^2][(9\cdot198)-(40)^2]}}\approx -0.589\]

The calculated value for $r$ is -0.589, suggesting a moderate negative correlation.

Testing a Correlation Hypothesis

Correlation Hypothesis

H0 and H1 Hypotheses:

Correlation Coefficient Hypotheses:

\[H_0: \rho=0\] \[H_1: \rho \not = 0\]

Testing a Correlation Hypothesis

A correlation hypothesis can be testing using the $t$ value test:

Correlation Coefficient $t$ Value Formula:

Example

Regression

Linear Regression

While correlation establishes the strength and direction of the relationship between two variables, regression calculates the actual formula by which one variable can be used to predict the other.

Notation:

Regression Line:

Residual:

Method of Lease Squares:

Coefficient of Determination

Coefficient of Determination:

Calculating the Regression Line

The formula for the regression line is given in slope-intercept form:

\[y'=a+bx\]

where:

The formula for calculating $a$ is:

\[a=\frac{(\Sigma y ) ( \Sigma x ^2) - (\Sigma x)(\Sigma x y )}{n (\Sigma x ^2) - (\Sigma x) ^2}\]

The formula for calculating $b$ is:

\[b = \frac {n(\Sigma x y ) - ( \Sigma x ) ( \Sigma y )}{n (\Sigma x ^2) - (\Sigma x) ^2}\]

Example

Critical Value for PPMC Chart

d.f. ( n-2) 0.1 0.05 0.02 0.01
1 0.988 0.997 0.9995 0.9999
2 0.9 0.95 0.98 0.99
3 0.805 0.878 0.934 0.959
4 0.729 0.811 0.882 0.917
5 0.669 0.754 0.833 0.874
6 0.622 0.707 0.789 0.834
7 0.582 0.666 0.75 0.798
8 0.549 0.632 0.716 0.765
9 0.521 0.602 0.685 0.735
10 0.497 0.576 0.658 0.708
11 0.476 0.553 0.634 0.684
12 0.458 0.532 0.612 0.661
13 0.441 0.514 0.592 0.641
14 0.426 0.497 0.574 0.628
15 0.412 0.482 0.558 0.606
16 0.4 0.468 0.542 0.59
17 0.389 0.456 0.528 0.575
18 0.378 0.444 0.516 0.561
19 0.369 0.433 0.503 0.549
20 0.36 0.423 0.492 0.537
21 0.352 0.413 0.482 0.526
22 0.344 0.404 0.472 0.515
23 0.337 0.396 0.462 0.505
24 0.33 0.388 0.453 0.495
25 0.323 0.381 0.445 0.487
26 0.317 0.374 0.437 0.479
27 0.311 0.367 0.43 0.471
28 0.306 0.361 0.423 0.463
29 0.301 0.355 0.416 0.456
30 0.296 0.349 0.409 0.449
35 0.275 0.325 0.381 0.418
40 0.257 0.304 0.358 0.393
45 0.243 0.288 0.338 0.372
50 0.231 0.273 0.322 0.354
60 0.211 0.25 0.295 0.325
70 0.195 0.232 0.274 0.302
80 0.183 0.217 0.256 0.284
90 0.173 0.205 0.242 0.267
100 0.164 0.195 0.23 0.254