I'm reading explanation of a theorem, and there's one step that I can't understand. I know it should be simple enough, but I just can't think of the reasoning atm.
The step says,
According to Marginalization, $\Pr[a] = E_X[\Pr[\ a|X\ ]\ ]$
Why is this true? What is the meaning of Marginalization? Also, I know expected values of a random variable, but what does it mean to have an expected value of a probability $(\Pr[a|X])$?
The way I would consider it is, instead of the random event $a$, to consider the indicator random variable $I_a$ which takes the value $1$ when $a$ occurs and $0$ when it does not. For example $$E[I_a]=\Pr(a).$$
The law of total expectation gives $$E[I_a] = E_X[\,E[I_a|X ]\, ]$$ which corresponds to the result you state.