# How to find the probability of extra Sundays in a leap year?

What is the chance that a leap year will have 53 Sundays?

As per my trial, will it be 2/7? Since 366 days in a leap year means 52 weeks and 2 more days, so from the extra two days, the probability of Sunday is 2/7.

P.S : This was a question I found in a basic statistics book.

• 1. You say "non-leap year" in your first paragraph but your second paragraph clearly discusses leap-years (which have 366 days - contradicting the first paragraph). Please clarify your question. (You should also make clear how this question arises; is it related to coursework, for example? If not, how does it arise?) Feb 19 '17 at 6:31
• 2. Occurence of Sundays isn't a random process. Any given year will have an exact unvarying number of Sundays which is known before you observe the year. For the question to make any sense as a probability question you'd need to posit random selection of years (which you don't make any mention of), but to get anywhere we'd need to understand how years are being selected and from which notional population (the present calendar has only been around a few hundred years; the actual number of years in that with 53 Sundays probably isn't quite 2/7. Again, please clarify the nature of your question. Feb 19 '17 at 6:36
• Hello, glen_b , thanks for identifying my mistake while typing. Yes the question is for leap years only. I have edited the question as well Feb 19 '17 at 7:12
• Thanks for responding to my point 1. I've added the self-study tag -- see the comments in the help center on routine-bookwork problems (discussed under homework there but it applies to any textbook problem like this). There's additional clarification really needed in relation to point 2 (relating to what the assumed population is and the sampling model), though if you directly quote the original question the required clarification might then shift to a necessary assumption for an answer. Feb 19 '17 at 8:54

The Gregorian calendar favors five of the seven weekdays during leap years. Therefore the chance is not precisely $2/7$.

This was essentially problem B3 in the 1950 Putnam Mathematics Competition:

$n$ is chosen at random from the natural numbers. Show that the probability that December 25 in year $n$ is a Wednesday is not 1/7.

In the Gregorian Calendar, years that are multiples of $4$ are leap years (with $7\times 52 + 2=366$ days), but years that are multiples of $100$ are not leap years (and therefore have $7\times 52+1=365$ days), with the exception that years that are multiples of $400$ are leap years. (Many of us remember the most recent exception in $2000$.) This creates a $400$ year cycle containing $400/4 - 400/100 + 400/400 = 97$ leap years.

What is especially interesting is that the total number of days in this cycle is a whole multiple of seven:

$$400 \times (7\times 52 + 1) + 97 \times 1 \equiv 400+97 \equiv 71 \times 7 \equiv 0 \operatorname{mod} 7.$$

This shows that the $400$ year cycle comprises a whole number of weeks. Consequently, the pattern of days of the week is exactly the same from one cycle to the next.

We may therefore interpret the question as asking for the chance of $53$ Sundays when sampling randomly and uniformly from any $400$-year cycle of leap years. A brute-force calculation (using, say, the fact that January 1, 2001, was a Monday) shows that $28$ of the $97$ leap years in each cycle have $53$ Sundays. Therefore the chance is

$$\Pr(53\text{ Sundays}) = \frac{28}{97}.$$

Note that this does not equal $28/98 = 2/7$: it is slightly greater. Incidentally, there is the same chance of $53$ Wednesdays, Fridays, Saturdays, or Mondays and only a $27/97$ chance of $53$ Tuesdays or Thursdays.

For those who would like to make more detailed calculations (and might mistrust any mathematical simplifications), here is brute-force code that computes and examines ever day of the week for a given set of years. At the end it displays the number of years with $53$ appearances of each day of the week. It is written in R.

Here is its output for the $2001-2400$ cycle:

Friday    Monday  Saturday    Sunday  Thursday   Tuesday Wednesday
28        28        28        28        27        27        28


Here is the code itself.

leapyear <- function(y) {
(y %% 4 == 0 & !(y%% 100 == 0)) | (y %% 400 == 0)
}
leapyears <- seq(2001, length.out=400)
leapyears <- leapyears[leapyear(leapyears)]
results <- sapply(leapyears, function(y) {
table(weekdays(seq.Date(as.Date(paste0(y, "-01-01")), by="1 day", length.out=366)))
})
rowSums(results==53)

• To my mind, this shows exactly the sort of care that's required to make any sense of the question at all. Without a defined population and some random process of selecting years from it, it doesn't even make sense to talk about probability in relation to the number of Sundays in a year; I think the "2/7" (that the author of the question presumably wanted) is not readily defensible as an answer - as soon as you try,to make that work, all sorts of problems become apparent and one has to shoehorn in an artificial restriction on the considered period that's not in the question. Feb 20 '17 at 2:22

Yes, your reasoning is correct. In the long run, leap years are nearly equally likely to start on any day of the week. So the chance of the 2 extra days including a Sunday is about 2/7.

w huber points out that a quirk of the Gregorian Calendar causes the starting day of a leap year to be not quite uniformly distributed, so the true probability of 53 Sundays is 1% or so greater than 2/7. However 2/7 is almost certainly the answer that the authors of your statistics textbook intended you to find.

• To be correct, this answer requires some very specific assumptions: exactly what range of years do you have in mind? For most ranges, $2/7$ will not be the right answer.
– whuber
Feb 19 '17 at 14:48
• @w huber I have no doubt that 2/7 is the answer that was intended by the authors of the textbook that the question is from. The finessing in your answer is correct and interesting but, I would argue, doesn't help the OP learn basic statistics. Feb 19 '17 at 22:50
• I agree with most of that, especially with not helping to learn statistics--but that criticism should be leveled at the textbook, not at the solution to its exercise. What might be of especial interest here is to illustrate the process of analyzing a question--even a textbook question--and to show that sometimes the intuitively "obvious" answer is not quite correct. Surprises like this teach us much. Moreover, sometimes large consequences follow from tiny differences. (I'm working on a case now where a difference of this size changes a legal claim by a million dollars.)
– whuber
Feb 19 '17 at 23:29
• No criticism intended. Personally I'm happy with both the textbook question and with your excellent and unexpected solution. Feb 20 '17 at 3:22