Combinatorics and Basic Probability
169 words
1 min read
Visual companion
Python
Type and operator map
Python Week 1: the first filter for runtime behavior
View
Revision summary
What this note is really saying
Short form
# Combinatorics and Basic Probability ## 10.1 Counting Principles **Product rule:** If task A has $m$ outcomes and task B has $n$, then the sequence (A then B) has $m \times n$ outcomes. **Sum rule:** If tasks A and B are mutually exclusive, then A or B has $m + n$ outcomes.

Combinatorics and Basic Probability
10.1 Counting Principles
Product rule: If task A has m outcomes and task B has n, then the sequence (A then B) has m×n outcomes.
Sum rule: If tasks A and B are mutually exclusive, then A or B has m+n outcomes.
10.2 Permutations and Combinations
Permutation (order matters): P(n,k)=(n−k)!n!
Combination (order doesn't matter): (kn)=k!(n−k)!n!
10.3 Basic Probability
Probability: P(A)=∣Ω∣∣A∣ (for equally likely outcomes)
Conditional probability: P(A∣B)=P(B)P(A∩B)
Bayes' theorem: P(A∣B)=P(B)P(B∣A)P(A)
✅ Practice Questions
Q1: How many ways to choose a committee of 3 from 10 people?
Solution(310)=3!7!10!=120 ways. Q2: What's the probability of getting exactly 2 heads in 3 coin flips? SolutionTotal outcomes: 23=8. Favorable: choose 2 of 3 flips to be heads = (23)=3. Probability = 3/8. Join Discord PreviousUncountable SetsNextGraph Theory Introduction