Posted on December 22, 2016
Yesterday was the winter solstice, which means various weather and news sites were marking it as the official beginning of winter. Technically it’s the beginning of the astronomical winter, meteorological winter started on the 1st December.
This got me thinking. The shortest day shouldn’t be the beginning of winter, it should be the middle of winter. Also, winter isn’t just dark, it’s cold . So if the 21st December 2016 is the shortest day, statistically speaking when’s the coldest day?
Wunderground have a comprehensive API including a historical almanac. A few thousand API calls later and I have this data set of the daily average temperatures in Leeds for the last 10 years:
Dates are convenient for people, but they’re horrible to use in any sort of Maths, so the first step is to convert the dates into number of days relative to 31st December 2016. i.e. 31st Dec 2016 is day 0, 30th Dec is day -1 and so on:
Fitting a cosine curve to the data will let me calculate the statistical minimum, which is the average coldest day. The general form of a cosine curve is:
a - b cos ( (2π/365.25) * (x - c) )
a will be the yearly average temperature,
b the temperature range and
c will give the offset from day zero of the coldest day.
The R stats language has a steep learning curve, but once you’ve cracked it it makes fitting this sort of curve the work of a few seconds:
The fit parameters came out as:
a - 8.65657
b - 5.95243
c - 23.63964
My heavy-duty science days are behind me, so bootstrapping those fits and working out the errors on those numbers is left as an exercise to the reader.
Rounding to the nearest integer gives the (statistically) coldest day of the winter in Leeds, based on the last 10 years of data, to be the 24th January.
Splitting the difference between that date and the shortest day, gives us a date of the 7th January as mid-winter’s day.
I’m adding that to the list of entirely useless things that I know.
Copyright © 2015 - 2016 Nathan Courtney