Regression in GeoGebra
Storks and babies, 2005
| Country | Storks · 1000 | Babies/1000 population |
|---|---|---|
| Algeria | 5.147 | 17 |
| Austria | 0.366 | 9 |
| Belarus | 11.5 | 11 |
| Czech republic | 0.811 | 9 |
| Denmark | 0.001 | 11 |
| France | 0.07 | 12 |
| Germany | 4.162 | 8 |
| Hungary | 5.5 | 10 |
| Romania | 4.4 | 11 |
| Serbia and Montenegro | 0.998 | 12 |
| Slovakia | 1.25 | 11 |
| Switzerland | 0.191 | 10 |
| The Netherlands | 0.326 | 11 |
| Tunisia | 0.405 | 16 |
Copy the numbers in the table above into GeoGebra. Selecting the entire table and then Copy/Paste to a GeoGebra spreadsheet should work.
Select the two columns of numbers and make a list of points.
Choose "Dependent Objects"! If you create the points as free objects, they will no longer be attached to the values in the spreadsheet.
Zoom out until you can see the points in the drawing pad. In order to see the regular tool bar, you must first click anywhere in the drawing pad.
Use the
Best Line Fit tool and click on the list, list1.
Changing the data
You can move any point in the drawing pad, the regression line is automatically updated and the value of the point is automatically updated in the spreadsheet. You can also change the value of a point in the spreadsheet.
Other fittings
You can fit the data points to other curves by using one of the commands
FitExp[list1], FitLog[list1], FitLogistic[list1],
FitPow[list1] or FitSin[list1]. Try them all, not
all will be defined. Move the points around!.
Polynomial fitting
A (n-1)-degree polynomial will fit n data points exactly, i.e. each of the points will lie on the curve. High order polynomials can, however, be impractical for various reasons; they can be highly oscillatory and difficult to handle.
When making a polynomial fitting in GeoGebra you use two parameters; the first
one is the list and the second is the degree of the polynomial. Try the command
FitPoly[list1,n].
references:
Stork numbers from The sixth International White Stork Census: 2004-2005
Birth numbers from NationMaster.com
by Malin Christersson under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 Sweden License
