Skip to content

Commit 9ecb483

Browse files
authored
Merge pull request #79 from snowch/claude/fix-bernoulli-rendering-mjFhe
Merge Binomial admonitions into unified explanation
2 parents 199af5c + 776fa2b commit 9ecb483

1 file changed

Lines changed: 11 additions & 15 deletions

File tree

chapter_07.md

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -400,35 +400,31 @@ $$ P(X=k) = \binom{n}{k} p^k (1-p)^{n-k} \quad \text{for } k = 0, 1, \dots, n $$
400400

401401
where $\binom{n}{k} = \frac{n!}{k!(n-k)!}$ is the binomial coefficient (number of ways to choose $k$ successes from $n$ trials).
402402

403-
:::{admonition} Connection to Bernoulli Trials
403+
:::{admonition} Understanding the Binomial Formula
404404
:class: note
405405

406-
The Binomial PMF formula directly reflects $n$ independent **Bernoulli trials**:
406+
The Binomial PMF formula combines probability and counting:
407407

408408
$$P(X=k) = \binom{n}{k} \cdot p^k \cdot (1-p)^{n-k}$$
409409

410-
Breaking this down:
411-
- **$p^k$**: Probability of $k$ successes — each of the $k$ successes is an independent Bernoulli trial with probability $p$
410+
**Breaking down the formula:**
411+
- **$p^k$**: Probability of $k$ successes — each success is an independent Bernoulli trial with probability $p$
412412
- **$(1-p)^{n-k}$**: Probability of $(n-k)$ failures — each failure is an independent Bernoulli trial with probability $1-p$
413413
- **$\binom{n}{k}$**: Number of ways to arrange $k$ successes among $n$ trial positions
414414

415-
**Why this works:** Any specific sequence of $k$ successes and $(n-k)$ failures has probability $p^k(1-p)^{n-k}$ (by independence). Since there are $\binom{n}{k}$ such sequences, we multiply by the binomial coefficient.
415+
**The probabilistic view (Bernoulli trials):**
416+
417+
Any specific sequence of $k$ successes and $(n-k)$ failures has probability $p^k(1-p)^{n-k}$ (by independence of trials). For example, the sequence "success, success, failure" has probability $p \cdot p \cdot (1-p) = p^2(1-p)$.
416418

417419
This shows why Binomial "counts successes in repeated Bernoulli trials": it's built from the ground up using the Bernoulli probability $p$ for each trial.
418-
:::
419420

420-
:::{admonition} Connection to Counting Techniques
421-
:class: note
421+
**The combinatorial view (counting techniques):**
422422

423-
The binomial coefficient $\binom{n}{k}$ is a **combination** - it counts the number of ways to choose $k$ items from $n$ items when order doesn't matter (see [Chapter 3: Combinations](chapter_03.md#combinations-when-order-doesnt-matter)).
423+
The binomial coefficient $\binom{n}{k}$ is a **combination** that counts the number of ways to choose $k$ items from $n$ items when order doesn't matter (see [Chapter 3: Combinations](chapter_03.md#combinations-when-order-doesnt-matter)).
424424

425-
In the binomial distribution context:
426-
- We perform $n$ independent trials
427-
- We want exactly $k$ successes (in any order)
428-
- The binomial coefficient counts **how many different sequences** of trials yield exactly $k$ successes
429-
- For example, with $n=3$ trials and $k=2$ successes: $\binom{3}{2} = 3$ represents the sequences SSF, SFS, and FSS (where S=success, F=failure)
425+
In our context, it counts **how many different sequences** of $n$ trials yield exactly $k$ successes. For example, with $n=3$ trials and $k=2$ successes: $\binom{3}{2} = 3$ represents the three sequences SSF, SFS, and FSS (where S=success, F=failure).
430426

431-
This explains why the PMF formula multiplies the binomial coefficient by the probability of any specific sequence: the coefficient counts the sequences, while $p^k(1-p)^{n-k}$ gives the probability of each sequence.
427+
**Why we multiply:** Each of the $\binom{n}{k}$ sequences has the same probability $p^k(1-p)^{n-k}$. To get the total probability of exactly $k$ successes (in any order), we multiply the number of sequences by the probability of each sequence.
432428
:::
433429

434430
Let's verify this works for our coin flip example (n=10, p=0.5):

0 commit comments

Comments
 (0)