{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"tags": [
"remove_input"
]
},
"outputs": [],
"source": [
"path_data = '../../data/'\n",
"\n",
"import numpy as np\n",
"import pandas as pd\n",
"import math\n",
"from scipy import stats\n",
"\n",
"%matplotlib inline\n",
"import matplotlib.pyplot as plt\n",
"plt.style.use('fivethirtyeight')\n",
"\n",
"import warnings\n",
"warnings.filterwarnings('ignore')"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"colors = pd.read_csv(path_data + 'roulette_wheel.csv', usecols=['Color'])['Color']\n",
"\n",
"pockets = np.array(['0','00'])\n",
"\n",
"for i in np.arange(1, 37):\n",
" pockets = np.append(pockets, str(i)) \n",
"\n",
"wheel = pd.DataFrame(\n",
" {'Pocket':pockets,\n",
" 'Color':colors})"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# The Central Limit Theorem\n",
"Very few of the data histograms that we have seen in this course have been bell shaped. When we have come across a bell shaped distribution, it has almost invariably been an empirical histogram of a statistic based on a random sample.\n",
"\n",
"The examples below show two very different situations in which an approximate bell shape appears in such histograms."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Net Gain in Roulette\n",
"In an earlier section, the bell appeared as the rough shape of the total amount of money we would make if we placed the same bet repeatedly on different spins of a roulette wheel. "
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
"
\n",
"
\n",
"
Pocket
\n",
"
Color
\n",
"
\n",
" \n",
" \n",
"
\n",
"
0
\n",
"
0
\n",
"
green
\n",
"
\n",
"
\n",
"
1
\n",
"
00
\n",
"
green
\n",
"
\n",
"
\n",
"
2
\n",
"
1
\n",
"
red
\n",
"
\n",
"
\n",
"
3
\n",
"
2
\n",
"
black
\n",
"
\n",
"
\n",
"
4
\n",
"
3
\n",
"
red
\n",
"
\n",
"
\n",
"
5
\n",
"
4
\n",
"
black
\n",
"
\n",
"
\n",
"
6
\n",
"
5
\n",
"
red
\n",
"
\n",
"
\n",
"
7
\n",
"
6
\n",
"
black
\n",
"
\n",
"
\n",
"
8
\n",
"
7
\n",
"
red
\n",
"
\n",
"
\n",
"
9
\n",
"
8
\n",
"
black
\n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Pocket Color\n",
"0 0 green\n",
"1 00 green\n",
"2 1 red\n",
"3 2 black\n",
"4 3 red\n",
"5 4 black\n",
"6 5 red\n",
"7 6 black\n",
"8 7 red\n",
"9 8 black"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"wheel.head(10)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The bet on red pays even money i.e. 1 to 1. We define the function `red_winnings` that returns the net winnings on one \\$1 bet on red. Specifically, the function takes a color as its argument and returns 1 if the color is red. For all other colors it returns -1."
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"def red_winnings(color):\n",
" if color == 'red':\n",
" return 1\n",
" else:\n",
" return -1"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The table `red` shows each pocket's winnings on red."
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
"
\n",
"
\n",
"
Pocket
\n",
"
Color
\n",
"
Winnings: Red
\n",
"
\n",
" \n",
" \n",
"
\n",
"
0
\n",
"
0
\n",
"
green
\n",
"
-1
\n",
"
\n",
"
\n",
"
1
\n",
"
00
\n",
"
green
\n",
"
-1
\n",
"
\n",
"
\n",
"
2
\n",
"
1
\n",
"
red
\n",
"
1
\n",
"
\n",
"
\n",
"
3
\n",
"
2
\n",
"
black
\n",
"
-1
\n",
"
\n",
"
\n",
"
4
\n",
"
3
\n",
"
red
\n",
"
1
\n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Pocket Color Winnings: Red\n",
"0 0 green -1\n",
"1 00 green -1\n",
"2 1 red 1\n",
"3 2 black -1\n",
"4 3 red 1"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"red = wheel.copy()\n",
"\n",
"red['Winnings: Red'] = wheel['Color'].map(red_winnings)\n",
"\n",
"red.head(5)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Your net gain on one bet is one random draw from the `Winnings: Red` column. There is an 18/38 chance making \\\\$1, and a 20/38 chance of making -\\$1. This probability distribution is shown in the histogram below."
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAi4AAAFZCAYAAAC/haQ7AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAtd0lEQVR4nO3de1hU5d7/8c+IJzwkZSNmnggohCwNFcPUwqK2bDUNNDtuSzPM0kpL2k+aZqFbrNSIbbk13UpPnio0q62JaSlqZmqeIhXzOCSKiQEmzO+P/WOeRg6uIYZhwft1Xfwx675nre/c1+30aR3usWRnZ9sFAABgArU8XQAAAIBRBBcAAGAaBBcAAGAaBBcAAGAaBBcAAGAaBBcAAGAaBBcAAGAaBBcAAGAaBBcD0tPTPV2CqTBermG8XMN4uYbxcg3j5RpPjBfBBQAAmAbBBQAAmAbBBQAAmAbBBQAAmAbBBQAAmAbBBQAAmAbBBQAAmAbBBQAAmAbBBQAAmAbBBQAAmAbBBQAAmEZtTxdgBvn5DfXtt1meLsM0fv21js6eZbyMql+/oadLAADTILgYkJl5QZMmbfZ0GaaRn5+nevXqe7oM0xg/vqOnSwAA0+BSEQAAMA2CCwAAMA2CCwAAMA2CCwAAMA2CCwAAMA2CCwAAMA2CCwAAMA2PBZf4+Hj5+Pg4/V1//fWOdrvdrvj4eAUFBal58+aKiorS3r17PVUuAACoAjx6xiU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eDAgaW2de3aVZJksVgcPx7nTpV1nMrUvHlzp6XMBw8erI4dOyopKYngArgZl4oAk7r11lu1b98+ZWdnO7alpaXpmmuu0aBBg0psK3qfVPK9J/Hx8fLx8dGBAwf07LPPys/PT9dee60effRRnT592un47du313333adt27bpnnvuUfPmzRUSEqJ33nnHqd+fPY7dbldCQoJCQkJ0zTXXKDIyUlu2bFFUVJSioqKc+s6ZM0fh4eFq0aKF2rZtq549e2ru3LmXHcuTJ0/qxx9/1O+//37ZviWxWq0KDAws9tstdrtd7777rsLDw+Xr6ys/Pz8NGzZMx44dK7aPhQsXKjQ0VL6+vurWrZs+++yzctUCVHcEF8CkunbtqsLCQm3ZssWxLS0tTWFhYercubMkFWurX7++OnbseNl9P/744zp+/Lj+/ve/65FHHtHKlSv1wgsvFOt3+PBh3X///QoLC9Nrr72mtm3b6qWXXtLatWsNfQYjx3n11Vc1efJkBQUFadKkSbrllls0cOBAHT9+3KnfggULNGbMGAUEBOi1117TSy+9pNDQUEdgK8vEiRPVpUuXYvs06uLFizp+/LiuvPJKp+3PPfec4uLi1KFDB8XHx+uJJ57QmjVr9Je//MUpVCYnJ2vkyJFq0qSJXnnlFd19990aPny4duzYUa56gOqMS0WASRWdOUlLS1NkZKQkafPmzXr22Wd1xRVXKCgoqFhbx44dVa9evcvu+/rrr9e7777reG232/Xee+9p+vTpatKkiWP7Tz/9pI8//li33367JOmhhx7SjTfeqPnz5ysiIuJPH+eXX37RrFmzFBkZqQ8//FAWi0WSFBwcrGeeeUYtWrRwvPeLL75Qu3bttGDBgsse98/6/ffflZWVJem/97jMmDFDNptNTz75pKPP5s2bNW/ePKdfSZf+e4P07bffrnfffVcvvPCCLl68qFdeeUVBQUFatWqV47LabbfdpgEDBqhVq1Zu/zyAmXDGBTApf39/+fr6Ou5lOXDggDIzMx33sHTt2rVYW3h4uKF9P/74406vu3XrpoKCAh09erRYDUWhRZLq1aunTp06KSMjo0KOs27dOv3+++8aOnSoI7RI0gMPPOAUoCSpcePGO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ygO++8Uw0aNNDhw4e1cuVKPfzww3r22WdVp04djR8/Xk8//bR69+6tmJgYnTp1Su+9957atWvnOIMD4L844wKYXNFj0e3atSt2KeiPZ1nMeMZFksaPH6+XXnpJe/fu1csvv6xt27Zp8eLFatKkidNTOEOGDFFubq6SkpI0ZswYLVu2TA8++KA++eQT1apVOV91I0eO1MmTJ5WcnCxJmjp1qpKSknT+/HnFx8drwoQJ+vzzz9WrVy/99a9/dbzv4Ycf1syZM5Wdna0JEybos88+0+zZs9WhQ4dKqRswE0t2djZ3fwEwlYKCAgUEBKhPnz6aOXOmp8sBUIk44wKgSsvNzS22bdGiRTpz5ox69OjhgYoAeBL3uACo0pYvX6758+fr7rvv1pVXXqnt27dr0aJFuvHGG9W3b19PlwegkhFcAFRpISEhatCggd555x2dPXtWV199tR555BG9/PLLqlu3rqfLA1DJuMcFAACYBve4AAAA0yC4AAAA0yC4AAAA0yC4AAAA0yC4AAAA0yC4AAAA0/h/Y0OCTjo2IS0AAAAASUVORK5CYII=\n",
"text/plain": [
"
"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"unit = 'inch'\n",
"\n",
"fig, ax = plt.subplots(figsize=(8,5))\n",
"\n",
"ax.hist(red['Winnings: Red'], bins=np.arange(-1.5, 1.6, 1), \n",
" density=True, color='darkblue', alpha=0.8, ec='white', zorder=5)\n",
"\n",
"y_vals = ax.get_yticks()\n",
"\n",
"y_label = 'Percent per ' + (unit if unit else 'unit')\n",
"\n",
"x_label = 'Winnings : Red'\n",
"\n",
"ax.set_yticklabels(['{:g}'.format(x * 100) for x in y_vals])\n",
"\n",
"plt.ylabel(y_label)\n",
"\n",
"plt.xlabel(x_label)\n",
"\n",
"plt.title('');\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now suppose you bet many times on red. Your net winnings will be the sum of many draws made at random with replacement from the distribution above.\n",
"\n",
"It will take a bit of math to list all the possible values of your net winnings along with all of their chances. We won't do that; instead, we will approximate the probability distribution by simulation, as we have done all along in this course. \n",
"\n",
"The code below simulates your net gain if you bet \\$1 on red on 400 different spins of the roulette wheel. "
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"num_bets = 400\n",
"repetitions = 10000\n",
"\n",
"net_gain_red = np.array([])\n",
"\n",
"for i in np.arange(repetitions):\n",
" spins = red.sample(num_bets, replace=True)\n",
" new_net_gain_red = spins['Winnings: Red'].sum()\n",
" net_gain_red = np.append(net_gain_red, new_net_gain_red)\n",
"\n",
"\n",
"results = pd.DataFrame(\n",
" {'Net Gain on Red':net_gain_red}\n",
" )"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjwAAAFZCAYAAACc3vXuAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAA40klEQVR4nO3deVxVdf7H8fcVUXJJlAg3TAdRkTSVEtJcsobSfi5ZuLU4jvuWmeZSPzO3IZNs1MzJ4aG5MT8prQgbTc3SVNzStGlKxl0ETBAXRFC4vz96eKcbcLnAvVzu4fV8PPjjnO/3fM/nfh+Kb8/5nnNNGRkZZgEAABhYJVcXAAAA4GwEHgAAYHgEHgAAYHgEHgAAYHgEHgAAYHgEHgAAYHgEHgAAYHgEHgAAYHgEHidKTEx0dQnlGvNjG/NTNObINubHNubHNqPND4EHAAAYHoEHAAAYHoEHAAAYHoEHAAAYHoEHAAAYHoEHAAAYHoEHAAAYHoEHAAAYHoEHAAAYnuECz8KFC/Xoo4/K399fAQEB6t+/v3788UdXlwUAAFzIcIHn22+/1dChQ7VlyxbFxcWpcuXK6tOnjy5fvuzq0gAAgItUdnUBjrZx40ar7Q8++ECNGjVSQkKCunfv7qKqgIotOfmmkpIyHT6ul1d1h48JwJgMF3h+7/r168rL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K1bN6v93bp10759+2we+8ILL6hp06Z64okn9NlnnzmzTAAAUM6V6ys8aWlpys3Nla+vr9V+X19fXbx4scBjatSooTlz5igsLEyVK1fWF198oSFDhmjZsmXq379/oedKTEx0aO3OHtcoSjI/V696Kjvb8V9tcuvWrXI3bmHHlcdaXTGuVPgclZS7zUFR45bknM6q9erVa0pMLF8vp+V3tG3uND+BgYE228t14LnDZDJZbd95q3NBfHx8NH78eMt227ZtlZ6erkWLFtkMPEVNVEkkJiY6ZVyjKOn8XLmSpqpVvYruWEyenp7latzs7JuFHlfeanXVuJIcPq67zYGtcW39GSrpmKVx9901FRjo4/BxS4rf0bYZbX7K9S0tHx8feXh45Luac+nSpXxXfWwJCQnRyZMnHV0eAABwE+X6Ck+VKlXUpk0b7dixQ3369LHs37Fjh3r16mX3OMeOHWMBMwC4mMlUSQcPpjl83AYNqqtePedcQYRxlOvAI0ljx47VyJEjFRISotDQUK1YsUIpKSkaMmSIJGnWrFk6dOiQ4uLiJEkxMTHy9PRU69atValSJW3evFnR0dF68803XfgpAACXLmUpMtL2AyclERXVmcCDIpX7wNO3b1+lp6drwYIFSk1NVVBQkGJjY9WoUSNJUkpKik6dOmV1TFRUlM6dOycPDw8FBATovffes7l+BwAAGFu5DzySNGzYMA0bNqzAtmXLllltDxo0iC89BQAAVsr1omUAAABHIPAAAADDI/AAAADDI/AAAADDI/AAAADDI/AAAADDI/AAAADDI/AAAADDI/AAAADDI/AAAADDI/AAAADDI/AAAADDI/AAAADDI/AAAADDI/AAAADDI/AAAADDI/AAAADDI/AAAADDI/AAAADDI/AAAADDI/AAAADDq+zqAmBsyck3lZSUWWDb1aueunIlrdhjZmXllrYsAEAFQ+CBUyUlZWry5J0FtmVn31TVql7FHnP69NDSlgXAQEymSjp4sPj/ebL1n64GDaqrXr3i/35C+UXgAQC4tUuXshQZua/Yx9n6T1dUVGcCj8G4fA1PdHS0WrduLT8/P3Xp0kV79uwptO+uXbs0cOBANW/eXPXq1VOHDh20Zs2afH28vb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xdV7FrvvPOOvL299eqrr1r2GWl+DBl4JGnYsGE6duyYLl68qG+++cbqiS1nGjVqlI4fP66YmBjt2bNHAwYM0MiRI7V7926r2o4ePaqPPvpIH3/8sY4ePaqRI0eWSX3lwcGDB/X000/rkUce0datW/X1119r3Lhxqlz5vxccK/ocSdJ7770nDw+PAtsq6vwkJycrOTlZs2bN0p49e/TBBx9oz549Gjp0qFW/ijo/0n9fvDpp0iTt3LlT7du3V0REhM6dO+fq0srct99+q6FDh2rLli2Ki4tT5cqV1adPH12+fNnSZ9GiRVq6dKnmz5+vr776Sr6+vnr66ad17do1F1Ze9g4cOKBVq1YpODjYar+R5sdwj6W7WoMGDTR//nw9//zzln3333+/Ro4cqfHjx+vnn39WaGioNm/erLCwMEnS3r171b17dx04cECBgYGuKr3MhIeHq1OnTpoxY0aB7cyRdPjwYT3//PP6+uuvFRgYqFWrVql3796SmJ/f+/LLL9W/f3+dOXNGd999d4Wfn8cee0zBwcFavHixZV+7du3Uu3fvCv/i1evXr6tRo0Zat26dunfvLrPZrBYtWmj48OGaPHmyJCkrK0uBgYGaM2dOhVkGceXKFXXp0kWLFi3S22+/rZYtW2rBggWGmx/DXuFxlbCwMH366adKT09XXl6eNm3apLS0NHXp0kWStH//ftWoUcNqAXVYWJiqV69e5i9GdIVffvlF+/fvl5+fn5588kkFBgaqe/fu+uabbyx9KvocXbt2TUOHDtW7775b4JOFFX1+fu/atWuqWrWqqlWrJqliz8+dF69269bNar8rXrxaHl2/fl15eXny9vaWJJ05c0apqalW83XXXXepQ4cOFWq+Xn75ZfXu3dvy79QdRpsfAo+DrVy5UiaTSX/4wx907733asSIEZb76ZJ08eJF+fj4WL0TyGQy6Z577sn3KL0RnT59WpIUGRmp5557Th9//LEefvhh9e3bV8eOHZPEHL3yyit67LHHFB4eXmB7RZ+f38rIyNC8efP04osvWm6JVuT5SUtLU25ubr6g7Ovra/jPbo9p06apVatWat++vaRf11xKqtDztWrVKp08eVKvv/56vjajzY8hn9JytLlz5yoqKspmn88//1ydOnXS3LlzlZaWps8++0x16tTRpk2bNHr0aG3atEmtWrWSlP+liJL7vxjR3jmqUqWKJGnIkCF64YUXJEkPPPCAvv32W61cuVILFy6UZLw5snd+kpKS9MMPP+R7rcLvVdT56dSpk2U7MzNTAwcOVL169TR79myrvkabn+Lixav5vfbaa0pISNDmzZvzrY2rqPOVmJio2bNn65///Kfld3NBjDI/BB47jB49Wv369bPZp2HDhjp16pSWL1+uXbt2WcJNq1attHfvXi1fvlxLlizRvffeq0uXLln9gTGbzUpLS3PrFyPaO0d3/lfQvHlzq7ZmzZrp/PnzkmTIObJ3fmJiYvTTTz+pQYMGVm1DhgxR+/bttXnz5go9P3dcv35dERERkqT169fLy+u/38tjxPmxFy9eLdj06dO1ceNGff7552rcuLFlv5+fn6Rfrwr+9s9XRZmv/fv3Ky0tTQ8//LBlX25urvbs2aMVK1YoISFBknHmh8BjBx8fH/n4+BTZ78aNG5KU738PHh4eysvLkyS1b99e169f1/79+y1rDPbv36/MzEy3fjGivXN03333qV69ekpMTLTaf+LECbVs2VKSMefI3vmZMWNGvi++7dChg+bMmaOnnnpKUsWeH+nXNTsREREym836+OOPVaNGDat2I86PvX774tU+ffpY9u/YsUO9evVyXWEuNHXqVG3cuFHx8fFq1qyZVdt9990nPz8/7dixQ+3atZMk3bx5U3v37s131dCInnrqKbVt29Zq39ixYxUQEKBXXnlFTZs2NdT8EHgcqFmzZvrDH/6gSZMmae7cuapTp47i4+O1Y8cOxcTESPr1ysbjjz+uiRMnatGiRTKbzZo4caKeeOIJwz89Iv16aXT8+PF66623dP/996t169b65JNPdODAAb399tuSKvYc1a9fX/Xr18+3v2HDhpb/mVbk+bl27Zr69u2ra9euad26dbpx44blPxq1a9dWlSpVKvT8SLx49bcmT56s9evXa+3atfL29rasSalevbpq1Kghk8mk0aNH65133lFgYKCaNm2qqKgoVa9eXc8++6yLq3c+b29vywLuO6pVq6batWtb/gNqpPkh8DiQp6enPvroI7355psaMGCAMjMz1aRJEy1dul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"
"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"unit = 'inch'\n",
"\n",
"fig, ax = plt.subplots(figsize=(8,5))\n",
"\n",
"ax.hist(results, bins=np.arange(-80, 50, 6), \n",
" density=True, color='darkblue', alpha=0.8, ec='white', zorder=5)\n",
"\n",
"y_vals = ax.get_yticks()\n",
"\n",
"y_label = 'Percent per ' + (unit if unit else 'unit')\n",
"\n",
"x_label = 'Winnings : Red'\n",
"\n",
"ax.set_yticklabels(['{:g}'.format(x * 100) for x in y_vals])\n",
"\n",
"plt.ylabel(y_label)\n",
"\n",
"plt.xlabel(x_label)\n",
"\n",
"plt.title('');\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"That's a roughly bell shaped histogram, even though the distribution we are drawing from is nowhere near bell shaped.\n",
"\n",
"**Center.** The distribution is centered near -20 dollars, roughly. To see why, note that your winnings will be \\$1 on about 18/38 of the bets, and -$1 on the remaining 20/38. So your average winnings per dollar bet will be roughly -5.26 cents:"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"-0.05263157894736842"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"average_per_bet = 1*(18/38) + (-1)*(20/38)\n",
"average_per_bet"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"So in 400 bets you expect that your net gain will be about -\\$21:"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"-21.052631578947366"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"400 * average_per_bet"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"For confirmation, we can compute the mean of the 10,000 simulated net gains:"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"-21.1334"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"np.mean(results.iloc[:,0])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Spread.** Run your eye along the curve starting at the center and notice that the point of inflection is near 0. On a bell shaped curve, the SD is the distance from the center to a point of inflection. The center is roughly -\\$20, which means that the SD of the distribution is around \\$20.\n",
"\n",
"In the next section we will see where the \\$20 comes from. For now, let's confirm our observation by simply calculating the SD of the 10,000 simulated net gains:"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"20.0748351036816"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"np.std(results.iloc[:,0])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Summary.** The net gain in 400 bets is the sum of the 400 amounts won on each individual bet. The probability distribution of that sum is approximately normal, with an average and a SD that we can approximate."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Average Flight Delay\n",
"The table `united` contains data on departure delays of 13,825 United Airlines domestic flights out of San Francisco airport in the summer of 2015. As we have seen before, the distribution of delays has a long right-hand tail."
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"united = pd.read_csv(path_data + 'united_summer2015.csv')"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjgAAAFZCAYAAACVNVWUAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAssklEQVR4nO3de1xVdb7/8fcWQQw0kIgjiqlAKngNb8dGprxg2ZhOqQgep2NqZrfHKS21m5qNaKKNJlonasrQjgg2ovnQU2mOWnQxTaupoRRvCSYICAkk7N8f/eQMIbDY7M3ee/F6Ph48Hu211nevz/6wtLdrffdaloKCAqsAAABMpIWzCwAAALA3Ag4AADAdAg4AADAdA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hYWqrKysto3FYtE111yje+65R/PmzXNMlQAAAA1QZ8CZMWOGZsyYIUnq3bu3li5dqtGjRzdJYQAAALYy/LDNI0eOOLIOAAAAuzEccK64ePGiTp8+rQsXLshqtdZYf/PNN9ulMAAAAFsZDjgXLlzQ3Llz9c4776iioqLGeqvVKovFovz8fLsWCAAA0FCGA86jjz6q7du3a8aMGbr55pvl5+fnwLIAAABsZzjgvP/++5o5c6b+/Oc/O7IeAACARjN8oz8vLy+FhoY6shYAAAC7MBxwxo4dq/fee8+RtQAAANiF4YDz8MMPKycnR/fff78+++wz5eTk6KeffqrxAwAA4GyG5+BERUXJYrHo8OHDSk1NrXU7vkUFAACczXDAeeKJJ+p82CYAAICrMBxw5s+f78g6AAAA7MbwHJx/VVFRofz8fF2+fNne9QAAADRagwLOF198oXHjxik4OFhhYWE6cOCAJCkvL08TJ07U3r17HVIkAABAQxgOOJ9++qlGjx6t48ePa9KkSdWeQxUQEKDi4mK99dZbDdr5gQMHNGnSJPXo0UN+fn7asGFDndufOHFCfn5+NX7ef//9Bu0XAACYm+E5OIsXL1ZoaKg++OADlZSUaP369dXWDx06VJs2bWrQzktKShQREaG4uDjdf//9hselp6erZ8+eVa/9/f0btF8AAGBuhgPOF198oaefflre3t76+eefa6zv0KGDcnNzG7TzmJgYxcTESJIeeOABw+PatWunoKCgBu0LAAA0H4YvUbVo0UItWtS+eW5urlq3bm2XouozZcoUhYWFadSoUdq6dWuT7BMAALgPw2dw+vbtq507d2rmzJk11pWXl2vz5s0aOHCgXYv7LV9fXy1evFiDBw9Wy5YttWPHDk2dOlXr1q1TbGxsreOysrIcWldDFBV5qqys1Obxto4tKrqorKzmcxNGV/qduyp6ZAx9qh89MoY+1a+2HoWHhzf4vQwHnMcee0zjx4/XQw89pAkTJkiScnJy9P777ysxMVHHjx9XUlJSgwtoiICAAD388MNVr/v166f8/HytWrWqzoBjS2McpbAwT61aeds83taxbdu2UXh4gM37dSdZWVku9Tt3RfTIGPpUP3pkDH2qn717ZDjg3HrrrXrllVf0+OOPa+PGjZKkWbNmyWq16tprr1VycrIGDBhgt8KMioqKqvfbVwAAoHkxHHAkafz48Ro9erT27NmjH374QZWVlerSpYuGDx8uX19fR9VYp6NHjzLhGAAAVNOggCNJ11xzje644w677Ly4uFjHjh2TJFVWVur06dM6cuSI/P39FRISokWLFungwYPKyMiQJG3cuFGenp7q3bu3WrRooZ07dyo5OVkLFy60Sz0AAMAcDH+LaseOHXr88cdrXf/4449r586dDdr5oUOHFB0drejoaF26dEkJCQmKjo7WkiVLJP06x+f48ePVxiQmJurWW2/VsGHDlJ6erjVr1ujBBx9s0H4BAIC5GT6D89JLL6lr1661ri8tLdWqVat02223Gd750KFDVVBQUOv6devWVXsdHx+v+Ph4w+8PAACaJ8NncL755hv17du31vV9+vTRt99+a4+aAAAAGsVwwLl8+bIuXbpU6/pLly6prKzMLkUBAAA0huGAExERoYyMDFVWVtZYV1lZqYyMDHXv3t2uxQEAANjCcMC5//77dfDgQcXFxenw4cMqKytTWVmZDh8+rPj4eB08ePCqdzkGAABoaoYnGd999906fvy4EhIS9N5770mSLBaLrFarLBaL5s6dW+fdhAEAAJpKg+6DM2fOHI0fP17btm1Tdna2rFarunTpojFjxqhz584OKhEAAKBhDAWcS5cuaeLEiYqNjdV//Md/VHseFAAAgKsxNAendevW+vLLL1VRUeHoegAAABrN8CTj3/3ud/roo48cWQsAAIBdGA44y5Yt0xdffKFnnnlG2dnZV/26OAAAgCswPMl4wIABslqtSkpKUlJSklq0aCFPT89q21gsFv344492LxIAAKAhDAecP/7xj7JYLI6sBQAAwC4MB5zfPvgSAADAVRmegwMAAOAuGhRwTp48qUceeUR9+/ZVSEiI9u/fL0nKy8vT7NmzdfjwYUfUCAAA0CCGL1F99913uu2221RZWan+/fvr5MmTVffFCQgI0GeffaaysjKtWbPGYcUCAAAYYTjgLFiwQG3atNH7778vDw8PhYWFVVsfExOjv/3tb/auDwAAoMEMX6L66KOPNH36dF1//fVX/TZVSEiIzp49a9fiAAAAb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7yh06dP19i+rstTkuTh4SGr1VptWVpams6ePXvV7ePi4rRv3z6tWrVKPj4+GjNmjO0fBoBL4AwOgCb1wQcf6NixY7p8+bJ++ukn/f3vf9eePXsUEhKit99+W97e3pKklStXatSoUbr55pt1zz33KDQ0VHl5efryyy+1e/dunTp1qtZ93H777fqf//kftWnTRhERETp69Ki2bNlSdWbot8aPH6+nnnpKW7du1cSJE+Xr6+uIjw6gCRFwADSpK5eNvLy85O/vr4iICCUkJGjy5Mlq06ZN1XZhYWH68MMP9cILL2jz5s06f/68AgIC1K1bNy1evLjefXh6euqdd95RSkqK+vbtq/T0dD3zzDNX3d7f31+jRo3Stm3b+PYUYBKWgoICa/2bAYC5TZs2TQcOHNDXX38tDw8PZ5cDoJGYgwOg2cvLy9O7776riRMnEm4Ak+ASFYBmKzs7W5988ok2btwoq9Wq6dOnO7skAHZCwAHQbB04cEAPPvigOnbsqKSkJHXq1MnZJQGwE+bgAAAA02EODgAAMB0CDgAAMB0CDgAAMB0CDgAAMB0CDgAAMB0CDgAAMJ3/B9s9X0bcBzWsAAAAAElFTkSuQmCC\n",
"text/plain": [
"
"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"unit = 'inch'\n",
"\n",
"fig, ax = plt.subplots(figsize=(8,5))\n",
"\n",
"ax.hist(united['Delay'], bins=np.arange(-20, 300, 10), \n",
" density=True, color='darkblue', alpha=0.8, ec='white', zorder=5)\n",
"\n",
"y_vals = ax.get_yticks()\n",
"\n",
"y_label = 'Percent per ' + (unit if unit else 'unit')\n",
"\n",
"x_label = 'Delay'\n",
"\n",
"ax.set_yticklabels(['{:g}'.format(x * 100) for x in y_vals])\n",
"\n",
"plt.ylabel(y_label)\n",
"\n",
"plt.xlabel(x_label)\n",
"\n",
"plt.title('');\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The mean delay was about 16.6 minutes and the SD was about 39.5 minutes. Notice how large the SD is, compared to the mean. Those large deviations on the right have an effect, even though they are a very small proportion of the data."
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(16.658155515370705, 39.48019985160957)"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"mean_delay = np.mean(united['Delay'])\n",
"sd_delay = np.std(united['Delay'])\n",
"\n",
"mean_delay, sd_delay"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now suppose we sampled 400 delays at random with replacement. You could sample without replacement if you like, but the results would be very similar to with-replacement sampling. If you sample a few hundred out of 13,825 without replacement, you hardly change the population each time you pull out a value.\n",
"\n",
"In the sample, what could the average delay be? We expect it to be around 16 or 17, because that's the population average; but it is likely to be somewhat off. Let's see what we get by sampling. We'll work with the table `delay` that only contains the column of delays."
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
"
\n",
"
\n",
"
Delay
\n",
"
\n",
" \n",
" \n",
"
\n",
"
0
\n",
"
257
\n",
"
\n",
"
\n",
"
1
\n",
"
28
\n",
"
\n",
"
\n",
"
2
\n",
"
-3
\n",
"
\n",
"
\n",
"
3
\n",
"
0
\n",
"
\n",
"
\n",
"
4
\n",
"
64
\n",
"
\n",
"
\n",
"
...
\n",
"
...
\n",
"
\n",
"
\n",
"
13820
\n",
"
-4
\n",
"
\n",
"
\n",
"
13821
\n",
"
8
\n",
"
\n",
"
\n",
"
13822
\n",
"
3
\n",
"
\n",
"
\n",
"
13823
\n",
"
-1
\n",
"
\n",
"
\n",
"
13824
\n",
"
-2
\n",
"
\n",
" \n",
"
\n",
"
13825 rows × 1 columns
\n",
"
"
],
"text/plain": [
" Delay\n",
"0 257\n",
"1 28\n",
"2 -3\n",
"3 0\n",
"4 64\n",
"... ...\n",
"13820 -4\n",
"13821 8\n",
"13822 3\n",
"13823 -1\n",
"13824 -2\n",
"\n",
"[13825 rows x 1 columns]"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"delay = united[['Delay']]\n",
"delay"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"14.115"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"np.mean(delay['Delay'].sample(400, replace=True))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The sample average varies according to how the sample comes out, so we will simulate the sampling process repeatedly and draw an empirical histogram of the sample average. That will be an approximation to the probability histogram of the sample average."
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [],
"source": [
"sample_size = 400\n",
"repetitions = 10000\n",
"\n",
"means = np.array([])\n",
"\n",
"for i in np.arange(repetitions):\n",
" sample = delay.sample(sample_size, replace=True)\n",
" new_mean = np.mean(sample['Delay'])\n",
" means = np.append(means, new_mean)\n",
"\n",
"results = pd.DataFrame(\n",
" {'Sample Mean': means})"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjwAAAFZCAYAAACc3vXuAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAyrUlEQVR4nO3deVTU9f7H8deIKIYaikSIYAaTimmmZqbpzzYtvS4VLmjlMbc0yxZMafNq3UaL7JqR1/vz9CtzSUzK9Vh2tVIS77VwabMpd0JMFBVklfn90XHORQTGWZyZL8/HOZzTd/l85/2G+Priu5ry8vJsAgAAMLA63i4AAADA0wg8AADA8Ag8AADA8Ag8AADA8Ag8AADA8Ag8AADA8Ag8AADA8Ag8AADA8Ag8HmS1Wr1dglfU1r4leq+t6L12qq29+2vfBB4AAGB4BB4AAGB4BB4AAGB4BB4AAGB4BB4AAGB4BB4AAGB4BB4AAGB4BB4AAGB4fhd45s6dq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ey1FSUqIXX3xR9957ryIjI6tc79prr9XcuXPVqVMnlZSUaMWKFRo0aJDWrVunHj16VDnOarV6omyPbdfX1da+Jdd6P3MmUMXFRU6PLy0tdXq8K2Mv8Fbtro73du9nzpyV1eq/j/Tg97328cW+zWZztcsdCjxFRUWaN2+ebrnlFt15551uKexylJWVafz48Tp9+rSWL19e7bpms7lC0127dtXhw4c1f/78agNPTd8oZ1itVo9s19fV1r4l13s/fTpX9esHOT0+MDDQ6fGujL3AW7W7Ot7bvTdu3Ehms3+eguf3vfb17q99O3RKKygoSG+99ZaOHj3q6XoqKSsr05gxY/TDDz9o9erVatq06WVvo3Pnztq/f78HqgMAAP7A4VNa7du3v+KhobS0VI8++qh++uknrVu3TuHh4U5tZ+/evU6PBQAA/s/hwPPyyy9r1KhRuu2229S3b1+3fHh+fr49RJWXl+vo0aPas2ePmjRpooiICI0aNUqZmZlavny5TCaTcnJyJEmNGze238Y+YcIESdLChQslSe+++66io6PVtm1blZSUKDU1VevXr9fixYvdUjMAAPA/Dgeet99+WyEhIUpISFDz5s113XXXVXp2jslkUmpqqsMfnpmZqQEDBtinLRaLLBaLEhISNH36dG3YsEHSn3dc/beUlBT7k58vPs1WWlqql156SdnZ2QoKClLbtm2Vmppqv/0dAADUPg4Hnp9//lkmk0ktWrSQJB0+fLjSOpf7rq2ePXsqLy+vyuXVLbtg/fr1FaanTJmiKVOmXFYdAADA2BwOPHv37vVkHQAAAB7jVw8eBAAAcMZlBZ7z588rNTVVkydP1rBhw/T9999L+vPU0yeffKJjx455pEgAAABXOBx4Tp8+rT59+mjChAlavXq1Nm3apNzcXElSo0aN9MILL+if//ynxwoFAABwlsOBZ+bMmfr555+1cuVK7dq1Szabzb4sICBAAwYM0KZNmzxSJAAAgCscDjzr16/X+PHjdffdd1/ybqyYmBgdOXLErcUBAAC4g8OBJy8vT61atapyuc1mU0lJiVuKAgAAcCeHA090dLR+/PHHKpenp6crNjbWLUUBAAC4k8OBZ8iQIVq8eLHS09Pt8y6c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q5cqRMnTig0NFStW7fWK6+8UuNnBAYG6pNPPtGSJUvUsWNHrVq1Si+99NIl12/SpIn69u2rtWvXcncW4IdMeXl5tppXAwCMGTNG6enp+uGHHxQQEODtcgBcBq7hAQAH5Obmav369Ro6dChhB/BDnNICgGocPHhQO3bs0LJly2Sz2TR27FhvlwTACQQeAKhGenq6Hn/8cbVo0UIpKSmKjo72dkkAnMA1PAAAwPC4hgcAABgegQcAABgegQcAABgegQcAABgegQcAABgegQcAABje/wOhNeNFq6D1KwAAAABJRU5ErkJggg==\n",
"text/plain": [
"
"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"unit = 'inch'\n",
"\n",
"fig, ax = plt.subplots(figsize=(8,5))\n",
"\n",
"ax.hist(results, bins=np.arange(10, 25, 0.5), \n",
" density=True, color='darkblue', alpha=0.8, ec='white', zorder=5)\n",
"\n",
"y_vals = ax.get_yticks()\n",
"\n",
"y_label = 'Percent per ' + (unit if unit else 'unit')\n",
"\n",
"x_label = 'Delay'\n",
"\n",
"ax.set_yticklabels(['{:g}'.format(x * 100) for x in y_vals])\n",
"\n",
"plt.ylabel(y_label)\n",
"\n",
"plt.xlabel(x_label)\n",
"\n",
"plt.title('');\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Once again, we see a rough bell shape, even though we are drawing from a very skewed distribution. The bell is centered somewhere between 16 ad 17, as we expect."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Central Limit Theorem (*pretty important!*)\n",
"\n",
"The reason why the bell shape appears in such settings is a remarkable result of probability theory called the **Central Limit Theorem**. \n",
"\n",
"**The Central Limit Theorem says that the probability distribution of the sum or average of a large random sample drawn with replacement will be roughly normal, *regardless of the distribution of the population from which the sample is drawn*.**\n",
"\n",
"As we noted when we were studying Chebychev's bounds, results that can be applied to random samples *regardless of the distribution of the population* are very powerful, because in data science we rarely know the distribution of the population.\n",
"\n",
"The Central Limit Theorem makes it possible to make inferences with very little knowledge about the population, provided we have a large random sample. That is why it is central to the field of statistical inference."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Proportion of Purple Flowers\n",
"Recall Mendel's probability model for the colors of the flowers of a species of pea plant. The model says that the flower colors of the plants are like draws made at random with replacement from {Purple, Purple, Purple, White}.\n",
"\n",
"In a large sample of plants, about what proportion will have purple flowers? We would expect the answer to be about 0.75, the proportion purple in the model. And, because proportions are means, the Central Limit Theorem says that the distribution of the sample proportion of purple plants is roughly normal.\n",
"\n",
"We can confirm this by simulation. Let's simulate the proportion of purple-flowered plants in a sample of 200 plants."
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"