Skip to content

Commit

Permalink
Update prob_dist.md
Browse files Browse the repository at this point in the history
  • Loading branch information
longye-tian committed Mar 20, 2024
1 parent 0be5f5b commit c2c1c8e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lectures/prob_dist.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,15 @@ Check that your answers agree with `u.mean()` and `u.var()`.
#### Bernoulli distribution

Another useful distribution is the Bernoulli distribution on $S = \{0,1\}$, which has PMF:

$$
p(x_i)=
\begin{cases}
p & \text{if $x_i = 1$}\\
1-p & \text{if $x_i = 0$}
\end{cases}
$$

Here $x_i \in S$ is the outcome of the random variable.

We can import the Bernoulli distribution on $S = \{0,1\}$ from SciPy like so:
Expand Down

0 comments on commit c2c1c8e

Please sign in to comment.