Binomial probability formula The binomial probability formula goes like this, $$ f\left(x\mid p\right) = p^{x_i}\left(1-p\right)^{1-x_i} $$ But I wonder why the success probability and failure probability are multiplied? Can somebody explain this for me, please?
Thank you in advance.
 A: I think you mean the bernoulli distribution otherwise the binomial distribution is $\binom{n}{x}p^x(1-p)^{n-x}$ The idea though is the same. In a bernoulli distribution you have a random variable that takes the values $1$ if you have success (you can think that it is head at a coin) and $0$ if you fail (tails at a coin). When you have succes then the probability of this event is $p$ and $1-p$ if you fail. For example if you throw a coin 6 times and 2 times came head then the probability is $p^2$ (2 successes) $\times$ $(1-p)^4$ (4 failures)
The formula you give $$f(x|p)=p^{x_i}(1-p)^{1-x_i}$$ is just a closed form of the probability distribution of the bernoulli distribution that is mostly confusing. The random variable $X$ can in that case two values $0$ and $1$. So for $x_i=0$ the above formula becomes $$f(x|p)=p^0(1-p)^{1-0}=(1-p)$$ which is the probability of failure (as it should) and for $x_i=1$ the formula becomes $$f(x|p)=p^1(1-p)^{1-1}=p$$ which is the probability of success (as it should). So, practically $$f(x|p)=p^{x_i}(1-p)^{1-x_i}=\begin{cases}p, & \text{if } x=0 \\ 1-p, & \text{if } x=1 \end{cases}$$ As you see that formula works for both cases and it serves only to avoid the function in brackets. Admitedly it is confusing instead of clarifying, but as you in practice you do not multiply the two probabilities since depending on the value of $x$ either the probability of success or the probability of failure has zero in the exponent and vanishes. 
