What can The Simpsons teach us about stats algorithms? Glad you asked...

No, not the Simpsons – Simpson's Paradox


Big Data's Big 5 When his class is asked to give an example of a paradox in The Simpsons, Bart offers: "You're damned if ya' do, and you're damned if ya' don't."

The dictionary defines a paradox as an absurd or seemingly absurd or contradictory statement that might prove to be true and when it comes to data a seemingly contradictory situation can arise when you're collecting and comparing data.

It's a rather subtle problem, something that can quite easily catch you out, and it's called Simpson’s Paradox*.

Imagine you work at an advertising agency and are closely involved in an ad campaign for client A. You measure the amount spent on the campaign in specific areas and also the effect it has (increased sales of product Z, predictably).

At the end of the campaign you plot advertising spend against sales and produce a graph with a lovely line showing a positive correlation: the more your client spends with you, the greater the effect of the advertising. Let’s take it as read that not only is there a correlation (as one number increases, so does the other), but that causation is also at work. That is, you also prove that the act of spending more on advertising really is directly causing the product to sell better.

You move on to work for client B, one with deeper pockets, and run another ad campaign. Again you measure spend and effect and again you produce a genuinely accurate plot showing a positive correlation; and again you can prove causation.

Now you’re pitching to client C and want to show that spending more gives better results, so what better illustration than to combine the results from the previous campaigns (anonymised, of course) into one show-stopping graph in your presentation? You plug in the numbers, create the graph and – aargh! Suddenly you have a negative correlation, showing that spending more money on advertising has a negative effect on sales.

How can this be? Two positives can’t combine into a negative, surely? And that’s Simpson’s Paradox in a nutshell.

To resolve the paradox it helps if we first colour the data points from each data set, so we can see what’s going on.

The first data set had a relatively low spend and a high return, the second a much higher spend and, on average, a much lower return. To illustrate why this causes the negative correlation when they are combined, we can calculate an “average” point for each set of data. (I am not recommending this as a statistical test, merely a way of illustrating what is going on).

Now you can see that across the two data sets, as average spend increases, the average return actually drops. This is because the average spend of the second set is higher than the first while its average return is actually lower. This is irrespective of the fact, which we know already, that within each set, the average return increases.

The next question might be “Well, why are these averages so different?”

The answer is that while the two have certain similarities (we know the advertising spend and we can measure the effect), in reality a great number of factors may be very different.

* The eponymous Simpson here is actually Brit statistician Edward Simpson – more on him on page two

Next page: They look alike

Other stories you might like

  • OpenID-based security features added to GitHub Actions as usage doubles

    Single-use tokens and reusable workflows explained at Universe event

    GitHub Universe GitHub Actions have new security based on OpenID, along with the ability to create reusable workflows, while usage has nearly doubled year on year, according to presentations at the Universe event.

    The Actions service was previewed three years ago at Universe 2018, and made generally available a year later. It was a huge feature, building automation into the GitHub platform for the first time (though rival GitLab already offered DevOps automation).

    It require compute resources, called runners, which can be GitHub-hosted or self-hosted. Actions are commands that execute on runners. Jobs are a sequence of steps that can be Actions or shell commands. Workflows are a set of jobs which can run in parallel or sequentially, with dependencies. For example, that deployment cannot take place unless build and test is successful. Actions make it relatively easy to set up continuous integration or continuous delivery, particularly since they are cloud-hosted and even a free plan offers 2,000 automation minutes per month, and more than that for public repositories.

    Continue reading
  • REvil gang member identified living luxury lifestyle in Russia, says German media

    Die Zeit: He's got a Beemer, a Bitcoin watch and a swimming pool

    German news outlets claim to have identified a member of the infamous REvil ransomware gang – who reportedly lives the life of Riley off his ill-gotten gains.

    The gang member, nicknamed Nikolay K by Die Zeit newspaper and the Bayerische Rundfunk radio station, reportedly owns a €70,000 watch with a Bitcoin address engraved on its face and rents yachts for €1,300 a day whenever he goes on holiday.

    "He seems to prefer T-shirts from Gucci, luxurious BMW sportscars and large sunglasses," reported Die Zeit, which partly identified him through social media videos posted by his wife.

    Continue reading
  • A Windows 11 tsunami? No, more of a ripple as Microsoft's latest OS hits 5% PC market

    Next version of Windows 10 looms around the corner

    Microsoft's Windows 11 OS has notched up a respectable near 5 per cent of PCs surveyed by AdDuplex, as another Dev Channel build was unleashed with new features for the favoured few.

    With less than a month of General Availability under its belt, Windows 11 now accounts for 4.8 per cent of "modern" PCs (Windows Insiders running the OS account for 0.3 per cent) according to the ad platform. The figure is up from the 1.3 per cent in September, which was Insider-only and points to some migration to the production version of the software.

    The figure is both an indicator of Microsoft's cautious approach to releasing its wares and the limited amount of hardware that can actually run the round-cornered OS.

    Continue reading

Biting the hand that feeds IT © 1998–2021