What is the difference and relationship between the binomial and Bernoulli distributions?
How should I understand the difference or relationship between binomial and Bernoulli distribution?
A Bernoulli random variable has two possible outcomes: $0$ or $1$. A binomial distribution is the sum of independent and identically distributed Bernoulli random variables.
So, for example, say I have a coin, and, when tossed, the probability it lands heads is $p$. So the probability that it lands tails is $1-p$ (there are no other possible outcomes for the coin toss). If the coin lands heads, you win one dollar. If the coin lands tails, you win nothing.
For a single coin toss, the probability you win one dollar is $p$. The random variable that represents your winnings after one coin toss is a Bernoulli random variable.
Now, if you toss the coin $5$ times, your winnings could be any whole number of dollars from zero dollars to five dollars, inclusive. The probability that you win five dollars is $p^5$, because each coin toss is independent of the others, and for each coin toss the probability of heads is $p$.
What is the probability that you win exactly three dollars in five tosses? That would require you to toss the coin five times, getting exactly three heads and two tails. This can be achieved with probability $\binom{5}{3} p^3 (1-p)^2$. And, in general, if there are $n$ Bernoulli trials, then the sum of those trials is binomially distributed with parameters $n$ and $p$.
Note that a binomial random variable with parameter $n = 1$ is equivalent to a Bernoulli random variable, i.e. there is only one trial.
All Bernoulli distributions are binomial distributions, but most binomial distributions are not Bernoulli distributions.
If $$ X=\begin{cases} 1 & \text{with probability }p, \\ 0 & \text{with probability }1-p, \end{cases} $$ then the probability distribution of the random variable $X$ is a Bernoulli distribution.
If $X=X_1+\cdots+X_n$ and each of $X_1,\ldots,X_n$ has a Bernoulli distribution with the same value of $p$ and they are independent, then $X$ has a binomial distribution, and the possible values of $X$ are $\{0,1,2,3,\ldots,n\}$. If $n=1$ then that binomial distribution is a Bernoulli distribution.
A Bernoulli distribution is a special case of binomial distribution. Specifically, when $n=1$ the binomial distribution becomes Bernoulli distribution.
A Bernoulli random variable $X$ is a random variable that satisfies $P(X=1)=p$, $P(X=0)=1-p$. A canonical example is a coin flip which has $p=1/2$. In fact, you can think of a Bernoulli random variable is just a weighted coin, which comes up $1$ with some probability and $0$ otherwise. A binomial random variable with parameters $n,p$ is what you get when you count the number of $1$'s (successes) that come up in a string of $n$ independent Bernoulli random variables, each with parameter $p$. Another way to say this is that a binomial random variable is the sum of independent and identically distributed Bernoulli random variables.