Presentation is loading. Please wait.

Presentation is loading. Please wait.

2.5 Modeling Real-World Data Using Scatter plots Linear Regression.

Similar presentations


Presentation on theme: "2.5 Modeling Real-World Data Using Scatter plots Linear Regression."— Presentation transcript:

1 2.5 Modeling Real-World Data Using Scatter plots Linear Regression

2 Lets find some Real world Data http://www.gapminder.org/ We are going to use some real world Data to make a prediction. I am going to look at the data for ……

3 Lets find some Real world Data http://www.gapminder.org/ We are going to use some real world Data to make a prediction. I am going to look at the data for Children out of school, primary, female. Why did I pick this data?

4 Lets find some Real world Data http://www.gapminder.org/ We are going to use some real world Data to make a prediction. I am going to look at the data for Children out of school, primary, female.(U.S) Why not.

5 Here I am going to open Excel and make a Chart Year starting with 1999Number Out 1597082 2558054 3416101 4586377 5638900 61091542 7750414

6

7 Use Excel to make your chart

8 We want to draw a line close to all the points This line would be called the best fit line. We would use Linear regression to find this line.

9 Linear Regression Most commonly, linear regression refers to a model in which the conditional mean of y given the value of X is an affine function of X.conditional meanaffine function

10 Linear Regression Most commonly, linear regression refers to a model in which the conditional mean of y given the value of X is an affine function of X.conditional meanaffine function What! It is the line that fits closest to all the points. How do we find it.

11 We can do it by hand (yeah) We have to find the mean of domain and the mean of the range. Then subtract each x by the mean and do the same for y and its mean. Square the …… Lets just use Excel

12 Go to Chart on your Excel spreadsheet Use.Add a Trendline Choose Linear

13 Go to Chart on your Excel spreadsheet Use.Add a Trendline Choose Linear And a line is born.

14 Want to find the equation Go to “Add a Trendline ….’ again Click on the options tab Click the box that says “Display equation on chart”

15 Want to find the equation Move equations so you can read it

16 Now the equation we can predict How many females will be out of school in the year 2019? Twenty years after the study begin. y = 62492x + 412671;x = 20 y = 62492(20) + 412671 y = 1,662,511 Is this number correct? Why or why not ?

17 Lets try another one http://www.gapminder.org/data/


Download ppt "2.5 Modeling Real-World Data Using Scatter plots Linear Regression."

Similar presentations


Ads by Google