# Calculate the probability of a simple event

I'm beginning to study probability and an exercise in the study guide that asks me to calculate: What is the probability that the month January, of one year randomly selected have only four Sundays?

the solution of the book indicates that it's 4 / 7 which is equal to 0.5714 probability that the event occurs, according to what I learned in class the probability of this event can be calculated by counting probability as it is possible to have all elements of the sample space, and all the elements that belong to threw the probability of which is to be calculated.

P (A) = number of cases occurring A / number of cases in the sample space


My question is why the sample space of this experiment is 7 and what is the maximum number of Sundays in January that may have (I think by intuition that can be 5)

This formula applies when it is possible to have all elements of the sample space, and all items pertaining to the event whose probability is to be calculated

The year can begin on any one of the seven days of the week, and each of the seven is equally likely. (Actually, this isn’t quite true, but you have to look very closely at the Gregorian calendar to see that it isn’t, and the deviation from equal likelihood is very small indeed.) Thus, the probability that 1 January falls on a Sunday is $1/7$, the probability that it falls on a Monday is $1/7$, and so on. Suppose that 1 January falls on a Sunday. Then the Sundays in January fall on 1 January, 8 January, 15 January, 22 January, and 29 January, so there are five of them. What happens if 1 January is a Saturday? Then the Sundays fall on 2, 9, 16, 23, and 30 January, and there are again five of them. Similarly, if 1 January falls on a Friday, the Sundays fall on 3, 10, 17, 24, and 31 January, and once more there are five of them. I’ll leave you to check for yourself, using the same kind of analysis, that if 1 January falls on a Thursday, Wednesday, Tuesday, or Monday, there are just four Sundays in the month. Thus, in four of the seven equally likely cases January has four Sundays, and the probability of its having four Sundays is therefore $4/7$. (And as you can see, the maximum possible number of Sundays in January is indeed five.)
Added: If I’ve not miscounted, in the course of the $400$-year Gregorian cycle the first of the year falls $56$ times each on Monday and Saturday, $57$ times each on Wednesday and Thursday, and $58$ times each on Sunday, Tuesday, and Friday. The exact probability of getting just four Sundays in January is therefore $\frac{56+58+57+57}{400} = \frac{228}{400} = 0.57$, slightly less than $4/7$.