Introduction to regression Fitting a straight line – the 3- median method
Usually, we need a more accurate method than fitting a line by eye. One of these methods is called the 3-median method.
3-median method procedure Step 1. Plot the points on a scatterplot. Step 2. Divide the points into three groups using vertical divisions. – If the number of points is divisible by 3, divide them into 3 equal groups. – If there is 1 extra point, put the extra point in the middle group. – If there are 2 extra points, put 1 extra point in each of the outer groups.
Step 3. Find the median point of each of the 3 groups and mark each median on the scatterplot. The median point of each group has an x-coordinate, which is the median value of the x-values in the group and a y-coordinate, which is the median value of the y-values in the group. – The left group is the lower group, median (x L,y L ) – The median of the middle group is (x M,y M ) – The median of the upper group is (x U,y U )
Remember that the x-values are already in the right order for calculating the median but that the y-values may need to be re- ordered before you can find the median. There are three alternative methods of completing Steps 4 and 5.
A. Graphical Approach Step 4. Draw in the line of best fit. Place your ruler so that it passes through the lower and upper medians. Move the ruler a third of the way toward the middle group median while maintaining the slope. Hold the ruler there and draw the line. Find the equation of the line
B. Arithmetic Approach Step 4. Calculate the gradient of the line using the rule Step 5. Calculate the y-intercept (c) using the rule:
C. CAS Calculator Approach Use emulator
Ex 3B: 2, 4, 5, 7, 9, 10