Loci (2008)
Mathematical Brooding over an Egg, André Heck

8. Easy data collection in GeoGebra and regression analysis

When I showed in the previous section a GeoGebra example of collecting data points on a digital image for further processing via regression analysis, I passed over a technical difficulty. Marking the points on the image is easy, but GeoGebra does not provide any means to export the data as a table. So, you must copy one by one the data to a regression analysis tool. This is cumbersome, error-prone, and boring work. Another disadvantage of this approach is that you must copy your data to a separate program for the regression analysis. But in education you may not have the time to learn about so many computer programs; you want to stick as much as possible to one and the same software system. GeoGebra itself offers no regression tools (yet), but as you can see below one can package the required elements on a web page using the fact that a GeoGebra activity can be embedded in a web page and that GeoGebra provides an JavaScript interface (Markus Hohenwarter, 2007b).

To the left you see a GeoGebra activity in which you can place data points on the eggcurve. When you do this, a table with the x- and y-coordinates of the data points will appear and this table can always be updated by pressing the Refresh table button. You can copy the table entries to the clipboard, in which case you have to option to choose between the comma or the point as notation for decimal numbers. You can drag a data point another location (e.g., to improve the quality of the data collection), but then you must again press the refresh button to update the table. Three types of regression are provided: linear, quadratic and cubic function fit. These buttons link to JavaScript functions for regression analysis. More regression types could have been provided, as can be seen from the on-line resources of (Waner & Costenoble, 1999), which inspired me for the implementation. When you press any of the regression tool buttons, the computed regression curve is displayed in the GeoGebra activity to the left of the page.

For a tryout with a digital image of your own, click here.