{ "cells": [ { "cell_type": "code", "execution_count": 9, "metadata": { "tags": [ "remove_input" ] }, "outputs": [], "source": [ "path_data = '../../../../data/'\n", "\n", "import numpy as np\n", "import pandas as pd\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": "markdown", "metadata": {}, "source": [ "# Empirical Distributions\n", "\n", "In data science, the word \"empirical\" means \"observed\". Empirical distributions are distributions of observed data, such as data in random samples.\n", "\n", "In this section we will generate data and see what the empirical distribution looks like. \n", "\n", "Our setting is a simple experiment: rolling a die multiple times and keeping track of which face appears. The table `die` contains the numbers of spots on the faces of a die. All the numbers appear exactly once, as we are assuming that the die is fair." ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Face
01
12
23
34
45
56
\n", "
" ], "text/plain": [ " Face\n", "0 1\n", "1 2\n", "2 3\n", "3 4\n", "4 5\n", "5 6" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "die = pd.DataFrame({'Face':np.arange(1, 7, 1)})\n", "die" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## A Probability Distribution\n", "\n", "The histogram below helps us visualize the fact that every face appears with probability 1/6. We say that the histogram shows the *distribution* of probabilities over all the possible faces. Since all the bars represent the same percent chance, the distribution is called *uniform on the integers 1 through 6.*" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAb4AAAEkCAYAAABQcFTMAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwga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AArF692lxTJRIFi4/Iyr3xxhu4f/8+9uzZg3379sHX1xdbt25FYmIijh07ZrDt+vXr0b17d2zfvh2LFi2Ck5MTevXqhaCgIP02L7/8Mnx8fLBu3TqsWrUKFRUVaNeuHQIDAzFp0iRTT49IdLyPj4iIZIW/8RERkayw+IiISFZYfEREJCssPiIikhUWHxERyQqLj4iIZIXFR0REssLiIyIiWWHxERGRrLD4iIhIVv4fb+TBDLbRD9kAAAAASUVORK5CYII=\n", "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "die_bins = np.arange(0.5, 6.6, 1)\n", "\n", "unit = 'unit'\n", "\n", "fig, ax1 = plt.subplots()\n", "\n", "ax1.hist(die, bins=die_bins, density=True, alpha = 0.8, ec='white')\n", "\n", "y_vals = ax1.get_yticks()\n", "\n", "y_label = 'Percent per ' + (unit if unit else 'unit')\n", "\n", "x_label = 'Face'\n", "\n", "ax1.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.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Variables whose successive values are separated by the same fixed amount, such as the values on rolls of a die (successive values separated by 1), fall into a class of variables that are called *discrete*. The histogram above is called a *discrete* histogram. Its bins are specified by the array `die_bins` and ensure that each bar is centered over the corresponding integer value. \n", "\n", "It is important to remember that the die can't show 1.3 spots, or 5.2 spots – it always shows an integer number of spots. But our visualization spreads the probability of each value over the area of a bar. While this might seem a bit arbitrary at this stage of the course, it will become important later when we overlay smooth curves over discrete histograms.\n", "\n", "Before going further, let's make sure that the numbers on the axes make sense. The probability of each face is 1/6, which is 16.67% when rounded to two decimal places. The width of each bin is 1 unit. So the height of each bar is 16.67% per unit. This agrees with the horizontal and vertical scales of the graph." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Empirical Distributions\n", "The distribution above consists of the theoretical probability of each face. It is not based on data. It can be studied and understood without any dice being rolled.\n", "\n", "*Empirical distributions,* on the other hand, are distributions of observed data. They can be visualized by *empirical histograms*. \n", "\n", "Let us get some data by simulating rolls of a die. This can be done by sampling at random with replacement from the integers 1 through 6. We have used `np.random.choice` for such simulations before. But now we will introduce a Table method for doing this. This will make it possible for us to use our familiar Table methods for visualization.\n", "\n", "The Table method is called `sample`. It draws at random with replacement from the rows of a table. Its argument is the sample size, and it returns a table consisting of the rows that were selected. An optional argument `with_replacement=False` specifies that the sample should be drawn without replacement, but that does not apply to rolling a die.\n", "\n", "Here are the results of 10 rolls of a die." ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Face
23
01
34
23
23
34
34
45
56
01
\n", "
" ], "text/plain": [ " Face\n", "2 3\n", "0 1\n", "3 4\n", "2 3\n", "2 3\n", "3 4\n", "3 4\n", "4 5\n", "5 6\n", "0 1" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "die.sample(10, replace=True)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We can use the same method to simulate as many rolls as we like, and then draw empirical histograms of the results. Because we are going to do this repeatedly, we define a function `empirical_hist_die` that takes the sample size as its argument, rolls a die as many times as its argument, and then draws a histogram of the observed results." ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [], "source": [ "def empirical_hist_die(n):\n", "\n", " unit = 'unit'\n", "\n", " fig, ax1 = plt.subplots()\n", "\n", " ax1.hist(die.sample(n, replace=True), bins=die_bins, density=True, alpha=0.8, ec='white')\n", "\n", " y_vals = ax1.get_yticks()\n", "\n", " y_label = 'Percent per ' + (unit if unit else 'unit')\n", "\n", " x_label = 'Face'\n", "\n", " ax1.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.show()\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Empirical Histograms\n", "\n", "Here is an empirical histogram of 10 rolls. It doesn't look very much like the probability histogram above. Run the cell a few times to see how it varies." ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAbEAAAEfCAYAAADPxvgvAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAlUUlEQVR4nO3deVhU9eIG8PeEAgrYoOEoAi4wblwVBZdQf5kLpgbuKdp9vG4paGqpIanXNBO3LBfkWmZpaolAidbVazfcRSlzKbJQZDEVBQQDZUjm/P7ocW4T2xk5M2cOvZ/n4Xk6C+f7nofg9czZhIKCAhFEREQq9ITSAYiIiB4XS4yIiFSLJUZERKrFEiMiItViiRERkWqxxIiISLVYYkREpFosMSIiUi2WmMLS0tKUjmBx3MfagftYO9S2fWSJERGRarHEiIhItVhiRESkWiwxIiJSLcVK7P3330dgYCA8PT3h6emJAQMG4NChQ8bloigiKioKbdu2RZMmTTBkyBD8+OOPSsUlIiIbpFiJubu7Y+nSpTh69CiSkpLwf//3fxg/fjy+//57AMD69esRHR2NVatW4euvv4abmxuGDx+OX3/9VanIRERkYxQrsSFDhmDAgAFo1aoVfHx8sHjxYjg7OyMlJQWiKCImJgZz5szB0KFD0b59e8TExKCoqAhxcXFKRSYiIhtjE+fEysrKEB8fj+LiYnTr1g2ZmZnIyclB3759jevUq1cPgYGBOHPmjIJJiYjIltRRcvAffvgBQUFBKCkpgZOTE3bu3AlfX19jUbm5uZms7+bmhps3b1a5zZreyK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, "metadata": {}, "output_type": "display_data" } ], "source": [ "empirical_hist_die(10)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "When the sample size increases, the empirical histogram begins to look more like the histogram of theoretical probabilities." ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAbEAAAEfCAYAAADPxvgvAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAhaElEQVR4nO3deVxVdeL/8fcRBRcsSJFUMBUolzExcRmXbzuWDmguKTbz6FFpLllZasqUOTk1V9Ns0tQsc0Yna0Kl0ZwmxyZb1DRbTGccC0NcUjFAMEiuI/f+/piH/ObGdohz77mHXs/Hg8ejs3A/7/MQenN2o7Cw0CsAAByogd0BAAD4sSgxAIBjUWIAAMeixAAAjkWJAQAcixIDADgWJQYAcCxKDADgWJSYzbKysuyO4HdsY/3ANtYP9W0bKTEAgGNRYgAAx6LEAACORYkBABzLthJbtGiRrr/+esXGxiouLk6jR4/WgQMHfNbxer1yuVzq1KmTLr/8cg0ZMkT//ve/bUoMAAg2tpXY9u3bdc8992jLli3atGmTGjZsqGHDhunMmTPl6zz33HNaunSp5s+fr3fffVdRUVG67bbb9N1339kVGwAQRBraNXBmZqbP9IoVK9SuXTvt2rVLt956q7xer5YvX66pU6dq6NChkqTly5crISFB69ev11133WVHbABAEAmac2LFxcXyeDyKiIiQJB05ckS5ubm64YYbytdp0qSJ+vXrp927d9uUEgAQTGzbE/uhWbNmqVu3burdu7ckKTc3V5IUFRXls15UVJROnjxZ5ec48Ua+QGZ2h7fU6fMB/tsltJWOHSkK2HCtQj0KK84L2HgXOfFnr7bYxvrBSduYkJBQ7fKgKLFf//rX2rVrl95++22FhIT4LDMMw2fa6/VWmPe/atrgYJOVlRXQzJ8UeDV3z7cBG0+S3O5ShYU1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p6u9PR0y8cGADif6RK76LvvvtPx48d15swZeb3eCsv79+9vSTAAAGpiusTOnDmjmTNn6o033lBZWVmF5RcvfS8oKLA0IAAAVTFdYg899JA2b96s8ePHq3///oqIiPBjLAAAama6xN555x1NmDBBTz31lD/zAABgmumbnUNDQxUXF+fPLAAA1IrpEhs6dKi2bt3qzywAANSK6RK7//77derUKU2cOFF79uzRqVOn9O2331b4AgAgUEyfE+vZs6cMw9DevXuVkZFR5XpcnQgACBTTJfbII49U+wBgAAACzXSJ8dQMAECw+VFvdi4rK1NBQYEuXLhgdR4AAEyrVYl99tlnGjZsmNq0aaP4+Hjt2LFDkpSfn6/bb79d77//vl9CAgBQGdMl9vHHH2vw4ME6fPiwxowZ4/PcxBYtWqi4uFh/+tOf/BISAIDKmC6x3/72t4qLi9Pu3bv1+OOPV1g+cOBAffLJJ5aGAwCgOqZL7LPPPtMvf/lLNW7cuNKrFNu2bevzAk0AAPzNdIk1aNBADRpUvXpubq6aNGliSSgAAMwwXWKJiYl6++23K112/vx5rVu3Tr1797YsGAAANTFdYg8//LA++OADTZkyRfv375cknTp1Su+8845SU1N1+PBhTZs2zW9BAQD4IdM3O19//fVasWKFZsyYoVdffVWSNGnSJHm9Xl166aVauXKlevXq5begAAD8kOkSk6SRI0dq8ODB2rZtm77++mt5PB516NBBN954o8LDw/2VEQCAStWqxCSpadOmGjJkiD+yAABQK6bPib311luaMWNGlctnzJhR5YUfAAD4g+kSW7Jkib7//vsql5eWluq5556zJBQAAGaYLrEDBw4oMTGxyuXdu3fXwYMHrcgEAIAppkvswoULOnfuXJXLz507J7fbbUkoAADMMF1iXbp00aZNm+TxeCos83g82rRpkzp16mRpOAAAqmO6xCZOnKhPP/1UaWlp2rt3r9xut9xut/bu3auxY8fq008/1YQJE/yZFQAAH6YvsR8xYoQOHz4sl8ulrVu3SpIMw5DX65VhGJo5c6ZGjx7tt6AAAPxQre4Tmz59ukaOHKk333xTOTk58nq96tChg1JSUtS+fXs/RQQAoHKmSuzcu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mzLA7imVcLpciIiJ8vq688kq7Y1nu1KlTmjhxouLi4hQdHa0+ffpo+/btdseyRNDviUnSuHHjNG7cOLtjWKakpERdunRRWlqaJk6caHccv9i+fbvuueceXXPNNfJ6vfrd736nYcOGaffu3YqMjLQ7niXatGmjJ554QnFxcfJ4PHrttdd0xx136L333tPPfvYzu+NZas+ePVq9erW6du1qdxTLJSQkaPPmzeXTISEhNqaxXmFhoQYNGqS+ffsqIyNDLVq00JEjR+rNdQWOKLH6Jjk5WcnJyZKkyZMn25zGPzIzM32mV6xYoXbt2mnXrl269dZbbUplrSFDhvhMz549Wy+//LL27NlTr0qsqKhI48eP15IlS/T000/bHcdyDRs2VHR0tN0x/Gbx4sW6/PLLtWLFivJ57du3ty+QxYL+cCLqh+LiYnk8HkVERNgdxS/Kysq0YcMGlZSUqHfv3nbHsdTUqVM1dOhQXXvttXZH8YucnBx17txZV199te6++27l5OTYHclSf/3rX9WzZ0/dddddio+P14ABA/Tiiy/K6w3a51zUCntiCIhZs2apW7du9e5/8P/617+UnJys0tJSNWvWTK+88kq9OuS2evVqZWdn+/wVX58kJSVp2bJlSkhIUF5enhYsWKDk5GTt2rVLl112md3xLJGTk6OXX35ZkydP1tSpU7V//37NnDlTknTvvffanK7uKDH43a9//Wvt2rVLb7/9dr0735CQkKAPP/xQRUVF2rRpkyZNmqTNmzerS5cudkers6ysLM2dO1d/+9vfFBoaanccv7j55pt9ppOSkpSYmKhXX31VU6ZMsSmVtTwej3r06KE5c+ZIkrp3767s7GytXLmSEgNqkp6erszMTL355pv16jj8RaGhoerYsaMkqUePHvrss8+0bNkyPf/88zYnq7uPP/5Y+fn5+vnPf14+r6ysTDt37tSqVat04sQJhYWF2ZjQeuHh4erUqZOys7PtjmKZ6OhoXXXVVT7zrrzySh0/ftymRNaixOA3M2fOVGZmpjZv3lwvL1uujMfj0fnz5+2OYYkhQ4aoR48ePvPuu+8+xcXF6eGHH66Xe2elpaXKysrSwIED7Y5imb59++rQoUM+8w4dOqTY2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Y/NjoQNCgxIIj8/ve/19y5c5WWlqbHHntMl112mUJCQrRo0SIdPny4fL2Lhwyr4/F4JEnr169Xw4YVf9UbNOC6LjgfJQYEkczMTA0YMKDCG75dLpfPdMeOHfWPf/xD3377bZV7YxfvQYuJial3byoGLuJPMSCIhISEyOv1vdZq9+7d+vjjj33mpaamSpJ+97vfVfiMi9+fmpqqhg0byuVyle+V/a+8vDyrYgO2YU8MCCK33nqr5s2bpwkTJqhfv376+uuv9cc//lGdOnVScXFx+XoDBw7U2LFj9Yc//EE5OTlKTk6WJO3Zs0ddu3bVtGnT1L59ez3xxBN69NFHddNNNyklJUWRkZE6duyY/v73vyspKUnPPvusXZsKWIISA4LIww8/rHPnzmndunXauHGjOnfurFWrVmnDhg3avn27z7rPP/+8unbtqj/96U+aM2eOwsPD1b17d/Xv3798nfvuu0/x8fFasmSJFi1apAsXLqh169bq27evfvWrXwV68wDLcZ8YAMCxOCcGAHAsSgwA4FiUGADAsSgxAIBjUWIAAMeixAAAjkWJAQAcixIDADgWJQYAcCxKDADgWP8PQc8UAf+piX8AAAAASUVORK5CYII=\n", "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "empirical_hist_die(100)" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAb4AAAEfCAYAAAA+zaOiAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAnw0lEQVR4nO3deVhU9eI/8PcBWVTQAUTcIBVGBVNRcLkiZWVjaYC5IViPj6ahZGmpCaWZS42pYa5czSwpNVEoDb129WapGGqmSZmGIgIpLiAgKIMw8/ujr/NrYhvwnFk479fz8Dz3bHPeH+y5b842RygsLNSBiIhIJmzMHYCIiMiUWHxERCQrLD4iIpIVFh8REckKi4+IiGSFxU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+nVdeeQU+Pj5Ys2YN4uLiUFFRgbZt22LAgAF48cUXTT08ItHxOT4iIpIVXuMjIiJZYfEREZGssPiIiEhWWHxERCQrLD4iIpIVFh8REckKi4+IiGSFxUdERLLC4iMiIllh8RERkaz8P2WyKKgHfXDAAAAAAElFTkSuQmCC\n", "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "empirical_hist_die(1000)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "As we increase the number of rolls in the simulation, the area of each bar gets closer to 16.67%, which is the area of each bar in the probability histogram.\n", "\n", "## The Law of Averages\n", "\n", "What we have observed above is an instance of a general rule.\n", "\n", "If a chance experiment is repeated independently and under identical conditions, then, in the long run, the proportion of times that an event occurs gets closer and closer to the theoretical probability of the event.\n", "\n", "For example, in the long run, the proportion of times the face with four spots appears gets closer and closer to 1/6.\n", "\n", "Here \"independently and under identical conditions\" means that every repetition is performed in the same way regardless of the results of all the other repetitions." ] } ], "metadata": { "anaconda-cloud": {}, "kernelspec": { "display_name": "Python 3", "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.8.5" } }, "nbformat": 4, "nbformat_minor": 1 }