Conditional probability computation

26 Views Asked by At

I am having a hard time understanding something that supposedly should be very simple. I have a random variable $X$, taking values in the set of integers $\{0,1,\ldots,11\}$ and is uniformly distributed in this set. I also have a function $f(X)$ that given a realization of $X$, $x$ gives in output the binary representation of $x$ if $0\leq x \leq 7$ of $x-8$ otherwise.

Then it says that "clearly" $$ P(x:f(x)=y| |y|=3)= \frac{1/12}{8/12} = 1/8$$

Of course, the $P(|y|=3)= 8/12$ as it corresponds to the probability of $x\in\{0,1,\ldots,7\}$. But the numerator confuses me: why is $P(i:f(x)=y \land|y|=3)$ still $1/12$?

Thank you for any suggestion you will provide me.