Counting
Theory
Theory 1
In many “games of chance,” it is assumed based on symmetry principles that all outcomes are equally likely. From this assumption we infer a rule for the probability measure .
In words: the probability of event is the number of outcomes in divided by the total number of possible outcomes.
When this formula applies, it is important to be able to count the total outcomes as well as the outcomes that satisfy various conditions.
Permutations
Permutations count the number of ordered lists one can form from a set of items. For a list of items taken from a total collection of items, the number of permutations is:
Why is this formula true?
There are choices for the first item. Then for the second item, after the first has been chosen and removed from the set of possibilities. Then for the third, then …, then for the item. So the total number of possibilities is the product:
We can express this with factorials using a technical observation:
Combinations
Combinations count the number of subsets (ignoring order) one can form from some items. For a subset of items taken from a total collection of items, the number of combinations is:
This formula can be derived from the formula for permutations.
The set of possible permutations can be partitioned into combinations: each combination determines a subset. By additionally specifying an ordering of the elements in a chosen subset, we obtain a permutation. For a given subset of elements taken from items, there are ways to determine an ordering of them in a list. Therefore, the number of permutations must be a factor of times the number of combinations. (For every combination of size , there are ways to order the items in a list.)
The notation is also called the binomial coefficient because it provides the coefficient values of a binomial expansion:
For example:
There are also higher combinations that give multinomial coefficients:
Multinomial coefficient
The general multinomial coefficient is defined by the formula:
where and .
The multinomial coefficient measures the number of ways to partition items into subsets with sizes , respectively.
Notice that , so we have already defined these values (i.e. with ) when we defined binomial coefficients. But when , the formula gives new values. They correspond to the coefficients in multinomial expansions. For example, gives the coefficients for .
Link to original
Illustration
Practice exercise
Counting teams with Cooper
A team of 3 student volunteers is formed at random from a class of 40. What is the probability that Cooper is on the team?
Link to originalSolution
There are teams that include Cooper, and teams in total. So we have:
Example - Counting VA license plates
Counting VA license plates
VA license plates have three letters (with no I, O, or Q) followed by four numerals. A random plate is seen on the road.
(a) What is the probability that the numerals occur in strictly increasing order?
(b) What is the probability that at least one number is repeated?
Solution
(a) Numerals in increasing order.
(1) Count total plates:
- Have options for letters.
- Have options for numbers.
Thus possible plates.
(2) Count ways to have 4 numerals that occur in increasing order:
There are ways to choose 4 distinct numerals from 10 options.
For each choice of four distinct numerals (i.e. for each combination), there is exactly one ordering that’s increasing.
Therefore, there are ways to have 4 numerals that occur in increasing order.
(3) Count ways to have a list of 3 letters (excluding I, O, Q).
There are 26 total letters, 3 are excluded, thus 23 options for each letter.
Repetition is allowed, thus we have total ways.
(3) Compute probability:
Total count of desired plates (taking the product of possibilities):
Let label the event that a plate has increasing numerals. The counting formula for probability is:
Evaluate using our data:
(b) At least one number repeated.
“At least” is hard to work with! Lots of ways that can happen.
Try the complement event, which is much simpler: “no repetition”
Let be event that no numbers are repeated. All are distinct. Then is our desired event.
Count the possibilities:
The total number of plates is still .
Therefore, license plates with at least one number repeated:
Desired outcomes over total outcomes:
Link to original
Example - Combinations: Groups with Haley and Hugo
Haley and Hugo from 2 groups of 3
A UVA class has 40 students. Suppose the professor chooses 3 students on Wednesday at random, and again 3 on Friday. What is the probability that Haley is chosen today and Hugo on Friday?
Solution
(1) Count total outcomes:
- We have possible groups chosen Wednesday.
- We have possible groups chosen Friday.
Therefore possible groups in total. (Product of possibilities.)
(2) Count desired outcomes:
The possible groups of 3 that include Haley can be counted by counting the subgroups of 2 formed of the other students in Haley’s group.
- Therefore we have groups that contain Haley.
- Similarly, we have groups that contain Hugo.
Therefore we count total desired outcomes.
(3) Compute probability:
Let label the desired event. By the counting rule:
Evaluate using our data:
Link to original
Counting out 4 teams
Counting out 4 teams
A board game requires 4 teams of players. How many configurations of teams are there out of a total of 17 players if the number of players per team is 4, 4, 4, 5, respectively.
Link to originalSolution
This is just the multinomial coefficient with this data:
17 4 4 4 5 So we have:
Repeated trials
Theory
Theory 1
Repeated trials
When a single experiment type is repeated many times, and we assume each instance is independent of the others, we say it is a sequence of repeated trials or independent trials.
The probability of any sequence of outcomes is derived using independence together with the probabilities of outcomes of each trial.
A simple type of trial, called a Bernoulli trial, has two possible outcomes, 1 and 0, or success and failure, or and . A sequence of repeated Bernoulli trials is called a Bernoulli process.
- Write sequences like for the outcomes of repeated trials of this type.
- Independence implies
- Write and , and because these are all outcomes (exclusive and exhaustive), we have . Then:
- This gives a formula for the probability of any sequence of these trials.
A more complex trial may have three outcomes, , , and .
- Write sequences like for the outcomes.
- Label and and . We must have .
- Independence implies
- This gives a formula for the probability of any sequence of these trials.
Let stand for the sum of successes in some Bernoulli process. So, for example, “” stands for the event that the number of successes is exactly 3. The probabilities of events follow a binomial distribution.
Suppose a coin is biased with , and is ‘success’. Flip the coin 20 times. Then:
Each outcome with exactly 3 heads and 17 tails has probability . The number of such outcomes is the number of ways to choose 3 of the flips to be heads out of the 20 total flips.
The probability of at least 18 heads would then be:
With three possible outcomes, , , and , we can write sum variables like which counts the number of outcomes, and and similarly. The probabilities of events like follow a multinomial distribution.
Link to original
Illustration
Example - Multinomial: Soft drinks preferred
Multinomial: Soft drinks preferred
Folks coming to a party prefer Coke (55%), Pepsi (25%), or Dew (20%). If 20 people order drinks in sequence, what is the probability that exactly 12 have Coke and 5 have Pepsi and 3 have Dew?
Solution
The multinomial coefficient gives the number of ways to assign 20 people into bins according to preferences matching the given numbers, and and .
Each such assignment is one sequence of outcomes. All such sequences have probability .
The answer is therefore:
Link to original
Hypergeometric
Problem
01
Link to originalHypergeometric distribution: male chickens
It is notoriously difficult to determine the sex of a chicken before it matures. Suppose that a randomly chosen chick from a pen of chicks is male with probability . Suppose you draw chicks from the pen. Do the odds that of them are male depend upon the value of ?
Reliability
Theory
Theory 1
Consider some process schematically with components in series and components in parallel:
- Each component has a probability of success or failure.
- Event indicates ‘success’ of that component (same name).
- Then is the probability of succeeding.
Success for a series of components requires success of each member.
- Series components rely on each other.
- Success of the whole is success of part 1 AND success of part 2 AND part 3, etc.
Failure for parallel components requires failure of each member.
- Parallel components represent redundancy.
- Success of the whole is success of part 1 OR success of part 2 OR part 3, etc.
For series components, stack successes:
For parallel components, stack failures:
E.g. if for all components , then:
- Series components:
- Parallel components:
To analyze a complex diagram of series and parallel components, bundle each:
- pure series set as a single compound component with its own success probability (the product)
- pure parallel set as a single compound component with its own success probability (using the failure formula)
This is like the analysis of resistors and inductors.
Link to original
Illustration
Example - Series, parallel, series
Reliability: Series, parallel, series
Suppose a process has internal components arranged like this:
Write for the event that component succeeds, and for the event that it fails.
The success probabilities for each component are given in the chart:
1 2 3 4 5 92% 89% 95% 86% 91% Find the probability that the entire system succeeds.
Solution
For intersections, use (independence) and for unions, use .
So and:
Link to original

