To get X heads in a sequence of N tosses, several things have to happen. If the probability of a head on a single trial is p and the probability of a tail is q=(1-p), then each sequence with X heads and N-X tails has a probability calculated by finding the product of multiplying p times itself X times (p^X), and q times itself (N-X) times (q^(N-X)), that is (p^X q^(N-X)). However, there are many sequences which match this description. By the methods of combinatorics, we can find that there are N!/(X!*(N-X)!) different combinations with X heads and N-X tails. So, the probability of X heads in N trials is
X (N-X) N! p q --------- X!* (N-X)!
The binomial distribution density function provides the probability that X success will occur in N trials of a binomial experiment.
A binomial experiment has the following properties.
One common example of a binomial experiment is a sequence of N tosses of a coin.
Here:
To find the binomial distribution function of X successes in N trials, denoted f(X), we let p denote the probability of success on any one trial. Then the probability of failure on any one trial is q=1-p. Then the probability of any particular sequence of X success (heads) out of N trials (tosses) is p^X*q^(N-X). But, there are a variety of sequences of tosses that will result in X successes out of N trials. Then, using the formula for the number of ways of obtaining X successes out of N trials, we find that the number of ways of picking X objects out of N objects that there are
Then the probability of N successes out of N trials is given by the FunctioN?:
F(X)= (N) * p^X*q^(N-X) = (N) * p^X*(1-p)^(N-X) (X) (X)
For example, consider the experiment of tossing a die with the usual 6 sides. Suppose we want to know the probability of getting three "1"s in 5 tosses. Then p=1/5. So q=4/5.
Then, using the binomial probability function for 3 successes out of 5 trials we get the probability of this occurring as: