Scatterplots
In experiments, it often happens that two variables are measured in order to find out how they are related. For example, we suspect that there is a connection between a lot of sleep and higher school grades. To test this suspicion, we could now ask students over a period of time about their grades (), and also how much they slept the night before the exam ().
These data can then be plotted as points in a coordinate system (so-called scatterplots or correlation diagrams). Often a function is searched for, which describes these points as good as possible. So we want to fit a function to the data.
This is to be done "by hand". But of course there are also computer programs, which do this automatically ... .
In the following, function equations are to be found which go as well as possible through the point sets below.
The link to the point sets is here. Attention, pressing the same button several times changes the point set a little bit, but not the function to be found.
Procedure:
- consider the type of function (power function, linear function, exponential function)
- consider from the points what the possible parameters could be (for example, does it have a vertex, where? How big is , etc.).
To check how well the function equation fits, you can enter it in the input field below the scatterplot. Write for example
f(x)=2*(x+1)^2-5
To try other function equations, simply re-enter the . The can also be deleted with the command
delete(f)
Below we discuss how to determine the power when fitting a power function from the data points. Until now, we have always had to hope that the power is of the form , or . But what if another power would fit the data better, such as ? We discuss this using a concrete example:
In an experiment, a rubber ball is dropped from a height of 1.8m. The speed of the ball is measured as a function of the distance the ball has already travelled when it falls. The data are summarized in a table:
Plot this data on a scatterplot and fit a power function to the data. Then make a prediction of how fast the ball will hit the ground.
Click right to see the calculation.
Show
Calculating
The scatterplot is shown below.
is the coordinate origin, so it is
To find and , we put in two points. We already needed the zero point, so we need two other points, like and . We then have
So we have two equations (and two unknowns). From the first equation follows
If we substitute the expression for into the second equation, we get
We now take the logarithm to base on both sides, and get
For repetition, in the last step we have used the logarithm rule
Thus
To find , we put in one of the two equations. We take the first one, i.e.
Thus we have the function
As the longer calculation shows, the fitted function is given by
Indeed, the fit is not bad, as the diagram below points out. We can now also make a prediction about the impact velocity:
This is the red dot in the scatterplot. It should be noted here that only two data points were used to calculate , and depending on the choice of these points from the table above, slightly different function will result. Ideally, one would use all data points. Such methods do indeed exist, and are routinely used (such as regression).

The graph of a reference function is shifted to the right, and then passes through the points and . Determine the function equation of the shifted function .
Solution
It is
and
Because of follows
Insert into the second equation
Apply the logarithm on both sides:
thus
and
We get the function