Re: Q20
These are some fine points here. We have to use with exact meaning of terms, using them loosely can create misunderstandings.
At a first reading I thought that Haowen's answer was not correct, and also ilya's remark was not correct too. On a second reading, Haowen's answer is correct, but I am not sure that it answers the initial question, since the initial question/remark by ilya was ambiguous. Let me explain.
When we talk about independency we can talk about it in probability terms, where we have specific rules on random variables being independent, or we can talk about it in more loose/everyday terms when we want to express that something affects something else.
Ilya's question is expressed loosely. It talks about independence of Probabilities not random events. It can be taken with several different meanings.
1) If you are really asking whether X=1 and h=f are independent events, then we can clearly say they are not. The choice of h clearly affects the probability of X=1. More specifically, the choice of h is the probability of X=1.
2) If you are asking whether the distribution of h=f affects P(X=1) for all possible h, (which can be taken as the more literal interpretation of what you are asking) then again: yes there is a connection and Haowen gives you the formula.
3) If you are asking in general "should we care about calculating the value for P(X=1)", then Haowen gives you the answer again.
4) If you are asking whether the event X=1 affects the probability of h=f, it depends whether you are really referring to the apriori or the aposteriori. It does not affect the apriori and it does affect the aposteriori (and Q20 asks how).
