Question

In: Math

This is an extension of the Birthday Problem. Suppose you have 500 Facebook friends. Make the...

This is an extension of the Birthday Problem. Suppose you have 500 Facebook friends. Make the same assumptions here as in the Birthday Problem.

a) Write a program in R to estimate the probability that, on at least 1 day during the year, Facebooks tells you three (or more) of your friends shat that birthday. Based on your answer, should you be surprised by this occurrence?

b) Write a program in R to estimate the probability that, on at least 1 day during the year, Facebook tells you five (or more) of your friends share that birthday. Based on your answer, should you be surprised by the occurrence? [Hint: Generate 500 birthdays with replacement, then determine whether any birthday occurs three or more times (five or more for part (b)). The table function in R may prove useful.]

Solutions

Expert Solution

It is given in the hint that for both the part of two questions first we have to generate 500 birthdays.Then we have to see the frequency table that how many birthdays occur 3 or more times(for part a) and how many are 5 or more(for part b).

The solution can be done in three consecutive steps for both part 'a' and 'b' problem. Firstly, In the R code we first use the in build function "sample()" in R-script for SRSWR (simple random sampling with replacement) of 500 distinct birthdays from 365 days. Then we use the "table()" in r two find the required frequency number and "which()" to find the required number of counts. Finally, we calculate the probability estimate empirically (favourable no. of counts/ 365) to evaluate the required answer. The R code is given below....

R Code:

#Generate 500 birthdays with replacement from 1:365 days(in a year) with replacement
y=sample(1:365, 500, replace = TRUE, prob = NULL)

#consider the frequency counts of the sample
z=as.numeric(table(y))

# Calculate the estimate of probability(count/Total number=365)

100*length(which(z>=3))/365 # part a probability estimate (17% approx in my sample)
100*length(which(z>=5))/365 # part b probability estimate (0.55 % approx in my sample)


Related Solutions

Suppose that the average number of Facebook friends users have is normally distributed with a mean...
Suppose that the average number of Facebook friends users have is normally distributed with a mean of 144 and a standard deviation of about 52. Assume fourteen individuals are randomly chosen. Answer the following questions. Round all answers to 4 decimal places where possible. For the group of 14, find the probability that the average number of friends is less than 145. Find the first quartile for the average number of Facebook friends. For part b), is the assumption that...
Suppose that the average number of Facebook friends users have is normally distributed with a mean...
Suppose that the average number of Facebook friends users have is normally distributed with a mean of 119 and a standard deviation of about 41. Assume forty-five individuals are randomly chosen. Answer the following questions. Round all answers to 4 decimal places where possible. What is the distribution of ¯xx¯? ¯xx¯ ~ N(,) For the group of 45, find the probability that the average number of friends is more than 114. Find the third quartile for the average number of...
Suppose that the average number of Facebook friends users have is normally distributed with a mean...
Suppose that the average number of Facebook friends users have is normally distributed with a mean of 117 and a standard deviation of about 58. Assume forty-two individuals are randomly chosen. Answer the following questions. Round all answers to 4 decimal places where possible. What is the distribution of ¯xx¯? ¯xx¯ ~ N(,) For the group of 42, find the probability that the average number of friends is less than 104. Find the first quartile for the average number of...
Suppose that the average number of Facebook friends users have is normally distributed with a mean...
Suppose that the average number of Facebook friends users have is normally distributed with a mean of 131 and a standard deviation of about 49. Assume seven individuals are randomly chosen. Answer the following questions. Round all answers to 4 decimal places where possible. What is the distribution of ¯xx¯? ¯xx¯ ~ N(,) For the group of 7, find the probability that the average number of friends is less than 150. Find the first quartile for the average number of...
Suppose that the average number of Facebook friends users have is normally distributed with a mean...
Suppose that the average number of Facebook friends users have is normally distributed with a mean of 121 and a standard deviation of about 40. Assume forty-five individuals are randomly chosen. Answer the following questions. Round all answers to 4 decimal places where possible. What is the distribution of x? x ~ N(___,____) For the group of 45, find the probability that the average number of friends is less than 115. _____ Find the first quartile for the average number...
Suppose that the average number of Facebook friends users have is normally distributed with a mean...
Suppose that the average number of Facebook friends users have is normally distributed with a mean of 117 and a standard deviation of about 45. Assume forty-seven individuals are randomly chosen. Answer the following questions. Round all answers to 4 decimal places where possible. What is the distribution of ¯ x x¯ ? ¯ x x¯ ~ N(,) For the group of 47, find the probability that the average number of friends is more than 121. Find the third quartile...
State the number of friends (or connections) that you have on Facebook (or Linkedin). In case...
State the number of friends (or connections) that you have on Facebook (or Linkedin). In case you have more than 365 friends or connections, think of an alternative, smaller group of friends or relatives. What is the chance that there are at least 2 people among your friends (or connections) with the same birthday (same day, not same year)? Let's find out. Please respond with an estimate of the probability that this will happen. This estimate can be intuitive or...
Let’s consider a retirement planning problem. Suppose you just have had your 55th birthday and you...
Let’s consider a retirement planning problem. Suppose you just have had your 55th birthday and you plan to retire in five years. As far as your retirement goal is concerned, all you want is to maintain your living standard at the same level as when you start your retirement. You expect to “stick around” until 90 and you plan to leave nothing to “no one”. Therefore, your “sole” concern is maintaining your living standard during your retirement years. Your current...
Prove "The Birthday Problem" in this regard, Suppose there are some number of people in a...
Prove "The Birthday Problem" in this regard, Suppose there are some number of people in a room and we need need to consider all possible pairwise combinations of those people to compare their birthdays and look for matches.Prove the probability of the matches.
Do you or friends of your use the social networking site Facebook? Do you know businesses...
Do you or friends of your use the social networking site Facebook? Do you know businesses that use Facebook? How does an entrepreneur make all of our lives better? • The term IPO, or initial public offering, was also mentioned in the story. What would be a good reason to offer stock of Facebook to the public? What are the disadvantages to Facebook's CEO, Mark Zuckerberg, to offering shares of Facebook to the public?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT