Skip to content

Commit 3cb2644

Browse files
authored
Merge pull request #70 from snowch/claude/binomial-distribution-calculator-QJG1z
Make Bernoulli expanded formula mobile-friendly
2 parents e3140a1 + ffa1450 commit 3cb2644

1 file changed

Lines changed: 17 additions & 4 deletions

File tree

chapter_07.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,24 @@ $$P(X = k) = p^k (1-p)^{1-k} \text{ for } k \in \{0, 1\}$$
8484

8585
Expanding this for both cases to make it crystal clear:
8686

87+
**When k = 1 (success):**
8788
$$
88-
P(X = k) = \begin{cases}
89-
p^1 (1-p)^{1-1} = p^1 (1-p)^0 = p \times 1 = p & \text{if } k=1 \text{ (success)} \\
90-
p^0 (1-p)^{1-0} = p^0 (1-p)^1 = 1 \times (1-p) = 1-p & \text{if } k=0 \text{ (failure)}
91-
\end{cases}
89+
\begin{align}
90+
P(X=1) &= p^1 (1-p)^{1-1} \\
91+
&= p^1 (1-p)^0 \\
92+
&= p \times 1 \\
93+
&= p
94+
\end{align}
95+
$$
96+
97+
**When k = 0 (failure):**
98+
$$
99+
\begin{align}
100+
P(X=0) &= p^0 (1-p)^{1-0} \\
101+
&= p^0 (1-p)^1 \\
102+
&= 1 \times (1-p) \\
103+
&= 1-p
104+
\end{align}
92105
$$
93106

94107
Let's verify this works for our example where $p = 0.3$:

0 commit comments

Comments
 (0)