Section 2b
- Analyzing data involving two variables
Problem
Now that I have seen that the percentage of drivers involved in a collision
decreases as age increases, tests should be done to see if there is
a linear relationship. That is, what is the equation of the line of
best fit? Then a correlation coefficient needs to be determined to see
how well the line fits. I will also compare what I find to the data
I retrieved from Kanetix concerning insurance costs.
Plan
To determine the line of best fit, y= a + bx, x and y must first be
defined. Then numerous calculations need to be done concerning the sum
of squares. Using the values calculated to determine the equation of
the line of best fit, a correlation coefficient will be determined.
Data was obtained from Kanetix by entering standard information that
remained constant. A different age was entered for each set of data.
Ages I entered were between 18 and 32 with 2-year intervals (i.e. 18,
20, 22, 24, ..., 32). This was done for both males and females. The
data obtained from Kanetix was entered into a collection chart in Fathom.
Fathom was also used to create a scatter plot to see the relationship
between the age of a driver and cost of insurance.
Data
Let x be the midpoint for each of the age groups. Let y be the percentage
of
drivers involved in a collision.
Analysis
The following calculations were made with Fathom:

Therefore the equation of the
line of best fit is:
% of drivers involved in collisions
= 8.628 - 0.0826 x.
Analysis
To see how well the line fits, a correlation coefficient, r, needs to
be calculated. The correlation coefficient was calculated with Fathom.

The closer |r| is to 1, the stronger the correlation
and since -1<r<1 and the correlation coefficient for the line
of best fit is -0.984 there exists a strong negative correlation. Therefore,
y = 8.628 - 0.0826 x fits the data very well. The following is a graph
showing the original scatter plot including the Line of Best Fit.
Although not required for the course, I wanted
to try a similar procedure with the Kanetix data as I did with the MTO
data. I played with an equation to find a curve with the best fit. However,
due to the nature of the curve, at some exponents the curve would not
be calculated to the left of the vertex. For observational purposes
the centre was set to be the last age group and the data was entered
so to create a reflection along the vertical line marked by the last
actual age group. The formula for the curve is shown below each diagram.

The Kanetix data plots show that
a non-linear relationship exists between insurance costs and age regardless
of gender. From this limited data, insurance rates drop as age increases
regardless of gender.
Conclusion
There exists a linear relationship between the percentage of drivers
involved in an accident and age. The equation of the line of best fit
is percentage = 8.628 - 0.0826 age. The correlation coefficient is -0.984.
In the Kanetix data, I can see a non-linear regression in the insurance
rates as opposed to the linear regression in the collisions.
<<Section
2a | Section
2c>>