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

Recommended Textbook for

The Database Factory Active Database For Enterprise Computing

Authors: Schur, Stephen

1st Edition

0471558443, 9780471558446

More Books

Students also viewed these Databases questions

Question

2. Discuss various aspects of the training design process.

Answered: 1 week ago