An indicator random variable is a random variable associated with a probabilistic event.
Specifically, given an event $A$, the indicator random variable $I_A(x)$ is a function that returns
the value 1 if outcome$x$ belongs to $A$ and that returns the value 0 otherwise (i.e., if $x$ belongs to $A^{\textrm{c}}$.
Indicators can be viewed as just placeholders to make probabilistic calculations match our intuition,
especially those dealing with expected value taken over a number of events.
For example, we often have a collection of events $A_1, A_2, \ldots, A_m$, and we want to know the
expected number of events that will occur. For example, as noted in “Expected Number of Restriction Sites”,
if you place bets with respective chances of winning of 0.3, 0.8, and 0.6, then you should
expect to win 0.3 + 0.8 + 0.6 = 1.7 of your bets on average.
It is an exercise to verify that $\mathrm{E}(I_A) = \mathrm{Pr}(A)$ for any event $A$;
the additional fact that $\mathrm{E}(X + Y) = \mathrm{E}(X) + \mathrm{E}(Y)$ for any two
random variables $X$ and $Y$ allows us to conclude that the expected number of our events that will
occur is $\mathrm{E}(I_{A_1} + I_{A_2} + \cdots + I_{A_m})$, which reduces to
$\mathrm{Pr}(A_1) + \mathrm{Pr}(A_2) + \cdots + \mathrm{Pr}(A_m)$.