Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What entry strategy do you think would work best for this company?

Answered: 1 week ago

Question

2. Discuss various aspects of the training design process.

Answered: 1 week ago