I have an array that looks something like this:
$a = [0.01, 0.01, 0.50, 0.03, 0.20, 0.10, 0.15]$
This is just an example, but it shows that $sum(a) = 1$. Each number in the array represents the probability of choosing that item.
How do I calculate the probability of choosing the same item twice (or more generally, $n$ times in a row)? Choosing the first item ($0.01$) and the second item ($0.01$) counts as choosing two different items, i.e. only the index in the array matters.
(Sorry for any obvious mistakes, this is my first question here.)