I have got 18 red , 12 green, 5 blue and 5 yellow balls in the bag.

What is the probability that I pick excatly 2 green when I pick 4 at random ?
What is the probabily that none are yellow after I pick 4 at random ?

Thanks.

number of ways to get exactly two green

= C(12,2) * (28,2)

prob(exactly two green) = C(12,2)*C(28,2) / C(40,4)
= ...

prob(non-yellow) = C(35,4)/C(40,4) =

To calculate the probability of picking exactly 2 green balls out of 4 at random, we need to determine the total number of possible outcomes and the number of favorable outcomes.

Total number of possible outcomes:
In this case, we are picking 4 balls at random from the bag, so the total number of possible outcomes is given by the combination formula: nCr = n! / (r!(n-r)!), where n is the total number of balls in the bag and r is the number of balls we are picking. So, the total number of possible outcomes is C(40, 4).

Number of favorable outcomes:
We want to pick exactly 2 green balls, so we need to consider the ways in which we can select those 2 green balls and the remaining 2 balls can be any color other than green.
The number of ways to select 2 green balls from 12 is C(12, 2).
The number of ways to select 2 balls from the remaining 33 non-green balls is C(33, 2).

So, the number of favorable outcomes is C(12, 2) * C(33, 2).

Now, we can calculate the probability by dividing the number of favorable outcomes by the total number of possible outcomes:

Probability of picking exactly 2 green balls = (C(12, 2) * C(33, 2)) / C(40, 4)

Similarly, to calculate the probability of none of the 4 balls being yellow, we need to determine the favorable outcomes and the total number of possible outcomes.

Number of favorable outcomes:
Since we want none of the 4 balls to be yellow, we need to select the 4 balls from the remaining colors (red, green, and blue). So, the number of favorable outcomes is C(35, 4).

Total number of possible outcomes:
As mentioned earlier, the total number of possible outcomes is C(40, 4).

Probability of none of the 4 balls being yellow = C(35, 4) / C(40, 4)

Now, you can substitute the values into the formulas to get the probabilities.