I am studying this answer, by user kjetil b halvorsen, on likelihood functions. He says the following:
We model $n$ independent Bernoulli experiments, leading to data $X_1, \dots, X_n$, each with a Bernoulli distribution with (probability) parameter $p$. This leads to the likelihood function $$ \prod_{i=1}^n p^{x_i} (1-p)^{1-x_i} $$
How does one come to the conclusion that the likelihood function is
$$ \prod_{i=1}^n p^{x_i} (1-p)^{1-x_i}? $$
I would greatly appreciate it if people would please take the time to explain this.