I'll assume there's no replacement. The answer in the first case is 2/7.
Total number of ways to select 4 rocks out of 7 (regardless of color) is 7 choose 4, or 7!/4!(7-4)! = 35.
Now the number of ways to successfully choose exactly 2 black and 2 blue is 5 choose 2 times 2 choose 2, or:
(5!/2!(5-2)!)*(2!/2!(2-2)!) = 10*1 = 10.
Since the probability is number of possible successes / total possibilities, we have: 10/35 = 2/7.
Similarly, the answer for the second case is 15/70, or 3/14.
Thanks for the response....I understand the answer, but the equation is still a miss to me.
Big picture: I am working an excel file and need to write a script that allows me to figure this out (always picking 4 stones and needed 2 black and 2 blue) The number of overall stones change, but there are always only 2 black ones. The are blue.
If you had to write teh same equation knowing there are always 2 black stones and represent total number of stones as "X" lets say....how would that look?
If these assumptions always hold, you can essentially forget about one of the combination terms in the numerator, since it will reduce to 1. The denominator will be X choose 4, and the simplified numerator will be (X-2) choose 2.
After combining like terms, and simplifying, you get: