The probability of rolling a  in $n$ rolls Apologies in advance for the lack of technical language.
I have some distribution for the probability of observing the random variable, $X$, with some value. I want to know how to compute the probability of observing a combination of values of $X$ lying within certain intervals. Hopefully my image below can help explain:

In the image above, we have 5 trials (represented by green and purple lines). Before the experiment started, we designated which intervals will be 'success' intervals... the rest will be 'failure' intervals. We obtained 3 values of $X$ that lay within these intervals, but also 2 values of $X$ that lay outside these intervals. Obviously, as you increase the number of trials, you increase the likelihood that you get a match for all three intervals.
I want to know how to compute the probability of getting a match in some designated intervals, given I know the p.d.f. and the number of trials I am allowed to carry out.
Similar to $$P_1(x,y) = 1 - \big(1 - \frac1x\big)^y$$ in the case of 

What is the probability of rolling a $2$ (for example) in $y$ rolls?

You don't need to necessarily 'give me the answer', but I would just as much appreciate to be directed to the resource that would teach me how to do such a thing. (Sorry, I am a math noob!)
Thank you so much!
 A: If the trials are independent, I think this becomes more of a combinatorics problem than a probability one.
Let the probability of falling in the $i$-th range for $i\in\{1,2,3\}$ be $p_i$ and let $p_0 = 1-\sum_{1\leqslant i \leqslant 3} p_i$ be the probability that a trial fails.
Let an outcome be a sequence of $n$ trials, and observe that with regard to the result of each trial, order matters.
Each outcome corresponds to a solution of the equation
$$x_0 + x_1 + x_2 + x_3 = n,\tag{1}$$
where the $x_i$ are non-negative integer.
Here, the $x_i$ represents how many trials fell into each range.
By stars and bars, the number of solutions to this equation is $\binom{n+3}{3}$.
Of course, different outcomes may correspond to the same solution (remember that order matters.
For each solution to the equation, there are
$$a(x_0,x_1,x_2,x_3) = \binom{n}{x_0,x_1,x_2,x_3}$$
different outcomes that correspond to it.
Hence, the probability that an outcome corresponds to a particular solution of our equation is $a(x_0,x_1,x_2,x_3)p_0^{x_0}p_1^{x_1}p_2^{x_2}p_3^{x_3}$.

Now, we are interested only in outcomes for which each range $i=1,2,3$ contains at least on trial.
We of course must have $n\geqslant 3$.
These outcomes correspond to solutions of equation $(1)$, except now we require that $x_1,x_2,x_3\geqslant 1$.
Equivalently, they correspond to solutions of $y_0 + y_1 + y_2 + y_3 = n-3$, where each $y_i$ is a non-negative integer.
The number of solutions to this equation is $\binom{n}{3}$.
Of course, different outcomes (order matters) may correspond to the same solution.
For each solution to the equation, there are
$$b(y_0,y_1,y_2,y_3) = \binom{n}{y_0,y_1+1,y_2+1,y_3+1}$$
different outcomes that correspond to it. Hence, the probability that an outcome corresponds to a particular solution of our equation is $b(y_0,y_1,y_2,y_3)p_0^{y_0}p_1^{y_1+1}p_2^{y_2+1}p_3^{y_3+1}$.
It follows that the probability that an outcome corresponds to some solution of our equation is
$$p_1p_2p_3\sum_{y_0+y_1+y_2+y_3 = n - 3}b(y_0,y_1,y_2,y_3)p_0^{y_0}p_1^{y_1}p_2^{y_2}p_3^{y_3}. \tag{2}$$
You can open this up into nested sums conditioning on the value of each variable, but it's a bit of an ugly process.

Another way to approach this would be perhaps with generating functions.
Consider the symbolic product
$$(p_0+p_1+p_2+p_3)^n,\tag{3}$$
(do not simplify it to $1^n$) and think of it as an ordered product.
An outcome in this context can be thought of as choosing one of the $p_i$ in each factor, where choosing $p_i$ in the $j$-th factor corresponds to the $j$-th trial falling in the $i$-th range.
In the expanded product $(3)$, each monomial $c\cdot p_0^{x_0}p_1^{x_1}p_2^{x_2}p_3^{x_3}$ encodes how many trials fell into each range.
Notice of course that we must necessarily have $x_0 + x_1 + x_2 + x_3 = n$.
In other words, each monomial corresponds to a solution of $(1)$.
Moreover and perhaps unsurprisingly, the coefficient $c$ of each such monomial is precisely $a(x_0,x_1,x_2,x_3)$, see multinomial theorem.
Each coefficient counts the number of different ways (order matters!) we could have chosen the $p_i$ to end up in that monomial.
Now, all that's left is to discard the monomials where $p_1$, $p_2$ or $p_3$ are missing: these correspond to outcomes where at least one of these ranges contain no trials.
At this point, plugging in the actual values of $p_i$ into the resulting expression $($which will be precisely $(2))$ will yield the numerical value of the probability sought.
