Where did this probability expression come from?

39 Views Asked by At

I saw the following steps written where $H$ is a discrete random variable that can take on values $\in \{0,1\}$ and $Q$ is a continuous random variable drawn from the uniform distribution $[0, 1]$:

$$ P(H=1 \ \cap \ Q \leq q) $$ Now imagine $$ P(H=1 \ \cap \ Q \leq q | Q = v ) \ \ \text{where }v\in [0, q] $$ Then we can write the following: $$ P(H = 1 \ \cap \ Q \leq q ) = \int_0^p P(H=1 \ \cap \ Q \leq q | Q = v) f(v) dv \\ $$ and we know $$ P(H = 1 \ \cap \ Q \leq q | Q = v) = P(H = 1 | Q = v) $$

Are these steps correct? If so, the logic is not clear to me. I do not understand how the expressions in the last 2 lines are valid. The first expression with the integral came from the law of total probability for a continuous variable, Q, however, why are we able to condition it over $Q=v$? For the last expression, how are we able to remove the $\cap \ Q\leq q$? from the LHS?