Achievable logoAchievable logo
FE Civil
Sign in
Sign up
Purchase
Textbook
Practice exams
Support
How it works
Exam catalog
Mountain with a flag at the peak
Textbook
Introduction
1. Mathematics
2. Combinatorics, probability and statistics
2.1 Combinatorics and probability
2.2 Statistics
3. Engineering economics
4. Statics
5. Materials
6. Dynamics
7. Mechanics of materials
8. Fluid mechanics
9. Soil mechanics
10. Structural engineering
11. Concrete structure design
12. Water resources engineering
13. Environmental engineering
14. Transportation engineering
15. Surveying, construction, ethics and professional practice
16. Wrapping up
(change me)
Achievable logoAchievable logo
2.1 Combinatorics and probability
Achievable FE Civil
2. Combinatorics, probability and statistics
Our FE Civil course is currently in development and is a work-in-progress.

Combinatorics and probability

6 min read
Font
Discuss
Share
Feedback

This chapter covers the following:

  • Permutations
  • Combinations
  • Key differences
  • Special cases
  • Probability
  • Law of total probability
  • Law of compound or joint probability
  • Bayes’ theorem

In mathematics, permutations and combinations are counting methods. You use them to figure out how many ways you can arrange or select items.

Permutations

Permutations count the number of ways to arrange objects when order matters.

Formula for permutations (without repetition):

Use this when you’re arranging r items chosen from n distinct items, with no repeats:

P(n,r)=(n−r)!n!​

Where:

  • n! (“n factorial”) means n×(n−1)×⋯×1
  • r is the number of items you arrange

Example:

How many ways can you arrange 3 letters from the word “MATH”?

  • Number of distinct letters: n=4 (M, A, T, H)
  • Number of letters to arrange: r=3

P(4,3)=(4−3)!4!​=124​=24

So, there are 24 ways to arrange 3 letters out of 4.

Combinations

Combinations count the number of ways to select objects when order doesn’t matter.

Formula for combinations:

Use this when you’re choosing r items from n distinct items and the order of the chosen items is irrelevant:

C(n,r)=(rn​)=r!(n−r)!n!​

Example:

How many ways can you choose 3 students from a group of 5?

  • n=5
  • r=3

C(5,3)=3!(5−3)!5!​=6×2120​=12120​=10

So, there are 10 ways to choose 3 students from 5.

Key differences

Aspect Permutations Combinations
Order matters? Yes No
Formula (n−r)!n!​ r!(n−r)!n!​
Example Arranging medals Choosing committee members

Special cases

Permutations with repetition

Use this when each of the r positions can be filled by any of the n items (so repeats are allowed):

nr

Example: 4-digit PIN code using digits 0-9:

  • n=10 possible digits
  • r=4 positions

104=10,000 possible codes

Permutations with identical items

If some objects are indistinguishable, swapping those identical objects doesn’t create a new arrangement. That reduces the number of distinct permutations.

The number of different permutations of n objects, where:

  • n1​ are of type 1
  • n2​ are of type 2
  • …
  • nk​ are of type k
  • and ∑i=1k​ni​=n

Then the number of distinct permutations is:

n1​!⋅n2​!⋯nk​!n!​

Example:

How many distinct ways can you arrange the letters in the word BALLOON?

Letters: B, A, L, L, O, O, N

  • n=7
  • L appears 2 times
  • O appears 2 times

So,

2!⋅2!7!​=45040​=1260

Combinations with repetition

Use this when selections can repeat and order doesn’t matter.

For r selections from n types:

C(n+r−1,r)=(rn+r−1​)

Example: Ways to choose 3 scoops of ice cream from 5 flavors (allowing repeats):

(35+3−1​)=(37​)=35

Probability

Definition: Probability measures how likely an event is to occur.

Let S be the sample space (all possible outcomes) and A an event (a set of outcomes). The probability of event A, written P(A), is:

P(A)=Total number of possible outcomesNumber of favorable outcomes​

Example: If a fair die is rolled, what is the probability of getting a 4?

P(4)=61​

Law of total probability

If events B1​,B2​,...,Bn​ are mutually exclusive and exhaustive (meaning they partition the sample space), then any event A can be found by adding up the ways A can happen through each case Bi​:

P(A)=i=1∑n​P(A∣Bi​)P(Bi​)

Example:

Suppose a factory has two machines:

  • Machine 1 produces 60% of the items and has a defect rate of 1%.
  • Machine 2 produces 40% of the items and has a defect rate of 2%.

What is the probability that a randomly selected item is defective?

Let:

  • B1​: item from Machine 1, P(B1​)=0.6
  • B2​: item from Machine 2, P(B2​)=0.4
  • A: item is defective

Then,

P(A)=P(A∣B1​)P(B1​)+P(A∣B2​)P(B2​)=(0.01)(0.6)+(0.02)(0.4)=0.006+0.008=0.014

So, the probability of a defective item is 0.014 or 1.4%.

Law of compound or joint probability

The joint probability of two events A and B occurring together is:

