We have seen that the probability that at least two people in a group of 23 people share the same birthday is approximately 0.5. In this question we are interested in the probability that at least three people in a group of 23 people share the same birthday. Draw 23 numbers independently from the integers {1, 2, . . . , 365} with each number equally likely to be drawn. Let E be the event that at least one of the integers 1, 2, . . . , 365 appears three or more times among the 23 drawn numbers. Simulate this process 10000 times in MATLAB to give an estimate of the probability that the event E occurs. Submit your estimate together with the MATLAB code you used to get this estimate. [2] (You may find the functions randi, tabulate and mean in MATLAB helpful.)
FROM GIVEN DATA:
%Matlab code for finding probability of 3 people among
23 people sharing
%same birthday
clear all
close all
%finding random numbers between 1 and 365
a=1;
b=365;
count=0;
%total number of drawns 10000 times
for i=1:10000
A = randi([a b],1,23);
%checking if atleast one of the
integers appears three or more times
B = unique(A); % which will give you the unique
elements of A in array B
Ncount = histc(A, B); %
tf=sum(Ncount>=3);
if tf>=1
count=count+1;
end
end
probability= (count/10000);
fprintf('Hence the probability at least three people sharing same birthday among 23 people is %f.\n',probability)
%%%%%%%%%%%%%% End of Code %%%%%%%%%%%%%%%%%%
We have seen that the probability that at least two people in a group of 23...
Let ?? be the probability that in a group of ? people, at least two share the same birthday. Assume there are 365 days in a year, and that all birthdays are equally likely. a) What is the probability that in a group of 2, 3, 4, or 5 people, at least two have the same birthday? ?2=? ?3=? ?4=? ?5=?
The R command sample (1:365,23, replace=T) > simulates birthdays from a group of 23 people. The expression 2 %int table (sample (1:365, 23, replace=T)) can be used to simulate the birthday problem. It creates a frequency table showing how many people have each birthday, and then determines if two is in that table; that is, whether two or more people have the same birthday. Use and suitably modify the expression for the following problems (a) Simulate the probability that two...
We proved in class that in a group of 23 people, the probability of two people having the same birthday is 0.5073. Also, in a group of 100 people, the probability of two people having the same birthday is 0.9999998. On late-night television’s The Tonight Show with Johnny Carson (on air during 1962-1992), Carson was discussing the birthday problem. At a certain point, he remarked to his audience of approximately 100 people “Great! There must be someone here who was...
5.36. (a) In a group of 23 strangers, what is the probability that at least two of bout if there are 40 strangers? In a group them have the same birthday? How a of 200 strangers, what is the probability that one of them has the same birthday as your birthday? (Hint. See the discussion in Sect. 5.4.1.) (b) Suppose that there are N days in a year (where N could be any number) and that there are n people....
A group of thirty-six people is selected at random. what is the probability that at least two of them will have the same birthday? round to four decimals
What is the probability that exactly two people and I in a group of 180 people in total have birthdays on three consecutive days? Assume the following 1. 365 days in the year (no leap year) 2. Only one person has a birthday on each of those three days Include a leading zero and five digits to the right of the decimal place. Your answer should be of the form 0.12345. Use standard rounding: 0.123454 rounds to 0.12345 and 0.123455...
1. The birthday of six random people has been checked. Find the probability that (a) At least one of them is born in September. (b) All five are born in the Spring. Spring here means one of the month March, April, or May. (c) At least two of them are born in the same month. In this problem you can assume that a year is 365 days. 2.A fair die is rolled three times. We say that a match has...
What is the probability that at least two students in our class share the same birthday? Assuming that: Birthdays follow a uniform distribution. We have 35 students in our class! No one was born in a leap year. There are 365 days in a year!
in python The birthday paradox says that the probability that two people in a room will have the same birthday is more than half, provided n, the number of people in the room, is more than 23. This property is not really a paradox, but many people find it surprising. Design a Python program that can test this paradox by a series of experiments on randomly generated birthdays, which test this paradox for n = 5, 6, 7, ..., 50....
-11 points BBUnderStat12 1.2.016. O Ask Your T Suppose there are 30 people at a party. Do you think any two share the same birthday? Let's use the random-number table to simulate the birthdays of the 30 people at the party Ignoring leap year, let's assume that the year has 365 days. Number the days, with 1 representing January 1, 2 representing January 2, and so forth, with 365 representing December 31. Draw a random sample of 30 days (with...