For this problem, we’ll calculate the probabilty of getting all 4 numbers after rolling a 4-sided die 7 times.

STEP 1
The set of numbers on the die (1 through 4), would be called called “n” and the number of trials or attempts is called “r” which in this case is 7 rolls.
Calculating the value of “n” raised to the power of “r”:

47
which equals
16,384
This number represents all the possible results from rolling a 4 sided die

In steps 2, 3, 4 and 5, we will determine how many of those 47 rolls, will contain all 4 numbers.

STEP 2
We first must calculate each value of “n” raised to the power of “r”.
Rather than explain, this is much easier to show:

47 = 16,384
37 = 2,187
27 = 128
17 = 1
STEP 3
Next, we calculate how many combinations can be made from “n” objects for each value of “n”.
This is much easier to show than explain:

4 C 4 = 1
3 C 4 = 4
2 C 4 = 6
1 C 4 = 4

Basically, this is saying that

4 objects can be chosen from a set of 7 in 1 ways
3 objects can be chosen from a set of 7 in 4 ways
2 objects can be chosen from a set of 7 in 6 ways
1 object can be chosen from a set of 7 in 4 ways
STEP 4
We then calculate the product of the first number of STEP 2 times the first number of STEP 3 and do so throughout all 4 numbers.

  16,384     ×   1     = 16,384
2,187   ×   6     = 8,748
128   × 15   = 768
1   × 20   = 4
STEP 5
Then, alternating from plus to minus, we sum the 4 terms we just calculated.

+ 16,384
– 8,748
+ 768
-4
Total: 8,400

which equals the total number of ways you can roll a 4 sided die 7 times and have all 4 numbers appear.

STEP 6
So, if we take the number 8,400 and divide it by
16,384 (all posiible results of 7 rolls of a 4 sided die)
we get the probability of having all 4 numbers appearing after 7 rolls.

8,400 ÷ 16,384 = 0.5126953125

So, if you had a 4 sided die, you would need to roll it at least 7 times in order to have a better than 50 / 50 chance of rolling all 4 numbers.

Click here to see the probabilities of a:

6 Sided Die
8 Sided Die
12 Sided Die
20 Sided Die