P(A∩B)=P(A∣B)⋅P(B)=P(B∣A)⋅P(A)

This formula connects:

  • a conditional probability (like P(A∣B))
  • the probability of the condition (like P(B))
  • the probability of both events happening (like P(A∩B))

Example:

Suppose:

  • P(B)=0.5
  • P(A∣B)=0.3

Then:

P(A∩B)=0.3×0.5=0.15

Bayes’ theorem

Bayes’ theorem lets you reverse a conditional probability. In other words, it helps you find P(A∣B) when you know P(B∣A).

Given events A and B with P(B)>0:

P(A∣B)=P(B)P(B∣A)⋅P(A)​

Using the Law of Total Probability in the denominator:

P(Ai​∣B)=∑j=1n​P(B∣Aj​)⋅P(Aj​)P(B∣Ai​)⋅P(Ai​)​

Example (continued from previous):

What is the probability that a defective item came from Machine 2?

We already know:

  • P(A)=0.014
  • P(B2​)=0.4
  • P(A∣B2​)=0.02

Now apply Bayes’ Theorem:

P(B2​∣A)=P(A)P(A∣B2​)⋅P(B2​)​=0.0140.02⋅0.4​=0.0140.008​≈0.5714

So, about 57.14% of defective items come from Machine 2.

Permutations

  • Arrangements where order matters
  • Formula: P(n,r)=(n−r)!n!​
  • Example: Arranging 3 out of 4 letters yields 24 ways

Combinations

  • Selections where order does not matter
  • Formula: C(n,r)=r!(n−r)!n!​
  • Example: Choosing 3 out of 5 students yields 10 ways

Key differences

  • Permutations: order matters; combinations: order doesn’t matter
  • Different formulas for each
  • Typical examples: medals (permutations), committees (combinations)

Special cases

  • Permutations with repetition: nr
    • Example: 4-digit PIN from 10 digits = 10,000 codes
  • Permutations with identical items: n1​!⋅n2​!⋯nk​!n!​
    • Example: BALLOON = 1,260 arrangements
  • Combinations with repetition: C(n+r−1,r)
    • Example: 3 scoops from 5 flavors = 35 ways

Probability

  • Probability = favorable outcomes / total outcomes
  • P(A)=Total number of possible outcomesNumber of favorable outcomes​
  • Example: P(4) on die = 1/6

Law of total probability

  • For mutually exclusive, exhaustive events Bi​:
    • P(A)=∑i=1n​P(A∣Bi​)P(Bi​)
  • Used to find overall probability via cases

Law of compound or joint probability

  • P(A∩B)=P(A∣B)⋅P(B)
  • Connects conditional and joint probabilities

Bayes’ theorem

  • Reverses conditional probability: P(A∣B)=P(B)P(B∣A)P(A)​
  • Extended form uses total probability in denominator
  • Used to update beliefs given new evidence

Sign up for free to take 5 quiz questions on this topic

Previous
Next  | 2.2 Statistics
All rights reserved ©2016 - 2026 Achievable, Inc.

Combinatorics and probability

This chapter covers the following:

  • Permutations
  • Combinations
  • Key differences
  • Special cases
  • Probability
  • Law of total probability
  • Law of compound or joint probability
  • Bayes’ theorem

In mathematics, permutations and combinations are counting methods. You use them to figure out how many ways you can arrange or select items.

Permutations

Permutations count the number of ways to arrange objects when order matters.

Formula for permutations (without repetition):

Use this when you’re arranging r items chosen from n distinct items, with no repeats:

P(n,r)=(n−r)!n!​

Where:

  • n! (“n factorial”) means n×(n−1)×⋯×1
  • r is the number of items you arrange

Example:

How many ways can you arrange 3 letters from the word “MATH”?

  • Number of distinct letters: n=4 (M, A, T, H)
  • Number of letters to arrange: r=3

P(4,3)=(4−3)!4!​=124​=24

So, there are 24 ways to arrange 3 letters out of 4.

Combinations

Combinations count the number of ways to select objects when order doesn’t matter.

Formula for combinations:

Use this when you’re choosing r items from n distinct items and the order of the chosen items is irrelevant:

C(n,r)=(rn​)=r!(n−r)!n!​

Example:

How many ways can you choose 3 students from a group of 5?

  • n=5
  • r=3

C(5,3)=3!(5−3)!5!​=6×2120​=12120​=10

So, there are 10 ways to choose 3 students from 5.

Key differences

Aspect Permutations Combinations
Order matters? Yes No
Formula (n−r)!n!​ r!(n−r)!n!​
Example Arranging medals Choosing committee members

Special cases

Permutations with repetition

Use this when each of the r positions can be filled by any of the n items (so repeats are allowed):

nr

Example: 4-digit PIN code using digits 0-9:

  • n=10 possible digits
  • r=4 positions

104=10,000 possible codes

Permutations with identical items

If some objects are indistinguishable, swapping those identical objects doesn’t create a new arrangement. That reduces the number of distinct permutations.

