Regression

Predicting unknown futures

Regression is a go-to method in data analytics because it offers the tantalising promise of being able to predict future unknowns.Identifying cause and effect is a process that is hardwired into our approach to problem solving. If we can identify a cause of a problem, we have a chance of intervening and altering the path of the future.

Regression allows us to explore two different variables and the way that they interact. In the simplest cases, we can easily measure the impact of variables such as water, sunlight, temperature and soil condition on the quality of the plant that grows. With enough trial and error, we can probably come up with an optimal level of watering and position in the garden to make healthy and happy plants more likely - not guaranteed, but more likely.

Think back to your school days and measuring the height of your classmates, plotted against the month of their birth. Although there was some variation, you could draw a line going upwards to show that, in general, the taller children were also the older children. Plain obvious logic tells us that age affects height, and not the other way around.

The line is known as the line of best fit. Machines will sample a position for the line and then measure how far the ‘error’ is, or the distance each data point is from lying directly on the line. We call this a ‘measure of least squares’. We don’t much care if the data point is below (negative) or above the line (positive) so instead of using the real distance (+2 or -6.5) we use the square of that distance (4 and 42.25). By squaring, we immediately get rid of negative values. The line of best fit, or regression line, is the line that falls where the the squared distances overall measure the least.

A little terminology

You have probably heard the phrase ‘correlation is not causation’. When we say that two things correlate, it means that we have found two things where an increase in the value of one seems to result in a corresponding increase or decrease in the value of another. It is important to bear in mind that we can never statistically evidence causality. Perhaps, if there is a time element involved and one thing consistently happens first, we might assume that it is causal. Generally, human observation and common sense are our main source of insight.

Below are some key terms when interpreting the output of regression.

It is important not to rush to the conclusion that you have found a causal relationship, as tempting as it may be. There are may things that could explain what you have observed, the most common being that there may be an unseen, unrecorded third variable that is the true cause. For example, it is well known that ice-cream sales tend to increase in proportion with the murder rate in many large cities. The unobserved variable would be consistently hot temperatures, which both cause tempers to flare, and people to seek out cold treats. Once you start to carry out multiple regression, looking at the impact of the range of complex factors on one variable, it is rare that any one variable is the sole predictor.

When we observe a correlation, it is more normal to simply state that you have observed an association, and leave it to others to reach their own conclusions about whether it is causal.

Avoiding mono-causal explanations

There is an old Korean story about a farmer and his son that has much to teach us about evaluating the present and the future.