Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Python Coding. Picture is included to clear all confusion. Techniques used will be object - oriented programming, structured programming, top - down coding. Produce

Using Python Coding. Picture is included to clear all confusion.
Techniques used will be object-oriented programming, structured programming, top-down coding.
Produce tested code that executes correctly and consistently.
Include comments and explanations of the structures used in the program (e.g. Repetition, Decision, Lists etc.) inside the program.
Debug program issues before submitting.
Be ready to explain ANY of the code you have used.
***
What is the probability in a room of n people,
that at least two people will have the same birthday?
Probability works such that:
Probability (something happens)+Probability (somethingdoesn' t happen)=1, or 100%
It turns out that finding the probability of no matching birthdays is much easier to
determine than some possible matching birthdays.
For each person starting with n=1, calculate (365n+1BIRTHRAX PROBLEM
What is the probability in a room of "n" people,
that at least two people will have the same birthday?
Probability works such that:
Probability (something happens)+Probability(somethingdoesn't happen)=1, or 100%
It turns out that finding the probability of no matching birthdays is much easier to
determine than some possible matching birthdays.
For each person starting with n=1, calculate 365-n+1365, then multiply the
result to the next person to calculate no one in a room having the same birthday.
Probability (no matching birthdays )=365365364365363365dots365-n+1365,
n=1,2,3,dots,n
where there is a term for each of the "n" people.
Your task, is to write a program to calculate the probability that at least two
people DO share a birthday in the class right now. If your teacher has not already,
please remind them to write the number of people in the room right now.
In addition to submitting your code,
please also return this sheet with your answers written below.
"In this room of
people, the probability of
at least two people sharing
the same birthday is: %
For a 50% probability, the minimum
number of people needed is:/365)
,
then multiply the
result to the next person to calculate no one in a room having the same birthday.
Probability (nomatching birthdays)=365
365
\times 364
365
\times 363
365
\times ...365n+1
365
,
where there is a term for each of the n people.
Your task, is to write a program to calculate the probability that at least two
people DO share a birthday in the class right now. If your teacher has not already,
please remind them to write the number of people in the room right now.
In addition to submitting your code,
please also return this sheet with your answers written below.
In this room of ____
people, the probability of
at least two people sharing
the same birthday is: ____%
For a 50% probability, the minimum
number of people needed is: ____
n =123... n
#People; Probability
n: 1; Prob: 0.0%
n: 2; Prob: 0.27%
n: 3; Prob: 0.82%
n: 4; Prob: 1.64%
n: 5; Prob: 2.71%
n: 6; Prob: 4.05%
n: 7; Prob: 5.62%
n: 8; Prob: 7.43%
n: 9; Prob: 9.46%
n: 10; Prob: 11.69%
n: 11; Prob: 14.11%
n: 12; Prob: 16.7%
n: 13; Prob: 19.44%
n: 14; Prob: 22.31%
n: 15; Prob: 25.29%
n: 16; Prob: 28.36%
n: 17; Prob: 31.5%
n: 18; Prob: 34.69%
n: 19; Prob: 37.91%
n: 20; Prob: 41.14%
n: 21; Prob: 44.37%
n: 22; Prob: 47.57%
n: 23; Prob: 50.73%
n: 24; Prob: 53.83%
n: 25; Prob: 56.87%
n: 26; Prob: 59.82%
n: 27; Prob: 62.69%
n: 28; Prob: 65.45%
n: 29; Prob: 68.1%
n: 30; Prob: 70.63%
n: 31; Prob: 73.05%
n: 32; Prob: 75.33%
n: 33; Prob: 77.5%
n: 34; Prob: 79.53%
n: 35; Prob: 81.44%
n: 36; Prob: 83.22%
n: 37; Prob: 84.87%
n: 38; Prob: 86.41%
n: 39; Prob: 87.82%
n: 40; Prob: 89.12%
n: 41; Prob: 90.32%
n: 42; Prob: 91.4%
image text in transcribed

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

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

4th Edition

0805360476, 978-0805360479

More Books

Students also viewed these Databases questions