A die is rolled $n$ times. The probability for getting "6" is $p$. Use exclusion inclusion principle and find what is the probability getting at least one time "6".
First I expect the result to be $1-(1-p)^n$ since this event is the complement of we didn't get "6" which its probability is $(1-p)^n$. I defined $A_i$ to be the event of "getting $i$ times 6". Then I tried using the principle: $$P\Bigl(\bigcup_{i=1}^n A_i\Bigr)=p(1-p)^{n-1}+\dots+p^n-\sum_{j>i} (A_j\cap A_i)+\dots+(-1)^{n-1}P\Bigl(\bigcap A_i\Bigr).$$ The events $A_i,A_j$ are independent so $A_i\cap A_j=A_i$. So it seems that some elements are off. How can I develop it to get desired result?
Let $A_i$ be event “we got 6 on i-th roll”.
$P(\bigcup_{i = 1}^n A_i) = \sum_{k = 1}^n (-1)^{k - 1} \sum_{I ⊆ n, |I| = k} P(\bigcap_{i ∈ I} A_i) = \sum_{k = 1}^n (-1)^{k - 1} {n \choose k} p^k = 1 - (1 - p)^n$.
First equality is inclusion and exclusion. $P(\bigcap_{i ∈ I} A_i) = p^{|I|}$. Last equality is binomial theorem.