Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Solve using MatLab Problem 6. The Birthday Problem. If there are a group of n people in a room, what is the probability that two

Solve using MatLab

image text in transcribed

Problem 6. The Birthday Problem. If there are a group of n people in a room, what is the probability that two or more of them have the same birthday [month and day only, ignore the year]. It is possible to determine the answer to this question by simulation. Write a function that calculates the probability that two or more of n people will have the same birthday, where n is the calling argument. [HINT: To do this, the function should create an array of size n and generate n birthdays in the range 1 to 365 randomly. It should then check to see if any of the n birthdays are identical. The function should perform this experiment at least 5000 times and calculate the fraction of those times in which two or more people had the same birthday.] Then, write a test program [calling program] that calculates and prints out [using a user defined function] the probability that 2 or more of n people witll have the same birthday for n-2, 3, 4, 40. LastName FirstName_P6_xxxxx Notes: the xxxx can be whatever you want

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_2

Step: 3

blur-text-image_3

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

Database Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

Students also viewed these Databases questions

Question

4 How can you create a better online image for yourself?

Answered: 1 week ago