# Discrete math probability function rolling 12 sided die

Given a 12 sided fair die write down a probability function that gives the probability of rolling x '7's from 20 rolls.

I'm not really sure where to start on this. But I know there are 12^20 total possibilities and that each time you roll the die there is a one in 12 chance of getting a 7. If I did (1/12)^20 that would give me the probability of rolling 20 7s in a row. But how do I include 7s that aren't rolled in a row?

Any ideas would be appreciated very much!

In a rudimentary manner, favorable ways $=\dbinom{20}{x}\cdot 1^x\cdot 11^{20-x}$, against $12^{20}$ total ways,
$P(X = x) = \dbinom{20}{x}\cdot\left(\dfrac{1}{12}\right)^x\cdot\left(\dfrac{11}{12}\right)^{20-x}$
The answer is $\binom{20}{x}12^{-20}$ since any dice pattern is equally likely and all you need is to count the number of possible patterns of x 7's out of 20 and divide by the total number of possibilities.