Skip to content

Commit

Permalink
better readme
Browse files Browse the repository at this point in the history
  • Loading branch information
HDembinski committed Mar 19, 2023
1 parent 3969006 commit ec6c810
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ Features
Example
-------

We bootstrap the uncertainty of the arithmetic mean, an estimator for the expectation. In this case, we know the formula to compute this uncertainty and can compare it to the bootstrap result.

.. code-block:: python
# bootstrap uncertainty of arithmetic mean
from resample.bootstrap import variance
import numpy as np
Expand All @@ -55,6 +56,8 @@ Example
print(f"bootstrap {stdev_of_mean:.2f} exact {np.std(d) / len(d) ** 0.5:.2f}")
# bootstrap 0.82 exact 0.83
The amazing thing is that the bootstrap works as well for arbitrarily complex estimators.

.. _numpy: http://www.numpy.org
.. _scipy: https://www.scipy.org

Expand Down

0 comments on commit ec6c810

Please sign in to comment.