{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Homework 6.1: Bootstrapping \"theory\" with hacker stats [25 pts]\n", "\n", "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Say we have a data set with $n$ unique measurements. \n", "\n", "**a)** Show that on average a fraction of $(1-1/n)^n$ of the measurements do not appear in a bootstrap sample. \n", "\n", "Note that for large samples, this is approximately $1/e \\approx 1/2.7$, since\n", "\n", "\\begin{align}\n", "\\lim_{n\\to\\infty} (1-1/n)^n = 1/e.\n", "\\end{align}\n", "\n", "**b)** Use hacker stats to demonstrate that the result you derived in is indeed true. *Hint*: Think about a convenient \"data set\" to use for drawing samples.\n", "\n", "This is kind of fun; you're investigating some theory behind hacker stats *with hacker stats*! If you couldn't solve part (a), you could still make a plot using results from part (b) and get the basic idea." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
" ] } ], "metadata": { "anaconda-cloud": {}, "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.5" } }, "nbformat": 4, "nbformat_minor": 4 }