Wolfram Computation Meets Knowledge

Mathematica Tests the St. Swithun’s Day Proverb

Like most in the United Kingdom, I have been trapped in my house by snow for most of the last week.

Waking up again like Bill Murray in Groundhog Day, to another snowy view, I have been dreaming of summer days to come. It was against this background that I thought I would get around to testing whether an old British weather proverb was true:

St. Swithun’s day if thou dost rain
For forty days it will remain
St. Swithun’s day if thou be fair
For forty days ’twill rain no more


I read about this in the Times last summer. The article claimed that there was some truth in it based on stable jet streams, and supported that claim with some very general statement about particular years, but with no actual raw data. Like many analysis tasks, it turns out to be quite easy to do more precise analysis yourself, when you have Mathematica. But like many ill-defined problems, the results turned out to be a bit more interesting than I expected.

First let’s define the date range that we need. St. Swithun’s day is July 15, and we want to look at the following 40 days too.

Define the date range

Let’s look at my local rainfall for the 40 days following the last St. Swithun’s day. Mathematica has a built-in ability to query weather stations for the actual data (in this case located at Oxford’s airport).

Mathematica's WeatherData for date range
Mathematica's WeatherData for date range

Or more visually…

DateListPlot[%, Joined -> True, PlotRange -> All]
Grpah of Oxford rainfall after St. Swithun's Day

For convenience I will pack that into a function that takes any location and year and returns just the precipitation amounts and discards the dates. I will do a bit of extra work to record the occasional missing data point, when the weather stations have been broken, to make some of the later steps easier.

Building a precipitation-reporting function

and test it on the same range…

Testing it on the range
Testing output for the function

The proverb doesn’t say anything about amount of rain, only that the rain will remain. So we want to reduce this data into True (it rained) and False (it didn’t). But in a generally damp country like the UK, does a little drizzle count as rain? Let’s duck that question for now by allowing a threshold parameter for what constitutes a rainy day.

Threshold parameter

And test again on the same year, using 0 as the threshold—any rain is rain.

Input with True/False
True/False output with a rain threshold of 0 mm

We can now apply that function to the available data from 1900-2008.

Applying a year range

Now we just have to pull out the rows that started with True (rainy St. Swithun’s day) and count the rainy days that follow. If the proverb is accurate, we should get a list of 40 days.

Days with rainfall
Output of days with rainfall

Not exactly compelling. Let’s compare to the days of rain in years when it didn’t rain on St. Swithun’s day, which should be a list of zeros.

Days with no rainfall
Days without rainfall

It doesn’t look substantially different. So let’s package those preceding steps into a single function and find the averages of each list, and make a pretty table…

Combining the steps into a single function that also generates a table
The table

So not only does the proverb not, on average, apply to Oxford over the last 100 years, but it is actually a counter-indicator to rain. A wet St. Swithun’s day means you are, on average, going to get a dryer period to follow.

What happens if we use a less absolute definition of rain? Perhaps it must be at least 2 mm accumulation.

2mm of accumulation
Days with at least 2 mm of rain

That makes a wet St. Swithun’s day even more of a counter-indicator of rain to come. A properly wet St. Swithun’s day leads to, on average, about 2 fewer wet days out of the next 40.

So it seems like an open-and-shut case. The proverb doesn’t work. But we mustn’t forget that St. Swithun was Bishop of Winchester Cathedral in the 9th century, so perhaps it only applies to Winchester. The nearest weather station to Winchester, according to Wolfram|Alpha, is Eastleigh.

Eastleigh data
Rain days in Eastleigh

In Winchester then, it has at least been a positive indicator, and the part about fair weather has come close to being true. It is still far from the 40 days of rain promised after a rainy St. Swithun’s day.

Two data points isn’t enough, so lets look at each of the 68 largest towns and cities in the UK.

Generating data for the 68 largest cities in the UK

Rain data for 68 cities—click to enlarge

So if we are selective about our point of observation, then we can get pretty good support for the theory. For example, we could rewrite the proverb like this:

St. Swithun’s day if thou dost rain (in St. Helens)
For (the majority of) the next forty days it will remain (in St. Helens)
St. Swithun’s day if thou be fair (in St. Helens)
For forty days ’twill rain (not much) more (in St. Helens)
(on average)

Looking over the table, it does seem that there are lots of places where the theory is a positive indicator, plenty where it makes no difference, and very few where it is a counter-indicator. So averaging over the whole country will make it a positive indicator, but far short of the promise.

