# Binomial Distribution

## Understanding the Basics of Binomial Distribution

When it comes to calculating the probability of obtaining a specific number of successes in a fixed number of trials, we turn to the binomial distribution. This statistical tool is used for situations where there are only two possible outcomes - success or failure. Let's dive into the key points of this distribution and how it can be applied.

## Solving Binomial Distribution

The binomial distribution can be modeled using the formula P(X = r) = nCr * p^r * (1 - p)^(n-r) if the following criteria are met: there is a predetermined number of trials (n), only two possible outcomes (success and failure), the probability of success (p) remains constant, and the trials are independent of each other. Here, nCr is the combination formula that represents the number of ways to choose r successes from n trials.

## The Probability Mass Function

The probability mass function for the random variable X in a binomial distribution can be represented as P(X=r) = nCr * p^r * (1 - p)^(n-r). From this formula, we can understand that the factorials (e.g. n!) represent the number of ways to choose r successes from n trials. The index (n) and parameter (p) come together to define the distribution.

## Example of Binomial Distribution

To better understand how binomial distribution works, let's consider an example. Assume that the probability of a randomly selected person liking butterscotch ice cream is 0.3. If we survey 100 people and ask them about their ice cream preference, we can use the binomial distribution to model the results. Let's visualize this distribution by graphing X ~ B(100, 0.3).

<