Bloomberg LP Interview Question
Financial Software DevelopersIf you pick 3 balls, these are your possible combos:
YYY
BBB
RRR
RRB
RRY
BBR
BBY
YYB
YYR
YBR
Total ten combinations. Since picking one ball does not affect the probabilities,
all this combos have the same probability: 1/10
vadimrok, you've missed (RBY) and many others.
Overall, there are 27 possible combinations - 3^3.
First case: only one of them (RRR) is suitable - 1/27
Second case: six are suitable - 6/27, which is also 2/9.
To anonymous: it's 27 possible permutations, not combinations.
To lol: You need all the permutations to calculate the probability, but since the second question didn't specify the ordering, you need to take every combination of red, yellow and blue (there are 6) to determine how many of the 27 ways they could have been selected.
first one is 1/27
second one 6/27
there are in total 3^3 ways in which 3 balls can be picked up...
in second case we have 1 of each and different ways we coudl have picked it up is 3!
and hence it is 6/27 which first is obvious there is only a singel way we could have picked up 3 red balls
don't argue with me anymore: 1/27 and 2/9
suppose N red N blue and N yellow. then the first case:
p=(N 3)/(3N 3)=N(N-1)(N-2)/3N(3N-1)(3N-2), because N is large enough, do the lim operation, then it's 1/27
similarly, the second case: p = (N 1)*(N 1)*(N 1)/(3N 3)
= N^3/(3N*(3N-1)*(3N-2)/6)
limp= 6/27=2/9
never do analysis, math illustrates everything! How are you sure your analysis is correct, men?
a) 1/3 * 1/3 * 1/3 <- prob of picking a red ball each time is 1/3
- Anonymous November 10, 2009b) 1 * 2/3 * 1/3 <-- first time it doesnt matter what you pick, second time, it should be one of the other colors which u hadnt picked first time. similarly 3rd time.