The number of different permutations of n objects, where:

  • n1​ are of type 1
  • n2​ are of type 2
  • …
  • nk​ are of type k
  • and ∑i=1k​ni​=n

Then the number of distinct permutations is:

n1​!⋅n2​!⋯nk​!n!​

Example:

How many distinct ways can you arrange the letters in the word BALLOON?

Letters: B, A, L, L, O, O, N

  • n=7
  • L appears 2 times
  • O appears 2 times

So,

2!⋅2!7!​=45040​=1260

Combinations with repetition

Use this when selections can repeat and order doesn’t matter.

For r selections from n types:

C(n+r−1,r)=(rn+r−1​)

Example: Ways to choose 3 scoops of ice cream from 5 flavors (allowing repeats):

(35+3−1​)=(37​)=35

Probability

Definition: Probability measures how likely an event is to occur.

Let S be the sample space (all possible outcomes) and A an event (a set of outcomes). The probability of event A, written P(A), is:

P(A)=Total number of possible outcomesNumber of favorable outcomes​

Example: If a fair die is rolled, what is the probability of getting a 4?

P(4)=61​

Law of total probability

If events B1​,B2​,...,Bn​ are mutually exclusive and exhaustive (meaning they partition the sample space), then any event A can be found by adding up the ways A can happen through each case Bi​:

P(A)=i=1∑n​P(A∣Bi​)P(Bi​)

Example:

Suppose a factory has two machines:

  • Machine 1 produces 60% of the items and has a defect rate of 1%.
  • Machine 2 produces 40% of the items and has a defect rate of 2%.

What is the probability that a randomly selected item is defective?

Let:

  • B1​: item from Machine 1, P(B1​)=0.6
  • B2​: item from Machine 2, P(B2​)=0.4
  • A: item is defective

Then,

P(A)=P(A∣B1​)P(B1​)+P(A∣B2​)P(B2​)=(0.01)(0.6)+(0.02)(0.4)=0.006+0.008=0.014

So, the probability of a defective item is 0.014 or 1.4%.

Law of compound or joint probability

The joint probability of two events A and B occurring together is:

P(A∩B)=P(A∣B)⋅P(B)=P(B∣A)⋅P(A)

This formula connects:

  • a conditional probability (like P(A∣B))
  • the probability of the condition (like P(B))
  • the probability of both events happening (like P(A∩B))

Example:

Suppose:

  • P(B)=0.5
  • P(A∣B)=0.3

Then:

P(A∩B)=0.3×0.5=0.15

Bayes’ theorem

Bayes’ theorem lets you reverse a conditional probability. In other words, it helps you find P(A∣B) when you know P(B∣A).

Given events A and B with P(B)>0:

P(A∣B)=P(B)P(B∣A)⋅P(A)​

Using the Law of Total Probability in the denominator:

P(Ai​∣B)=∑j=1n​P(B∣Aj​)⋅P(Aj​)P(B∣Ai​)⋅P(Ai​)​

Example (continued from previous):

What is the probability that a defective item came from Machine 2?

We already know:

  • P(A)=0.014
  • P(B2​)=0.4
  • P(A∣B2​)=0.02

Now apply Bayes’ Theorem:

P(B2​∣A)=P(A)P(A∣B2​)⋅P(B2​)​=0.0140.02⋅0.4​=0.0140.008​≈0.5714

So, about 57.14% of defective items come from Machine 2.

Key points

Permutations

  • Arrangements where order matters
  • Formula: P(n,r)=(n−r)!n!​
  • Example: Arranging 3 out of 4 letters yields 24 ways

Combinations

  • Selections where order does not matter
  • Formula: C(n,r)=r!(n−r)!n!​
  • Example: Choosing 3 out of 5 students yields 10 ways

Key differences

  • Permutations: order matters; combinations: order doesn’t matter
  • Different formulas for each
  • Typical examples: medals (permutations), committees (combinations)

Special cases

  • Permutations with repetition: nr
    • Example: 4-digit PIN from 10 digits = 10,000 codes
  • Permutations with identical items: n1​!⋅n2​!⋯nk​!n!​
    • Example: BALLOON = 1,260 arrangements
  • Combinations with repetition: C(n+r−1,r)
    • Example: 3 scoops from 5 flavors = 35 ways

Probability

  • Probability = favorable outcomes / total outcomes
  • P(A)=Total number of possible outcomesNumber of favorable outcomes​
  • Example: P(4) on die = 1/6

Law of total probability

  • For mutually exclusive, exhaustive events Bi​:
    • P(A)=∑i=1n​P(A∣Bi​)P(Bi​)
  • Used to find overall probability via cases

Law of compound or joint probability

  • P(A∩B)=P(A∣B)⋅P(B)
  • Connects conditional and joint probabilities

Bayes’ theorem

  • Reverses conditional probability: P(A∣B)=P(B)P(B∣A)P(A)​
  • Extended form uses total probability in denominator
  • Used to update beliefs given new evidence

More from Combinatorics, probability and statistics

  • Statistics