
| Quantitative Techniques to Transport Planning | Courses Index | ![]() | ![]() |
Page 32
of 88
pages. Chapter: 6: Correlation ![]() |
Calculating the Correlation CoefficientSo far we have got an impression of how strongly associated two variables are by looking at a scatter chart. The next stage is to measure the degree of closeness by calculating a Correlation Coefficient. This is a measure, denoted by r, which can take values between –1 and +1. The value:
In general, the closer the correlation coefficient is to plus or minus 1, the closer the points are to a straight line; the closer the coefficient is to zero, the more scattered the points. Pearson’s Product Moment Correlation Coefficient This uses the actual values, and is the measure that is most widely used. The full formula for calculating it is fairly daunting. Many spreadsheets and some calculators have a regression option that calculates r (or r squared) directly. If you do not have this option you can still use your calculator or spreadsheet to calculate the basic building blocks. Let us try to calculate the Pearson correlation coefficient for the third example (see Table 5.2, unit cost against volume of business). If you are using a spreadsheet, then you will first have to enter the data as three columns:
a) To find the correlation coefficient using Excel, use the function This will give r = -0.968 which is a strong negative association.
b) If your spreadsheet does not have a regression function, you can still use it to do most of the tedious calculations and then use the formula;
where
You should get a table similar to that shown below Example 1 Table 5.3 Setting out the calculation of a correlation coefficient using a spreadsheet (if no regression function)
Total is found by using =sum( )
Example 2 The cost of output at a factory is thought to depend on the number of units produced. Data have been collected for the number of units produced each month in the last six months, and the associated costs, as follows;
Solution
so . . .
There is a perfect positive correlation between the volume of output at the factory and costs. |
![]() ![]() ![]() ![]() ![]() ![]() |