Skip to content

Commit

Permalink
Fix bar x
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-chau authored Feb 22, 2023
1 parent 7cd7c09 commit 78d44d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/chap03ex.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -708,12 +708,12 @@
"the elements and dividing by n. If you are given a PMF, you can\n",
"still compute the mean, but the process is slightly different:\n",
"%\n",
"$$ \bar x = \\sum_i p_i~x_i $$\n",
"$$ \\bar x = \\sum_i p_i~x_i $$\n",
"%\n",
"where the $x_i$ are the unique values in the PMF and $p_i=PMF(x_i)$.\n",
"Similarly, you can compute variance like this:\n",
"%\n",
"$$ S^2 = \\sum_i p_i~(x_i - \bar x)^2 $$\n",
"$$ S^2 = \\sum_i p_i~(x_i - \\bar x)^2 $$\n",
"% \n",
"Write functions called `PmfMean` and `PmfVar` that take a\n",
"Pmf object and compute the mean and variance. To test these methods,\n",
Expand Down

0 comments on commit 78d44d6

Please sign in to comment.