The binomial random variable
A binomial random variable counts the number of successes in n independent trials of a binomial experiment.
The possible values are x = 0, 1, 2, ..., n, so the variable is discrete.
Binomial formula
For a binomial experiment, the probability of exactly x successes in n trials is
\[
\begin{aligned}
P(x) &= {}_{n}C_{x}\,p^{x}\,q^{\,n-x}
\end{aligned}
\]
Where:
\[
\begin{aligned}
n &:\ \text{total number of trials} \\
p &:\ \text{probability of success} \\
q &= 1-p:\ \text{probability of failure} \\
x &:\ \text{number of successes in } n \text{ trials} \\
n-x &:\ \text{number of failures in } n \text{ trials}
\end{aligned}
\]
The value of {}_nC_x gives the number of ways to obtain x successes in n trials.
It can be computed using combinations:
\[
\begin{aligned}
{}_{n}C_{x} &= \frac{n!}{x!\,(n-x)!}
\end{aligned}
\]
Tree diagram idea
When n is small, a tree diagram can list all outcomes. Along a path, probabilities are multiplied (independent trials),
and probabilities of mutually exclusive outcomes are added.
Probability distribution and bar graph
The binomial probability distribution lists P(x) for every possible value x = 0..n.
A bar graph is a visual display of the same distribution.