AI • Science • Technology • Future

Side Projects

A Price Comparison Error in Ski Data

Image from the original article
Featured image: original publisher image. Via original publisher.

A comparison of ski prices in the Netherlands revealed a critical flaw in how data is interpreted. The initial result claimed February was 59% more expensive than March. Source: dev.to.

What Happened

The error began with a simple question: how much more do Dutch families pay for ski holidays during school breaks?

Every morning, a script pulls price data from 1,080 Alpine accommodations. It then builds a comparison page for users.

For the spring holiday starting on 20 February 2027, the system compared prices in early March to those in the holiday week.

The first calculation used medians of available prices. That number was used in a draft headline.

The Flawed Method

It compared two medians: one from 187 available chalets on 20 February, and another from 341 chalets in early March.

But availability is not random. The chalets still open on 20 February were not randomly selected. The cheaper ones sold out first.

What remained were the more expensive options. The median price of those left was €704. The median for all early March chalets was €658.

So the 59% figure wasn’t measuring price changes. It was measuring a biased sample of what remained.

One user noted: ‘A median over 187 leftovers divided by a median over 341 is not a price change. It is a comparison between two different groups of chalets that happen to share a database.’

When the system calculated the median price for the 20 February week, it was only looking at the 187 chalets that hadn’t sold out. These were not representative of the full market. The data was filtered by time and demand, not by price. This meant the comparison was not between two time points with the same set of accommodations, but between two different subsets — one with a higher average price, and one with a broader range.

How the Fix Works

The solution compares each accommodation with itself.

For every chalet available in both periods — that is, open on 20 February and also open in early March — the system calculates the ratio of its price in the holiday week to its average price in the reference weeks.

It then takes the median of all these ratios.

Image from the original article
original publisher image. Via original publisher. · Source

This method removes bias from location, size, or quality differences. It ensures each unit is compared to its own history. For example, a chalet in the valley might have a higher price in the holiday week than in the reference weeks, but if it was also available in early March, its own price trajectory is visible. This eliminates the artificial inflation caused by comparing different groups of chalets.

The function is named paar in the codebase. It runs every morning and updates the live page. The code is written in Dutch, and the function is designed to pair each accommodation with its own historical data. This approach is simple, elegant, and statistically sound.

After the fix, the result is 40%. This is a real price increase, not a statistical artifact. It reflects the actual cost burden on families during the school holiday period, rather than a distortion caused by data filtering.

Why the Error Was Hard to Spot

The flaw changed direction depending on the holiday.

For New Year’s, the simple method gave a lower result. The places still free on 26 December are the cheaper ones (median €637 in January, against €674 for those already booked), so the leftovers pull the median down instead of up. One user observed: ‘For New Year the simple method is too low. The places still free on 26 December are the cheaper ones (median €637 in January, against €674 for those already booked), so the leftovers pull the median down instead of up.’

For 19 December, both methods agreed. That week had not yet sold out unevenly. The market was still balanced, so both the filtered and unfiltered medians were representative.

As holidays approach, the simple method starts to drift. The paired method stays stable. This is because the paired method only uses accommodations that were available in both periods, so it does not change as demand shifts.

There is no visible sign to detect the bias. The numbers look plausible, even when wrong. This is a common issue in data analysis — the result may appear valid at first glance, but it is built on an unexamined assumption about the population being measured.

Key Lessons

  • Availability is a filter. It changes the population being measured.
  • Any analysis after filtering must account for that change.
  • Compare a thing with itself when possible. This removes group-level bias.
  • Always check who is missing from a comparison.
  • Display the sample size. A small group can produce misleading results.

The live page now shows how many chalets contributed to each percentage. It only displays results when at least 15 accommodations are available. Smaller groups produced figures like +116%, which were noise, not valid data.

This is the same lesson as a previous post on win rates: the underlying population changes, and code can miss it. The system must not only compute a number, but understand the dynamics of the data it is working with.

The page is live at skizie.com/wintersport-goedkoopst. The raw data is open on GitHub: mavemedia/wintersport-prijzen.

The author invites feedback. If you see a flaw in the method, they would like to hear it.

This case shows how even simple data comparisons can be misleading if not properly designed. It also highlights the importance of transparency in data analysis — showing both the sample size and the method used.

Sources & further reading

Featured image: original publisher image. Via original publisher. Image source

Leave a Reply

Your email address will not be published. Required fields are marked *