But perhaps we need to consider this as a collective experience of the country rather than personal experience in a particular location. What if we define “Dry” as being rain in less than half of the top 68 towns and cities, and “Rain” as being rain in at least half? I need to rewrite the code for that…

Figuring collective rain days across the UK

Now let’s try this, with any rain counting as a rainy day, and more then half the top 68 cities needing rain to count the country as having a rainy day. I am running this over a shorter period, of 1980 to 2009, only to reduce the number of times I have to query the weather stations.

CollectiveReport[0, 0.5]
Rain days for the UK

So we do get a little positive bias, but barely very much. I suspect selecting out any period that starts with rain will give a positive bias towards rain, compared to selecting periods that start with sun. But I will leave that as an exercise for the reader.

So, if there is anything in the St. Swithun’s day legend, it has been greatly overstated.

Comments

Join the discussion

!Please enter your comment (at least 5 characters).

!Please enter your name.

!Please enter a valid email address.

16 comments

  1. I sense an Ignobel prize nomination

    Reply
  2. If Saint Swithun was writing so long ago, he was probably using the Julian calendat rather than the Gregorian

    Reply
  3. Met Office and the IPCC share a consensus that very similar forecasts actually work perfectly – for whole centuries. Maybe they use Maple and Mathematica has a bug? Or do they use an abacus? :-)

    Reply
  4. What also matters is when this proverb originated, for 2 reasons:
    – climate probably changed since then
    – 15 July in the old Julian calendar now falls on 28 July in our current Gregorian calendar. The Gregorian calendar follows the seasons more accurately, but the position of the relevant day in the season probably was another one than the current 15 July at the time the proverb originated.

    Also, you cannot decide if -for example – 14.33 is different from 14.5 without an analysis of the standard deviations of the data from which these averages are drawn – is this a significant difference or not? Probably not, so you cannot call it a counter-indicator.

    Otherwise, a nice example of using Mathematica.

    Reply
  5. Interesting, but you’re also assuming the weather patterns/climate are currently identical to those in the 9th century. More than likely, they are quite different! In other words, your conclusion that the proverb doesn’t hold water actually doesn’t hold any water itself :) You would need weather data from the 9th century to do a truly scientific test of the proverb’s accuracy.

    Reply
  6. Great. If you would bet on reverse rain (instead of reverse interest rate floaters)?
    In financial risk management you might calculateVaRs, which, simplified, tell you, that there is a 1% chance your trading position would lose more than VaR (the days you get really wet in dobkl sense).
    But the crisis turned out that this is not enough. Risk managers should have back.tested, whether
    – the actual fraction of VaR break days is 1% within statistical tolerance.
    – The VaR breaks are randomly distributed (avoid Swithun situations)
    – The VaR breaks are independent of the level of VaR.
    If you have the VaR, which calculation can become nasty, but can be done, with the most sophisticated deal types, back testing is as simple as in Jon’s example, in Mathematica.
    People simple are not aware?

    Reply
  7. This is related to the persistence theory of weather forecasting. Saying that tomorrow is like today works very well (but misses some big events of course).

    Reply
    • Interesting, but you’re also assuming the weather patterns/climate are currently identical to those in the 9th century. More than likely, they are quite different! In other words, your conclusion that the proverb doesn’t hold water actually doesn’t hold any water itself

      Reply
  8. Jon, you didn’t really make your case. You didn’t prove that the proverb doesn’t hold. You didn’t use weather data from the 9th century.

    Reply
  9. More than likely, they are quite different! In other words, your conclusion that the proverb doesn’t hold water actually doesn’t hold any water itself.

    Reply
  10. Well written article and I enjoyed it. Little confused about small amount of rain or drizzle.

    Reply
  11. Amusing analysis.

    Somewhat unrelated, it seemed odd to me that Caerdydd gets used for Cardiff and Casnewydd for Newport, but Abertawe isn’t used for Swansea.

    Reply
  12. Interesting, but you’re also assuming the weather patterns/climate are currently identical to those in the 9th century. More than likely, they are quite different! In other words, your conclusion that the proverb doesn’t hold water actually doesn’t hold any water itself

    Reply
  13. Ah! I say.
    Has St. Swithins day suffered from calendar changes? Would it not have been a certain day after a certain phase of the moon?
    If so then you might have to re run the program.
    Nice stuff but.

    Reply
  14. Jon, you didn’t really make your case. You didn’t prove that the proverb doesn’t hold. You didn’t use weather data from the 9th century.

    Reply