Epic Systems Interview Question
1) Is Combination(9,9) = 9C9 ?
2) A = 9C9 * (1/365) power 9.
Why do you multiply both ?
And why do you power to 9 ( 8, 7 in other cases) ?
3) When you compute A + B + C, what exactly are you computing ?
This is the birthday paradox problem.
In probability theory, birthday paradox pertains to the probability that in a set of randomly chosen people some pair of them will have the same birthday. In a group of at least 23 randomly chosen people, there is more than 50% probability that some pair of them will have the same birthday. Such a result is counter-intuitive to many.
For 57 or more people, the probability is more than 99%,
Thus for a group of 57 we can hope to find a pair of people to have the same birthdays.
As oa said above
let's say # of people with same birthday = B then
B x 1 > (9 - B) x 2 => B > 6. So we need to find at least 7 people that has the same birthday with you to profit.
It is highly unlikely that you find 7 people with the same birthday out of 10. No fool would take the bet. :):):)
Another approach that does not directly use birthday as probability. As earlier posts has ve correctly mentioned that atleast 7 people should have same b'day date to get profit.
No. of persons with same B'day 0 1 2 3 4 5 6 7 8 9
Profit -18 -15 -12 -9 -6 -3 0 +3 +6 +9
From above, favourable cases = 4 ( from 6 to 9, as 0 does not harm)
Total cases = 9
Probability of no loss = 4/9 < 50%
Hence asnwer is NO.
No, I prefer NOT.
10 person with same birthday with me :
There is 7 day in one week.
Probability in day "A" one person born is 1/7 = 0.14 (rounded).
Since its 10 people, the chance in day A for a person to born is 1.4 person.
This is only math after all. Its also a big chance the all people born in day "B, C, D, E, F, or G" without A at all, which means o n l y m e.
I got $1 for small chance someone born in same day (1.4 person out of 10)
My friend got $2 for BIG chance someone born in different day (8.6 person out of 10).
Maximum I could receive : 1.4 person = rounded to 1 person = $1 by math.
Maximum I could lost : 9 person = $18.
With a little luck:
When 7 people same birthday with me, I will win $7.
But my friend win $6 by only he is winning from 'different day of 3 person'.
(I am win 7 times and he win only 3 times but the money we got very close).
Even 6 people same birthday with me, I will only win $6.
And my friend win $8 from 4 different people.
(Its not fair at all)
But if I could force my lifetime luck maybe I could get $10 when all people born on day 'A'. It just a matter of luck, who knows.
But I will say "no, thanks. But I will say yes if we reverse" :)
It doesn't say they have to prove their birthday. I'd give them each a note that stated:
"My birthday is XX/XX/XXXX. I'll pay you a quarter to say the same when asked."
The 8 other guests would earn me $8.00. I'd lose $2.00 due to the likelihood my friend won't have my birthday, and pay the other guests $2.00 for their cooperation. The paper's to ensure my friend isn't aware of my plan and doesn't make them a similar offer.
I'd make $4.00 in the end.
If they heard the scenario being presented, I may need to bump it up to $0.50 for each instead to make it a 50/50 split so they didn't think I was being cheap and possibly not play along. I'd still profit.
WOW. You all are thinking to much. I feel sorry for all of you who spent so much time trying to figure this out with math. This question is subjective and even a child would know the answer. It is YES, because its my Birthday party and I only invited people with the same Birthday as me! Even my friend has the same birthday as me.
I'd accept the deal assuming that every person in the party won't have the birthday date as I do. All I have to do, is make sure half of the people in the party "pretend" to have the same birthday party as me and I can split the money with the people who helped pretend, but hey I still get $1.50, so that's worth it.
Of course not but it would be helpful to explain why it is not. So let's see when we would profit from this wager:
- oa October 08, 2009# of people with same birthday x $1 > # of people with different birthday x $2
let's say # of people with same birthday = B then
B x 1 > (9 - B) x 2 => B > 6. So we need to find at least 7 people that has the same birthday with you to profit.
So we need to sum the probability of:
A) all 9 people having the same birthday +
B) any 8 out of 9 people having the same birthday +
C) any 7 out of 9 people having the same birthday
Picking N number of M people is Combination(M, N) where M > N. Any people to have same birthday with you is 1 / 365 hence any people to have different birthday is 1 - (1 / 365) = 364 / 365. So:
A = Combination(9, 9) x (1 / 365) ^ 9
B = Combination(9, 8) x (1 / 365) ^ 8 x (364 / 365)
C = Combination(9, 7) x (1 / 365) ^ 7 x (364 / 365) ^ 2
A + B + C = 4.15114 / 10^17 which is very unlikely.