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
The CDF shows the cumulative probability: P(X ≤ 0) = 0.7 (just the failure outcome) and P(X ≤ 1) = 1.0 (both outcomes).
124
+
125
+
:::{admonition} Example: Customer Purchase with p = 0.1
126
+
:class: tip
127
+
128
+
Modeling the outcome of a single customer purchase where the probability of purchase is 0.1.
74
129
75
130
Let's use `scipy.stats.bernoulli` to calculate probabilities, compute the mean and variance, and generate random samples.
76
131
@@ -120,7 +175,7 @@ plt.show()
120
175
121
176

122
177
123
-
The PMF shows the probability of each outcome. With p = 0.1 (from our example), "No Purchase" has probability 1 - p = 0.9 and "Purchase" has probability p = 0.1.
178
+
The PMF shows the probability of each outcome. With p = 0.1, "No Purchase" has probability 0.9 and "Purchase" has probability 0.1.
124
179
125
180
```{code-cell} ipython3
126
181
:tags: [remove-input, remove-output]
@@ -144,6 +199,8 @@ plt.show()
144
199
145
200
The CDF shows cumulative probabilities: P(X ≤ 0) = 0.9 and P(X ≤ 1) = 1.0.
146
201
202
+
:::
203
+
147
204
**Quick Check Questions**
148
205
149
206
1. A quality control inspector checks a single product. It's either defective or not defective. Which distribution models this?
0 commit comments