The notion of prediction
Notation and convention
In both of the above cases, the variables can be classified as an explanatory variable and a response. When we talk in general about this type of data, we will use the letter X to denote the explanatory variable and Y to denote the response.
Always draw the response variable, Y, on the vertical axis of a scatterplot and X on the horizontal axis.
Describing the form of the relationship
The correlation coefficient describes the strength of the relationship and whether the scatter of crosses on a scatterplot has positive or negative slope, but it holds no information about the position of the crosses on the scatterplot — the form of the relationship.
The form of the relationship can be described by a straight line or curve that lies close to the crosses in a scatterplot of Y against X. Such a line is called a regression line.
Predicting the response from the regression line
The regression line (i.e. the curve or straight line on the scatterplot that describes the form of the relationship) can be drawn close to the crosses 'by eye'. (We will describe better objective ways to position the line later.)
It is possible to use any such regression line to 'read off' the y-value corresponding to any x. This provides a prediction of the likely y-value that would be recorded if a new observation was made at this x and can be expressed as
y = ƒ ( x )
where f() corresponds to the regression line.
Predicting infection from virus
Thirty cereal plants are exposed to a virus. The scatterplot below describes how the percentage leaf area showing signs of infection by the virus is affected by temperature.
First position the grey curve to fit close to the data by dragging the five red circles up and down. (This is a computer-based way to position the curve 'by eye'.)
When your curve is close to the points, click Finished sketching curve. You can use the curve to make predictions of infection at any temperature. Drag the red vertical line towards the left or right to see these predictions.