You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: chapter_07.md
+20-19Lines changed: 20 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -175,27 +175,28 @@ plt.show()
175
175
176
176
The CDF shows the step function: starts at 0 for x < 0, jumps to 0.7 at x=0 (the value when outcome is 0), stays flat at 0.7 until x=1, then jumps to 1.0 at x=1 (the value when including both outcomes 0 and 1).
177
177
178
-
**Understanding PMF and CDF Charts**
178
+
Note: Here, P(X ≤ 0) = P(X = 0) = 0.7 because X can't take negative values; in general, "X ≤ 0" means "at or below 0", not "exactly 0".
179
179
180
-
Now that we've seen both types of visualizations, let's understand how to read and use them practically:
180
+
**Reading the PMF**
181
181
182
-
**PMF (Probability Mass Function) Charts:**
183
-
-**What they show:** The height of each bar represents the probability of that exact outcome
182
+
-**What it shows:** The height of each bar represents the probability of that exact outcome
184
183
-**How to read:** Look at the bar height to find P(X = k) for any specific value k
185
184
-**Practical use:** Answer questions like "What's the probability of success?" or "What's the probability of exactly 1 positive test?"
186
185
-**Key property:** All bar heights must sum to 1.0 (total probability)
187
186
188
-
**CDF (Cumulative Distribution Function) Charts:**
189
-
-**What they show:** The cumulative probability P(X ≤ k) up to and including each value k
187
+
**Reading the CDF**
188
+
189
+
-**What it shows:** The cumulative probability P(X ≤ k) up to and including each value k
190
190
-**How to read:** The height at position k tells you the probability of getting k or fewer successes
191
-
-**Why step functions?** For discrete distributions, probability accumulates in jumps at each possible value. Between possible values, the CDF stays constant (no additional probability). The step occurs at each value where the distribution has mass.
191
+
-**Why step functions?** For discrete distributions, probability accumulates in jumps at each possible value. Between possible values, the CDF stays constant (no additional probability)
192
+
-**Key identity:** The jump at k equals P(X = k) — the size of each step up is the PMF value
192
193
-**Practical uses:**
193
194
- Find P(X ≤ k) directly by reading the height at k
194
195
- Find P(X > k) by calculating 1 - P(X ≤ k)
195
196
- Find P(a < X ≤ b) by calculating P(X ≤ b) - P(X ≤ a)
196
-
-**Key property:** The CDF always increases (or stays flat) and approaches 1.0
197
+
-**Key property:** The CDF is right-continuous, always increases (or stays flat), and approaches 1.0
197
198
198
-
**Note on CDF visualization:** The charts use `where='post'` in the step plot to create proper right-continuous step functions. Discrete CDFs are right-continuous (they jump up at each value and include that value in the cumulative probability), which `where='post'` correctly represents.
199
+
**Note on CDF visualization:** The charts use `where='post'` in the step plot to create proper right-continuous step functions. This means the CDF jumps up at each value and includes that value in the cumulative probability.
199
200
200
201
:::{admonition} Example: Medical Diagnostic Test with p = 0.1
201
202
:class: tip
@@ -450,7 +451,7 @@ plt.show()
450
451
451
452

452
453
453
-
The CDF shows the step function increasing from 0 to 1, representing the cumulative probability of getting k or fewer heads.
454
+
The CDF shows P(X ≤ k), the cumulative probability of getting k or fewer heads.
454
455
455
456
:::{admonition} Example: Sales Calls with n = 20, p = 0.15
456
457
:class: tip
@@ -535,7 +536,7 @@ plt.show()
535
536
536
537

537
538
538
-
The CDF shows the step function increasing from 0 to 1, representing the cumulative probability of getting k or fewer successful calls.
539
+
The CDF shows P(X ≤ k), the cumulative probability of getting k or fewer successful calls.
539
540
540
541
:::
541
542
@@ -705,7 +706,7 @@ plt.show()
705
706
706
707

707
708
708
-
The CDF shows the step function increasing from 0 toward 1 as k increases (eventually you'll succeed).
709
+
The CDF shows P(X ≤ k), approaching 1 as k increases (eventually you'll succeed).
709
710
710
711
:::{admonition} Example: Certification Exam with p = 0.6
711
712
:class: tip
@@ -803,7 +804,7 @@ plt.show()
803
804
804
805

805
806
806
-
The CDF shows the step function increasing from 0 toward 1 as the trial number increases.
807
+
The CDF shows P(X ≤ k), increasing toward 1 as the trial number increases.
0 commit comments