Question
by using python ; How many people do we need to have in a room to make it a favorable bet (probability of success greater
by using python ; How many people do we need to have in a room to make it a favorable bet (probability of success greater than 1/2) that at least two people in the room will have the same birthday? Ignore leap year and assume that the probability of birthday falling on any of 365 days is equal. To answer the above question, please write a Python function "same_bday_prob(i)" in the cell below. The function takes an integer greater than 1 as input and returns the probability that at least two people have the same birthday.
from math import factorial
from numpy import prod combin = lambda n, r : factorial(n)//factorial(r)//factorial(n-r)
def same_bday_prob(i):
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started