# Simple problem involving permutations

Hi, here's the question, I just need someone to confirm that I'm doing it right (been a while since my last stat class):

Let's say I have 30 balls all of different colors. I want to know in how many different ways I can align 5 balls picked at random (thus ordering matters). Note that one must be blue, one red and one yellow.

So let's start with the blue one. I have 5 different ways to arrange it (either place it first in line, or second, or third etc.). Then let's say I'm looking a the red one: I have 4 ways left to arrange it. Finally I have 3 slots left for the yellow one. Now for the remaining 2 balls, I still have 27 balls to choose from.

Would the answer be 5*4*3*(27 Permute 2)?

Thanks.

Related Set Theory, Logic, Probability, Statistics News on Phys.org
chiro
Hey erogard.

That looks right to me.

Also if you want to test things like this, what I recommend you do is simulate the stochastic process in a computer package like R and then look at the probability of the event happening over say 10,000 or 100,000 iterations (which is quick with modern day computers).

This is always a good way for you to independently verify your own work.

How many balls are blue, red, and yellow within the 30 balls?