Assignment 6 part 1A

Assignment 6 part 1A

by Edgardo Torres -
Number of replies: 3

Hello, 

I am confused about the last sentence in section A of part 1: 

"The birthdays from February 29 will be ignored.  The birth counts for the remaining 365 days will then be used to determine the actual probability of being born on a given day.  These probabilities will be used to modify the probabilities used by the sample function, and the birthdays of n people will then be sampled using these actual probabilities.  This vector birthdays will then be returned by the function."

Could someone rephrase what this part is asking?

In reply to Edgardo Torres

Re: Assignment 6 part 1A

by Kyla Lee -
I think in the first sample.n function the probability of having a birthday on any day of the 365 days is equal, but in reality, it's not, like it's explained in the Birthday Problem link. So when we ignore Feb 29, the probability of being born on that day becomes 0, shifting the probabilities of being born on the rest of the 364 days.... this is how I understood it.
In reply to Kyla Lee

Re: Assignment 6 part 1A

by Yu Zhe Li -
My understanding is that during a leap year theres 366 days and not 365 days, the question wants you filter out thr 366th day i.e february.29th so when you sample from 1:365 you can put in 365 different probabilities of this occuring.
In reply to Edgardo Torres

Re: Assignment 6 part 1A

by Erik Spence -
Rather than sample the possible birthdays with equal probability, we'd like to consider the case of sampling with non-equal probability. It turns out that, in reality, people are not born on all days of the year with equal probability. So read the data from the file, and use the data to determine the actual probabilities of being on a given day, in reality, but ignore February 29.