Probability of x successes in n trials of a binomial experiment
In Section 4.2 of the Larson text, we see that the probability of a certain number of successes, x, out of n trials in a binomial experiment is given as:
Formula: P(x) = nCx (p)x (q)n-x
To calculate P(x) you need to know two things :
1. how many combinations of outcomes would provide x number of successes, nCx.
2. the probability of a success in any given trial (p)
Calculating nCx
The nCx looks kind of forbidding, but it's really just notation representing combinations (thus the capital C in the middle).
.
: Permutations are very similar, and are represented by nPx. Permutations differ from combinations in that permutations consider the order of the outcomes, for example, finishing positions in a race.
Formula: nCx = n! / (n - x)! x!
To calculate a value for nCx you use the formula given on the top left of pg. 204 in the text, which is n! / (n - x)! x!
In other words, you calculate the factorial for n, and then divide that by the product of the factorials for n-x and x. This gives you the number of combinations, or the number of ways of getting x successes in n trials of a binomial.
Example
Let’s say you want to determine the probability of heads coming up exactly two times in four tosses of a fair coin. Since the coin is fair, meaning unbiased, we know there is an equal chance of either heads or tails coming up on any toss. Given that, the probability of heads coming up on any given toss, represented by p, is .5.
p = .5
q = 1 – p = .5
The number of trials, n, is equal to 4 and the number of successes, x, is equal to 2. To start the process, you first need to calculate the combinations, the number of ways of getting 2 successes in 4 trials, represented by nCx.
Step 1
Using the formula above, we can calculate that there are 6 ways of getting 2 heads in 4 tosses of a fair coin.
nCx = n! / (n-x)! x!
4C2 = 4! / 2! 2! = 24 / 4 = 6
Writing out the complete sample space, shown below, confirms that there are 6 ways of having 2 successes in 4 trials of a binomial experiment.
|
Step 2
To complete the calculation and determine the
of exactly 2 successes in 4 trials, you would multiply the combinations, 6, by the product of the probability of a success on a given trial, p, taken to the x power, by the probability of a failure, q, taken to the n-x power. The formula, as you’ve seen above, is given as:
P(x) = nCx (p)x (q)n-x
Substituting, we get:
P(2) = 4C2 (p)x (q)n-x = 6 (.5)2 (.5)2 = 6 (.25) (.25) = .375
The probability of getting exactly 2 heads during 4 tosses of a fair coin is .375.
Discussion
You may question, “if the p of heads is .5, why isn’t the P of 2 heads in 4 tosses equal to .5?” To answer that, look at the sample space, above. There, you can see that there are 16 possible outcomes given 4 trials of a binomial experiment. Six of those result in exactly 2 successes, in this case heads coming up. The proportion of outcomes with 2 heads is equal to 6 / 16, or .375, which confirms the results of the formula-based calculation above.
For practice, try this on a calculator that will figure binomials to confirm the values for nCx and for P(x). (Some calculators may represent combinations as nCr, and some references may show it as C(n,r), but it’s all the same thing.)
Factorials and Powers
The awkward part of this is the factorials (the product of all the integers from x to 1), because they can produce such large numbers. It's best to use some sort of technology to figure them, either a scientific calculator or an online tool. There is a link to an online factorial calculator below.
Zero Factorial
To calculate nCx for the case of zero successes, you will need a value for zero factorial, 0!. Zero factorial is defined as 1, so that part is easy enough, if not very intuitive. If you’d like to explore the rationale for that, there is a link to an online discussion here.
Power of Zero
Powers of numbers are easily figured on any scientific calculator, but in the case of zero successes, the value for p0 might, again, not be very intuitive. The rule is that any number taken to the zero power equals one. So, regardless of the value of p, p0 always equals 1. There is a link to an online discussion and a mathematical proof here.
Technology Tools
Technology tools can save you a good bit of number crunching, as long as you understand the basic rationale for the functions. They can range from handheld devices to software apps to online tools.
Online Calculators
Online calculators are very useful for a quick result, and for checking calculations. Links to several of them are posted on the RioLearn course homepage. Here are some that are directly relevant to this discussion:
Binomial Probability Distribution
Combinations Calculator
Factorial Calculator
StatCrunch
StatCrunch is an online resource available from within MathXL – access is included with your MathXL subscription. Links to tutorials on using StatCrunch are posted on the RioLearn course homepage. There is a YouTube video with a presentation on using StatCrunch to find binomial probabilities here.
Scientific Calculators
A handheld scientific calculator is often the best option, because you can use it during quizzes and exams and you can practice with it doing homework so you're already familiar with it. Most scientific calculators will do these calculations for you and can save a lot of frustration getting the numbers to come out right. The TI-84 is a popular model that will do these for you – links to tutorials are posted on the homepage. There are YouTube videos with presentations on using the Ti-84 to find binominal probabilities linked below:
Finding Binomial Probabilities Using the TI-84
Binomial Probabilities and the TI-84