There are 5 floors and 7 people in one elevator.
What is the probablity of 3 people getting out on the first floor?
The solution is:
$$\frac{\binom 73\cdot 4^4}{5^7}$$
The part that I don't understand is $5^7$. The numerator is clear to me, I choose 3 people out of 7 and don't care about where the rest go, but I don't understand why $5^7$ is the number of all possibilities. Could someone explain this?
$r^n$ counts the ways $n$ independent choices from $r$ options can be made.
So, the probability for: a selection of three people to make a choice from one option, and four people to each make a choice from four other options, when seven people each make a choice from five options, will be: $$\dbinom 73 \dfrac{4^4}{5^7} = \dfrac{7!}{\lower{0.4ex}{3!~4!}}\dfrac{1^3~4^4}{5^7}$$