What is the probability that at least 2 students in a class of 36 have the same birthday

$\begingroup$

If there are 85 students in a statistics class and we assume that there are 365 days in a year, what is the probability that at least two students in the class have the same birthday?

I tried solving it by taking into account the fact that it will be extremely difficult to solve for the probability of at least having the same birthday and started off by solving it in the complement fashion, where P(at least two people having the same birthday) = 1 - P(every person's birthday is unique), but have been trying to the possible numerator/denominator for this problem.

Henry

145k9 gold badges115 silver badges232 bronze badges

asked May 4, 2013 at 4:41

$\endgroup$

0

$\begingroup$

Hint: your approach is a good one. What is the chance if there are only two people? Three?

answered May 4, 2013 at 4:46

What is the probability that at least 2 students in a class of 36 have the same birthday

Ross MillikanRoss Millikan

365k27 gold badges246 silver badges434 bronze badges

$\endgroup$

2

$\begingroup$

You can read all about this famous problem here to learn how to calculate the probability that at least two of $n$ people share a birthday. In your case at least two of $85$ people will share a birthday with a probability of approximately $99.998\%$.

answered May 4, 2013 at 5:45

JaredJared

30.6k10 gold badges56 silver badges136 bronze badges

$\endgroup$

1

$\begingroup$

Here is a simulation written in python. It may help you to analyse the problem and understand it.

    import random 
    
    def birthdayMatched(members):
        numYearDa
        ys = 365 # Number of days
        s = range(numYearDays)
        matched = False
        membersList=[None] * members
    
        for i in range(members):
            membersList[i] = random.choice(s)
        if len(set(membersList)) < members :
            matched = True
            
        return matched 
    
    
    def sim_birthdayMatched(numTrials):
        numMatches = 0
        numPeopleInParty = 23
        for i in range(numTrials):
            if birthdayMatched(numPeopleInParty):
                numMatches += 1
        return numMatches/numTrials

Call: The function takes the number of people as an input

sim_birthdayMatched(10000)

Output:

0.5077

What is the probability that at least 2 students in a class of 36 have the same birthday

answered Jan 4, 2017 at 8:21

AmjadAmjad

111 bronze badge

$\endgroup$

1

Today’s problem goes out to a special new member of the family. Welcome to the world my niece, Edison Grace Berry! My brother’s beautiful baby girl was born on his 36th birthday this past Saturday and of course this coincidence made me think of the Birthday Problem.

So here it is: a special math problem for a special little girl. Someday you’ll know all the math to understand this post (trust me, I’ll make sure of it!).

→ For more math tutorials, check out Math Hacks on YouTube!

The Birthday Problem in Real Life

The first time I heard this problem, I was sitting in a 300 level Mathematical Statistics course in a small university in the pacific northwest. It was a class of about 30 students and the professor bet that at least two of us shared the same birthday.

He then proceeded to have everyone state their birthday. When it came to my turn I stated my birthdate as “two cubed, three cubed,” which made the class laugh as our cerebral professor took awhile to decipher the date.

Anyway like he predicted before he got to the last student a pair of matching birthdays had been found.

So how lucky was it that he found a matching pair?

Warm-Up

Assumption: for the sake of simplicity we’ll ignore the possibility of being born on Feb. 29th.

Let’s begin with a simple example to warm up our brains:

What is the probability that two people share the same birthday?

Person A can be born on any day of the year since they’re the first person we’re asking. The probability of being born any day of the year is 1 or more specifically: 365/365.

Since Person B must be born on the same day as Person A their probability is 1/365.

We want both of these events to happen so multiply the probabilities:

The probability that any randomly chosen 2 people share the same birthdate.

So you have a 0.27% chance of walking up to a stranger and discovering that their birthday is the same day as yours. That’s pretty slim.

But what about a larger group?

What’s the chance that at least 2 out of 4 people share the same birthday?

Well to solve this problem we’d have to calculate all ofthe following:

  • Probability A and B share the same birthday
  • Probability A and C share the same birthday
  • Probability A and D share the same birthday
  • Probability B and C share the same birthday
  • Probability B and D share the same birthday
  • Probability C and D share the same birthday
  • Probability A, B and C share the same birthday
  • Probability B, C and D share the same birthday
  • Probability A, C and D share the same birthday
  • Probability A, B and D share the same birthday
  • Probability A, B, C and D all share the same birthday

Yuck, that’s a lot of calculations! Imagine how many probabilities we’d have to calculate for a classroom of 30 students!

There’s gotta be a better way…

A Better Way: the Trick of the Complement

The simplest way of getting around calculating a bajillion probabilities is to look at the problem from a different angle:

What’s the probability that no one shares the same birthday?

This alternate exercise is helpful because it is the complete opposite of our original problem (i.e. the complement). In probability, we know that the total of all the possible outcomes (i.e. the sample space) is always equal to 1, or 100% chance.

Since the probability of at least 2 people having the same birthday and the probability of no one having the same birthday cover all possible scenarios, we know that the sum of their probabilities is 1.

Or equivalently:

Using the complement to solve our problem

Yay! That’ll be much easier to calculate.

The Calculation

Awesome! We’re finally ready to find out how safe a bet the professor made.

Let’s work out the probability that no one shares the same birthday out of a room of 30 people.

Let’s take this step by step:

  • The first student can be born on any day, so we’ll give him a probability of 365/365.
  • The next student is now limited to 364 possible days, so the second student’s probability is 364/365.
  • The third student may be born on any of the remaining 363 days, so 363/365.

This pattern continues so that our last student has a probability of 336/365 (365 – 29 days since the students before her used up 29 potential days).

Again multiply all 30 probabilities together:

probabilities 361/365 to 338/365 not shown

Hold up! That’s a little messy. Let’s clean this up.

Since the denominator is thirty 365’s multiplied together, we could rewrite it as:

Let’s use factorials (symbolically: !) to further clean this calculation up.

(Remember factorials are handy for multiplying together descending positive integers. For example 5! equals 5•4•3•2•1 = 120.)

Using factorials, 365! would equal the product of all descending integers from 365 down to 1. We only want the product of the integers from 365 to 336, so we’ll divide out the extraneous numbers by dividing 365! by 335!.

Note: if this confuses you try a smaller value like 5!/3! = 5•4•3•2•1 / 3•2•1. Notice how the 3•2•1 are in both the numerator and denominator. They ‘cancel out’ making 5!/3! = 5•4.

Putting it all together we now have an expression that can be easily entered on a scientific calculator:

the simplified form of the 30 probabilities product from above

This computes to 0.294 or 29.4% chance no one in the class has the same birthday. Of course, we want the complement so we’ll subtract it from 1 to find the probability that at least 2 people in a group of 30 share the same day of birth.

The probability at least 2 people in 30 share the same birthday

Turns out it was a pretty safe bet for our professor! He had a nearly 71% chance that 2 or more of us would share a birthday.

A Fifty-Fifty Chance

Many people are surprised to find that if you repeat this calculation with a group of 23 people you’ll still have a 50% chance that at least two people were born on the same day.

That’s a relatively small group of people considering that there are 365 possible birthdays! Meaning that in any group of more than 23 people it is likely that at least 2 people share the same day of birth.

What a crazy little factoid!

❤ STAY CONNECTED ❤

Stay up-to-date with everything Math Hacks is up to!

Instagram | Facebook | Twitter

What is the probability of 2 people having the same birthday?

This means that any two people have a 364/365, or 99.726027 percent, chance of not matching birthdays.

What is the probability that in a class of 35 students at least two have the same birthday note Use 1 year 365 days?

Answer and Explanation: Therefore, there is a 81.44% chance that at least two people have the same birthday.

What is the probability that at least 2 people have the same birthday in a group of 20 people?

If there are 366 or more people, but only 365 possible birthdays disregarding leap year, then two or more of them must share a birthday. ... Probability of Shared Birthdays. or, How to Win Money in Bar Bets..

What is the probability that at least 2 students have the same birthday?

In a room of just 23 people there's a 50-50 chance of at least two people having the same birthday. In a room of 75 there's a 99.9% chance of at least two people matching.