Presentation is loading. Please wait.

Presentation is loading. Please wait.

Linear Regression By Hand Please view this tutorial and answer the follow-up questions on loose leaf to turn in to your teacher.

Similar presentations


Presentation on theme: "Linear Regression By Hand Please view this tutorial and answer the follow-up questions on loose leaf to turn in to your teacher."— Presentation transcript:

1 Linear Regression By Hand Please view this tutorial and answer the follow-up questions on loose leaf to turn in to your teacher.

2 What is Linear Regression? Linear regression is also known as “line of best fit” Once you find a line that fits the pattern of your data, you’ll need to find the slope and y- intercept for that line. Your line of best fit DOES NOT have to go through the origin (0,0)!!

3 Steps for Finding a Line of Best Fit The following data shows results from a comparison of the Ford Probe and the Ford Taurus in several categories. Ford Probe Ford Taurus Let’s use this information to make a scatterplot.

4 Steps for Finding a Line of Best Fit Ford Probe Ford Taurus Ford Probe Ford Taurus

5 Steps for Finding a Line of Best Fit Now we need to find a line that models the pattern in this data Ford Probe Ford Taurus The first step is to find the centroid. This is the average of the x information and the average of the y information.

6 Steps for Finding a Line of Best Fit Ford Probe Ford Taurus The average rating for the Ford Probe is 7.6. Find the average for each column. The average rating for the Ford Taurus is 7.8. Therefore, the centroid is (7.6, 7.8). Plot this point on the graph as a square.

7 Steps for Finding a Line of Best Fit Ford Probe Ford Taurus Ford Probe Ford Taurus

8 Steps for Finding a Line of Best Fit Ford Probe Ford Taurus Your line of best fit will always go through the centroid! You should look at the pattern in your points. If they are increasing, your line should be increasing.

9 Steps for Finding a Line of Best Fit Ford Probe Ford Taurus The line should touch some points and have a balance of points above and below it. It DOES NOT always have to go through the origin!

10 Steps for Finding a Line of Best Fit Ford Probe Ford Taurus There are many choices for this line…let’s look at a few.

11 Steps for Finding a Line of Best Fit Ford Probe Ford Taurus What’s good about this line? It goes through the centroid. It is almost horizontal like six of the eleven points.

12 Steps for Finding a Line of Best Fit Ford Probe Ford Taurus What is good about this line? It goes through the centroid. It touches some of the points. There are some points above the line and some below.

13 Steps for Finding a Line of Best Fit Ford Probe Ford Taurus This will be our line of best fit. Now, we need to find the equation of the line.

14 Steps for Finding a Line of Best Fit Ford Probe Ford Taurus First, find where your line crosses the y-axis. Our line crosses at 7 so this is our y- intercept.

15 Steps for Finding a Line of Best Fit Ford Probe Ford Taurus Next, you’ll need to estimate the slope (how the line changes from left to right.

16 Steps for Finding a Line of Best Fit Ford Probe Ford Taurus A good strategy is to pick “points in corners” or points that fall on the gridlines.

17 Steps for Finding a Line of Best Fit Ford Probe Ford Taurus You’ll need to find the change in your y value and the change in your x value between these two points.

18 Steps for Finding a Line of Best Fit Ford Probe Ford Taurus Make a triangle so that the hypotenuse is the distance between the two points.

19 Steps for Finding a Line of Best Fit Ford Probe Ford Taurus What is the height of the triangle? 1 The height goes from 7 to 8 so that is a difference of 1. Therefore, the change in y is 1.

20 Steps for Finding a Line of Best Fit Ford Probe Ford Taurus What is the length of the triangle? 6 The length goes from 3 to 9 so the difference is 6. Therefore, the change in x is 6.

21 Steps for Finding a Line of Best Fit Ford Probe Ford Taurus We then need to divide the change in y by the change in x. This will be the slope. 6 1 Change in y Change in x = 1 6

22 Steps for Finding a Line of Best Fit Ford Probe Ford Taurus A second way you can find slope is by using two points and the slope formula:

23 Steps for Finding a Line of Best Fit Ford Probe Ford Taurus First you would need to find two points that are on the line and go through one of the corners of the grid. An example would be: (3,7)

24 Steps for Finding a Line of Best Fit Ford Probe Ford Taurus Can you find another point? (9,8) would be a good choice since it goes through the grid.

25 Steps for Finding a Line of Best Fit Ford Probe Ford Taurus Our two points are (3,7) and (9,8) Since points are written as (x,y), let’s label the first point and second point: (3, 7) and (9, 8) x 1 y 1 x 2 y 2

26 Steps for Finding a Line of Best Fit Ford Probe Ford Taurus (3, 7) and (9, 8) x 1 y 1 x 2 y 2 Next we need to substitute the values into the slope formula:

27 Steps for Finding a Line of Best Fit Ford Probe Ford Taurus Notice that we still get the same value for slope as we did earlier.

28 Steps for Finding a Line of Best Fit Ford Probe Ford Taurus So now we have our y-intercept and our slope. Let’s put these together to make our equation.

29 Make Estimations Using a Line of Best Fit Ford Probe Ford Taurus There are two ways to make estimations using your line of best fit. The first is to use the rule you just found to make a table on the calculator.

30 Make Estimations Using a Line of Best Fit Enter your equation into your list. Set your table setup. Then go to 2 nd GRAPH to look for values in your table.

31 Make Estimations Using a Line of Best Fit Ford Probe Ford Taurus The key thing to remember when making estimations with your line is to IGNORE THE POINTS and FOCUS ON THE LINE! The second is to use the line you drew on the graph.

32 Make Estimations Using a Line of Best Fit Ford Probe Ford Taurus Let’s say we want to know the rating for the Ford Taurus if the Ford Probe scored an 8.

33 Make Estimations Using a Line of Best Fit Ford Probe Ford Taurus Then go up until you reach your line. First, go over to 8 on the x –axis. Then go over to the y-axis to find your value.

34 Make Estimations Using a Line of Best Fit Ford Probe Ford Taurus Your y-value is about 7.8.

35 Make Estimations Using a Line of Best Fit Ford Probe Ford Taurus To find an x value if you are given y, go to the value on the y-axis. Go over until you reach your line. Then go down to find your x-value.

36 Follow-Up Questions Answer the following questions on loose leaf and hand them in to your teacher.

37 Follow-Up Questions Time Standing in Line People Still in Line for Lunch It is cheesesteak calzone day in the Raider’s Den so there are a lot of students in line. Answer the following questions using the table to the left.

38 Follow-Up Questions Time Standing in Line (in minutes) People Still in Line for Lunch Make a scatterplot on graph paper. 2.Find the centroid and mark it on the scatterplot. 3.Draw a line of best fit. (Use a ruler!!) 4.Using the line of best fit, estimate how many people would still be in line after 7 minutes.

39 Follow-Up Questions Time Standing in Line People Still in Line for Lunch If there are 75 people still in line, estimate how long they’ve been standing in line. 6.Find the equation for your line of best fit. 7.Using this line of best fit, estimate how many people will be in line after 7 minutes. Compare this to your answer for #4.


Download ppt "Linear Regression By Hand Please view this tutorial and answer the follow-up questions on loose leaf to turn in to your teacher."

Similar presentations


Ads by Google