I'm pretty confused on how this works. In my class my teacher states that:
Let $X$ be a random variable with $S_X = \{0,1\}$. $X$ follows a Bernoulli distribution if $P(X = x) = p^x(1-p)^{1-x}$ for some $p$ in $(0,1)$
Suppose a student randomly guesses on four multiple choice questions with five possible choices. Let $X_i = 1$ if the $i^{th}$ question is correctly answered. Let $Y = \sum_{i=1}^4 X_i$ , the number of correct guesses out of four.
By letting $p = 0.2$, the probability distribution of $Y$ follows:
$P(Y = 0) = 1 \times p^0 \times (1 - p)^4 = 0.4096$
.. etc
My question is, how is the formula above being used? Somehow, $p^x$ transforms into $p^0$ which makes sense, but then if $x = 0$ in this case, how does $1 - 0 = 4$?
$Y=0$ if and only if $X_1=X_2=X_3=X_4=0$. Since the four random variables are independent, the probability this happens is $$\Pr[X_1=0]\cdot\Pr[X_2=0]\cdot\Pr[X_3=0]\cdot\Pr[X_4=0]$$ which is equal to $$ (p^0(1-p)^{1-0})\cdot(p^0(1-p)^{1-0})\cdot(p^0(1-p)^{1-0})\cdot(p^0(1-p)^{1-0}) = p^0(1-p)^{4} $$