SHARE
TWEET

Untitled

a guest Oct 21st, 2019 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {
  2.  "cells": [
  3.   {
  4.    "cell_type": "markdown",
  5.    "metadata": {},
  6.    "source": [
  7.     "Before you turn this problem in, make sure everything runs as expected. First, **restart the kernel** (in the menubar, select Kernel$\\rightarrow$Restart) and then **run all cells** (in the menubar, select Cell$\\rightarrow$Run All).\n",
  8.     "\n",
  9.     "Make sure you fill in any place that says `YOUR CODE HERE` or \"YOUR ANSWER HERE\", as well as your name and collaborators below:"
  10.    ]
  11.   },
  12.   {
  13.    "cell_type": "code",
  14.    "execution_count": null,
  15.    "metadata": {},
  16.    "outputs": [],
  17.    "source": [
  18.     "NAME = \"Alfonso Santacruz Garcia\"\n",
  19.     "COLLABORATORS = \"\""
  20.    ]
  21.   },
  22.   {
  23.    "cell_type": "markdown",
  24.    "metadata": {},
  25.    "source": [
  26.     "---"
  27.    ]
  28.   },
  29.   {
  30.    "cell_type": "markdown",
  31.    "metadata": {
  32.     "deletable": false,
  33.     "editable": false,
  34.     "nbgrader": {
  35.      "checksum": "fe57a13a2ba710371e280641c9f21c35",
  36.      "grade": false,
  37.      "grade_id": "cell-90b6f68e307cf4d7",
  38.      "locked": true,
  39.      "schema_version": 1,
  40.      "solution": false
  41.     }
  42.    },
  43.    "source": [
  44.     "# CS110 Pre-class Work 4.2\n",
  45.     "\n",
  46.     "## Part A. The Hire-Assistant Problem.\n",
  47.     "\n",
  48.     "Imagine that you need to hire a new assistant. Every day an agency sends a new assistant for you to interview. If the assistant is better than your current assistant, then you fire your current assistant and you hire the better assistant. You may assume that assistant quality is uniformly distributed between 0 and 1.\n",
  49.     "\n",
  50.     "## Question 1.\n",
  51.     "Write a function, named hire_assistant, that takes applicants (a list of the numbers that represent the level of qualification of the applicants; the higher the number, the better qualified), and returns the number hires if the applicants are presented in the exact same order as the input list applicants. Note that your function should not randomize anything (or else it would be called a randomized algorithm)."
  52.    ]
  53.   },
  54.   {
  55.    "cell_type": "code",
  56.    "execution_count": 3,
  57.    "metadata": {
  58.     "deletable": false,
  59.     "nbgrader": {
  60.      "checksum": "3e823066b88c3701b5aa6feb0b29ea00",
  61.      "grade": false,
  62.      "grade_id": "cell-d011f5f4707fe41a",
  63.      "locked": false,
  64.      "schema_version": 1,
  65.      "solution": true
  66.     }
  67.    },
  68.    "outputs": [],
  69.    "source": [
  70.     "def hire_assistant(applicants):\n",
  71.     "    \"\"\"\n",
  72.     "    Return the number of assistant hired.\n",
  73.     "    Inputs:\n",
  74.     "    - applicants: a list of the numbers that represent the level of qualification of \n",
  75.     "    the applicants; the higher the number, the better qualified\n",
  76.     "    \n",
  77.     "    Outputs:\n",
  78.     "    - hires: Number of assistants hired\n",
  79.     "    \"\"\"\n",
  80.     "    best = -1000 #Declares an intitial hyperdubm applicant. This is a very bad score such that we select someone from the pool\n",
  81.     "    hired = 0 #Counter for the number of applicants we hire\n",
  82.     "    for i in range(len(applicants)): #Loop to go applicant by applicant and check their hiring score\n",
  83.     "        if applicants[i] > best: #This conditional checks whether the applicant is better than the one selected so far\n",
  84.     "            best = i #If the condition is met, we hire the applicant and fire the previous best so far. Substitute.\n",
  85.     "            hired += 1 #Add one to the counter to keep a record of how many applicants we have hired\n",
  86.     "    return hired #After the loop, or after we checked all the applicants, we return the number of hires we did in the whole process\n",
  87.     "    # YOUR CODE HERE\n",
  88.     "    raise NotImplementedError()"
  89.    ]
  90.   },
  91.   {
  92.    "cell_type": "code",
  93.    "execution_count": 4,
  94.    "metadata": {
  95.     "deletable": false,
  96.     "editable": false,
  97.     "nbgrader": {
  98.      "checksum": "1cf91a3b99ed87bfe9ea81d9a9252e16",
  99.      "grade": true,
  100.      "grade_id": "cell-66778b97ad66f71e",
  101.      "locked": true,
  102.      "points": 1,
  103.      "schema_version": 1,
  104.      "solution": false
  105.     }
  106.    },
  107.    "outputs": [],
  108.    "source": [
  109.     "assert(hire_assistant([1])==1)\n",
  110.     "assert(hire_assistant([-1, -2, -3, -4])==1)"
  111.    ]
  112.   },
  113.   {
  114.    "cell_type": "markdown",
  115.    "metadata": {
  116.     "deletable": false,
  117.     "editable": false,
  118.     "nbgrader": {
  119.      "checksum": "950e8b4c047988bb6493460be72d1bc7",
  120.      "grade": false,
  121.      "grade_id": "cell-e5d810828093b20d",
  122.      "locked": true,
  123.      "schema_version": 1,
  124.      "solution": false
  125.     }
  126.    },
  127.    "source": [
  128.     "## Question 2. \n",
  129.     "Assuming the applicants are presented in a random order, write a function that receives the number of applicants as input and returns the average number of assistants hired.\n",
  130.     "\n",
  131.     "**N.B.:** Don’t forget to run the simulation several times for each given number of applicants to better estimate the number of hires (please refer to task 3 of the Study Guide)."
  132.    ]
  133.   },
  134.   {
  135.    "cell_type": "code",
  136.    "execution_count": 5,
  137.    "metadata": {
  138.     "deletable": false,
  139.     "nbgrader": {
  140.      "checksum": "7038d9d8cc9239d5ca15f5d21aa986e3",
  141.      "grade": true,
  142.      "grade_id": "cell-b223520ca72942a0",
  143.      "locked": false,
  144.      "points": 0,
  145.      "schema_version": 1,
  146.      "solution": true
  147.     }
  148.    },
  149.    "outputs": [
  150.     {
  151.      "data": {
  152.       "text/plain": [
  153.        "0.53"
  154.       ]
  155.      },
  156.      "execution_count": 5,
  157.      "metadata": {},
  158.      "output_type": "execute_result"
  159.     }
  160.    ],
  161.    "source": [
  162.     "import random #import random library\n",
  163.     "def experimental_hires(N):\n",
  164.     "    hired = 0 #Counter for the number of hires we have done so far\n",
  165.     "    # YOUR CODE HERE\n",
  166.     "    for i in range(N): #Loop to randomly toss the hiring of each applicant\n",
  167.     "        if random.randint(0,1) == 1: #tosses a random number for either 1 or 0. 1 means hired, 0 means not hired.\n",
  168.     "            hired += 1 #If the random generator tossed 1, then we hired the applicant. We add the number of applicants hired so far\n",
  169.     "    return hired/N #determines the average of the total hires by dividing by the total number of applicants.\n",
  170.     "    raise NotImplementedError()"
  171.    ]
  172.   },
  173.   {
  174.    "cell_type": "markdown",
  175.    "metadata": {
  176.     "deletable": false,
  177.     "editable": false,
  178.     "nbgrader": {
  179.      "checksum": "7f78b31a96cb5ddc8eb534ab037d9fee",
  180.      "grade": false,
  181.      "grade_id": "cell-a55a7b3d12ef78bb",
  182.      "locked": true,
  183.      "schema_version": 1,
  184.      "solution": false
  185.     }
  186.    },
  187.    "source": [
  188.     "## Question 3.\n",
  189.     "\n",
  190.     "Use the function below, `analytical_hires(N)`, which returns the analytical expected number of hires, given the number of applicants, along with the function you created in question 2 to create a graph with two curves such that:\n",
  191.     "* The x-axis shows the total number of applicants (make sure label the x-axis)\n",
  192.     "* The y-axis shows the average number of hires (make sure label the y-axis)\n",
  193.     "* The graph contains two curves;\n",
  194.     "    * Curve 1: the theoretical performance estimates computed calls to the function `analytical_hires`.\n",
  195.     "    * Curve 2: the simulated or experimental estimates using the function you created in question 2.\n"
  196.    ]
  197.   },
  198.   {
  199.    "cell_type": "code",
  200.    "execution_count": 6,
  201.    "metadata": {
  202.     "deletable": false,
  203.     "editable": false,
  204.     "nbgrader": {
  205.      "checksum": "1e514458253b863a6c69ce09ccd2d9de",
  206.      "grade": false,
  207.      "grade_id": "cell-4092502cb05933d4",
  208.      "locked": true,
  209.      "schema_version": 1,
  210.      "solution": false
  211.     }
  212.    },
  213.    "outputs": [],
  214.    "source": [
  215.     "def analytical_hires(N):\n",
  216.     "    \"\"\"\n",
  217.     "    Return the analytical expected number of hires if there are N applicants\n",
  218.     "    Inputs:\n",
  219.     "    - N: Number of applicants\n",
  220.     "    Outputs:\n",
  221.     "    - hires: Average number of assistants hired\n",
  222.     "    \"\"\"\n",
  223.     "    # from the textbook, we know that the analytical result is \n",
  224.     "    # 1 + 1/2 + 1/3 + ... + 1/N\n",
  225.     "    hires = 0\n",
  226.     "    for n in range(N):\n",
  227.     "        hires += 1/(n+1)\n",
  228.     "    return hires"
  229.    ]
  230.   },
  231.   {
  232.    "cell_type": "code",
  233.    "execution_count": 18,
  234.    "metadata": {
  235.     "deletable": false,
  236.     "nbgrader": {
  237.      "checksum": "055b3a48707a83f9330ab3b00c45144a",
  238.      "grade": true,
  239.      "grade_id": "cell-f9c07920c069ce20",
  240.      "locked": false,
  241.      "points": 0,
  242.      "schema_version": 1,
  243.      "solution": true
  244.     }
  245.    },
  246.    "outputs": [
  247.     {
  248.      "data": {
  249.       "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3df4wc533f8ff39kjzzhZJW8cINKm7oxHFDRW0oX11nbpQXNtAJDe2asEtpCqIG6g+QLLb2HUayGVrxyrYIHURp0EktQfHsWOxVvyDThhDqtE6DgQUteuTGP+gJSaURFI0zxTpSCfVR4U88ts/Zpec25vZndmd2Zl99vMCFnczO7f7zI/7zjPP851nzN0REZHhN1Z1AUREpBgK6CIigVBAFxEJhAK6iEggFNBFRAIxXtUXT01N+ezsbFVfLyIylB599NGz7r4t6b3KAvrs7CyLi4tVfb2IyFAys+Np76nJRUQkEAroIiKBUEAXEQmEArqISCAU0EVEAqGALiISCAV0EZFAKKCLiASia0A3s0+Z2bNm9r2U983MftfMjprZd8zsdcUXc70Tyys8/ORpDhxZ4uEnT3NieSV6Y/9+mJ2FsbHo5/79gyiOiEjlstTQPw3c2OH9m4Drmq954P7+i9XZieUVDp1e5tzqJQDOrV7i0Ollzn7yD2B+Ho4fB/fo5/y8grqIjISuAd3dHwH+usMiNwN/6JFvAFvNbHtRBUxy+OyLXGx70NJFh5d/9COwsrL2jZUV2Lu3zOKIiNRCEW3oO4BnYtMnm/PWMbN5M1s0s8UzZ870/IWtmnm7TUs/SP6DEyd6/i4RkWFRREC3hHmJDyp19wV3n3P3uW3bEgcLy2RiPLnYL21PPI/A9HTP3yUiMiyKCOgngWtj0zuBUwV8bq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Kk2XZ8M7ALeDXwcqJmh3Yh7eNOSju+hy2gnwSujU3vBE5VVJbSmNkGomC+390PNGefbl2WNX8+W1X5CvYm4J1mdoyoCe0tRDX2rc3LcwhvP58ETrr7N5vTXyQK8KHu47cBT7v7GXe/ABwA/j5h72NI35+lxbFhC+jfAq5r9o5vJOpYOVhxmQrVbD/+feBxd//t2FsHgfc0f38P8CeDLlsZ3P3D7r7T3WeJ9uefufvtwNeBdzcXC2Z9Adz9h8AzZvba5qy3At8n0H1M1NTyRjObbB7frfUNdh83pe3Pg8AvN7Nd3ggst5pm+ubuQ/UC3g78JfAksLfq8pSwfv+A6PLrO8BfNF9vJ2pX/hrwV82fr6q6rCWs+5uBrzR/fw3wf7AiHBcAAABzSURBVIGjwBeAl1VdvoLX9WeBxeZ+/mPglSHvY+BjwBPA94DPAi8LaR8DnyPqH7hAVAO/I21/EjW53NuMYd8lyv4ppBy69V9EJBDD1uQiIiIpFNBFRAKhgC4iEggFdBGRQCigi4gEQgFdRCQQCugiIoH4/7Oq3JCUMrI1AAAAAElFTkSuQmCC\n",
  250.       "text/plain": [
  251.        "<Figure size 432x288 with 1 Axes>"
  252.       ]
  253.      },
  254.      "metadata": {
  255.       "needs_background": "light"
  256.      },
  257.      "output_type": "display_data"
  258.     }
  259.    ],
  260.    "source": [
  261.     "# YOUR CODE HERE\n",
  262.     "import matplotlib.pyplot as plt #imports necesary libraries\n",
  263.     "import numpy as np\n",
  264.     "num_app = [] #declares necessary variables. This one is an empty list to store the number of applicants in each iteration\n",
  265.     "avg_an = [] #stores each value for the average hire using analytical approach on each iteration\n",
  266.     "avg_exp = [] #stores each value for the average hire using analytical approach on each iteration\n",
  267.     "prob_one_hired = [] #stores the values for the probability of at least having one hired on each iteration\n",
  268.     "for i in range(100): #iterates for 100 diferent samples of applicants\n",
  269.     "    N = random.randint(1,100) #pseudorandomly generates a sample of applicants which quantity is between 1 and 100\n",
  270.     "    num_app.append(N) #stores the number of applicants and adds it to the list\n",
  271.     "    avg_an.append(analytical_hires(N)/N) #uses the function analytical hires and then gets the average with respect to N\n",
  272.     "    avg_exp.append(experimental_hires(N)) ##uses the function experimental hires and then gets the average with respect to N\n",
  273.     "    prob_one_hired.append(random.randint(0,1)/N) #calculates the probability of one being hired given the total amount of applicants\n",
  274.     "plt.scatter(num_app,avg_an,color='lightblue') #plots using matplotlib\n",
  275.     "plt.scatter(num_app,avg_exp,color = 'red')\n",
  276.     "plt.show()\n",
  277.     "#aise NotImplementedError()"
  278.    ]
  279.   },
  280.   {
  281.    "cell_type": "code",
  282.    "execution_count": 43,
  283.    "metadata": {},
  284.    "outputs": [
  285.     {
  286.      "data": {
  287.       "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3dd5wU9fkH8M8DR5EOcqJS5FAwIqLCiaDEBhqwYPmBQiKKBIkaYkENGCOxRRNN7ERDrNgQRQUVg0SRqIg0KQICRxOE0EQ6XNnn98ez48zu7d72273h83695jV1Z56dnXnmO9+ZnRFVBRERVX3Vsh0AERGlBxM6EZFPMKETEfkEEzoRkU8woRMR+URethbctGlTbd26dbYWT0RUJc2dO3erquZHGpe1hN66dWvMmTMnW4snIqqSRGRttHGsciEi8gkmdCIin2BCJyLyCSZ0IiKfYEInIvIJJnQiIp9gQici8gn/JPT9+4HnngMCgWxHQkSUFf5J6BMnAkOGADNmZDsSIqKs8E9CX73a2suXZzcOIqIs8U9CX7PG2itWZDUMIqJs8V9CZwmdiA5S/knoa4PPq2EJnYgOUv5I6KqhVS6804WIDkL+SOibN9ttix06WPv777MdERFRpfNHQneqW84919qsRyeig5A/ErpT3dKzp7VZj05EByF/JfTTTwcOOYQl9GR8/jlw7LHAxo3ZjoSIk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163jmVQuXHqwA+EpG5Yu9qBYBmqroRsA0NwGFZig2wZ+J7d7BcWGdA4usoGzEOhpXiHAUi8rWITBeRnweHNQ/GUllxJfL7VfY6+zmATaq6wjOs0tdZWJ7IynaWywk9rveUZjwIkXoAJgC4WVV3AngawNEATgKwEXaqB1R+vKeraicAvQH8VkTOqGDaSo1N7M1WfQC8GRyUK+usItFiqex1dyeAUgCvBgdtBNBKVU8GMBzAayLSoJLjSvT3q+zfdQBCCw+Vvs4i5Imok0aJIS2x5XJCj+ddphklIjVgP9Krqvo2AKjqJlUtU9UAgH/BrSKo1HhVdUOwvRnAO8E4NjlVKcH25mzEBjvIzFPVTcEYc2KdBSW6jiotxuCFsAsB/CpYJYBgdca2YPdcWN10u2Bc3mqZjMWVxO9XmessD8BlAN7wxFup6yxSnkCWtrNcTujxvMs0Y4L1cs8BWKqqj3iGe+ueLwXgXHWfBKC/iNQSkQIAbWEXYDIRW10Rqe90wy6ofYPQd7teDWCiJ7arglfYuwLY4ZwOZkhIiSkX1plHoutoCoDzRKRxsKrhvOCwtBKRXgBGAOijqns9w/NFpHqwuw1sHa0KxrZLRLoGt9WrPN8l3bEl+vtV5r7bE8C3qvpTVUplrrNoeQLZ2s5SucKb6QZ2RXg57Ah7ZyUvuzvslGchgPnB5nwALwNYFBw+CcARns/cGYx1GdJwx0EFsbWB3TmwAMBiZ90AOBTAxwBWBNtNgsMFwOhgbIsAFGYwtjoAtgFo6BmWlXUGO6hsBFACKwH9Opl1BKvTLgo212QoriJYHaqzrT0TnPb/gr/xAgDzAFzkmU8hLLmuBPAUgv/8zkBsCf9+6d53I8UVHP4igOvCpq20dYboeSIr2xn/+k9E5BO5XOVCREQJYEInIvIJJnQiIp9gQici8gkmdCIin2BCJyLyCSZ0IiKf+H+WusE5jyw57gAAAABJRU5ErkJggg==\n",
  288.       "text/plain": [
  289.        "<Figure size 432x288 with 1 Axes>"
  290.       ]
  291.      },
  292.      "metadata": {
  293.       "needs_background": "light"
  294.      },
  295.      "output_type": "display_data"
  296.     }
  297.    ],
  298.    "source": [
  299.     "#this method increases the number of applicants rather than generating a pesudorandom sample number of applicants\n",
  300.     "#as a result we can use a linear plot instead of a scatter plot\n",
  301.     "num_app = []\n",
  302.     "avg_an = []\n",
  303.     "avg_exp = []\n",
  304.     "prob_one_hired = []\n",
  305.     "N = 10\n",
  306.     "for i in range(100):\n",
  307.     "    N +=20\n",
  308.     "    num_app.append(N)\n",
  309.     "    avg_an.append(analytical_hires(N)/N)\n",
  310.     "    avg_exp.append(experimental_hires(N))\n",
  311.     "    prob_one_hired.append(random.randint(0,1)/N)\n",
  312.     "plt.plot(num_app,avg_an,color='blue')\n",
  313.     "plt.plot(num_app,avg_exp,color = 'red')\n",
  314.     "plt.show()"
  315.    ]
  316.   },
  317.   {
  318.    "cell_type": "markdown",
  319.    "metadata": {
  320.     "deletable": false,
  321.     "editable": false,
  322.     "nbgrader": {
  323.      "checksum": "f5c0fc54ac7e38140eacf7a0d3877a00",
  324.      "grade": false,
  325.      "grade_id": "cell-8720f8d8a6a98422",
  326.      "locked": true,
  327.      "schema_version": 1,
  328.      "solution": false
  329.     }
  330.    },
  331.    "source": [
  332.     "## Question 4.\n",
  333.     "\n",
  334.     "Plot a graph with the x-axis showing the total number of applicants and the y-axis showing the probability that exactly one assistant is hired."
  335.    ]
  336.   },
  337.   {
  338.    "cell_type": "code",
  339.    "execution_count": 19,
  340.    "metadata": {
  341.     "deletable": false,
  342.     "nbgrader": {
  343.      "checksum": "99500575978918dad34be4dfe49fff36",
  344.      "grade": true,
  345.      "grade_id": "cell-d3fe1b7d6d175ad7",
  346.      "locked": false,
  347.      "points": 0,
  348.      "schema_version": 1,
  349.      "solution": true
  350.     }
  351.    },
  352.    "outputs": [
  353.     {
  354.      "data": {
  355.       "text/plain": [
  356.        "<matplotlib.collections.PathCollection at 0x1c6f8b6a8c8>"
  357.       ]
  358.      },
  359.      "execution_count": 19,
  360.      "metadata": {},
  361.      "output_type": "execute_result"
  362.     },
  363.     {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n6ZtKbH1HxB+r9CjOSnnrdq+k34iSFyTdYPv7VzvvTgj0zZLeqJieLbcly/awSs9nfVHSP4iIb0ql0Jf0fe2rrCUOS/qkpMvl6Zsk/W1EXCpPp7i+f0DSnKRfLw81fdb2RiW+riPiryT9N0kzKgX5vKRTSn99S/nrtqn51gmB7oy2ZM+1tH29pP8p6eMR8X/aXU8r2f4JSW9FxKnK5oyuqa3vHknvk3Q0Im6W9G0lNrySpTxuvFfSNkn/UNJGlYYcqqW2vmtp6ue9EwJ9VtLWiuktkt5sUy0tZbtXpTCfjIiny81/s/gVrPzft9pVXwvsknSP7bMqDaX9mEp77DeUv5JLaa7vWUmzEfFiefoplQI+5XUtSR+Q9I2ImIuIi5KelvRPlf76lvLXbVPzrRMC/SVJ28tHwq9R6SDKsTbX1HTlseNfk/RqRPz3ipeOSXqg/PMDkn73StfWKhHx8xGxJSKGVVqvfxgRo5Kek/ShcrekllmSIuKvJb1h+x+Vm3ZLOqOE13XZjKTbbPeVP++Ly530+i7LW7fHJH2kfLbLbZLmF4dmViUirvp/ku6U9L8l/aWk/e2up0XL+M9U+qr1sqQ/Lf+7U6Ux5ZOS/qL83xvbXWuLlv92SV8q//wDkv6XpGlJvy3p2nbX14Ll/SeSpsrr+3ckfe96WNeSDkj6c0lfl/S4pGtTW9+SvqjSMYKLKu2BP5i3blUacnm0nG2nVToDaNXz5tJ/AEhEJwy5AAAKINABIBEEOgAkgkAHgEQQ6ACQCAIdABJBoANAIv4/nMESWK/9VfIAAAAASUVORK5CYII=\n",
  366.       "text/plain": [
  367.        "<Figure size 432x288 with 1 Axes>"
  368.       ]
  369.      },
  370.      "metadata": {
  371.       "needs_background": "light"
  372.      },
  373.      "output_type": "display_data"
  374.     }
  375.    ],
  376.    "source": [
  377.     "# YOUR CODE HERE\n",
  378.     "plt.scatter(num_app,prob_one_hired,color='green') #plots from the values obtained two cells above\n",
  379.     "#raise NotImplementedError()"
  380.    ]
  381.   },
  382.   {
  383.    "cell_type": "markdown",
  384.    "metadata": {
  385.     "deletable": false,
  386.     "editable": false,
  387.     "nbgrader": {
  388.      "checksum": "998ef0b673bc47c929e5543e6f86ccb2",
  389.      "grade": false,
  390.      "grade_id": "cell-2bd2500c3ca4cf02",
  391.      "locked": true,
  392.      "schema_version": 1,
  393.      "solution": false
  394.     }
  395.    },
  396.    "source": [
  397.     "## [Optional] Question 5.\n",
  398.     "Assume that an assistant is able to perform an amount of work each day that is equal to their “quality”. You have a total amount of work M that needs to be accomplished. Your costs are as follows:\n",
  399.     "* X = daily salary for the assistant,\n",
  400.     "* Y = fee to the employment agency,\n",
  401.     "* Z = retrenchment fee for the old assistant.\n",
  402.     "\n",
  403.     "Try to formulate an optimal stopping rule (ie. at what point should one stop requesting new potential hires from the agency?) Make any necessary assumptions to ensure the problem is well-formulated.\n"
  404.    ]
  405.   },
  406.   {
  407.    "cell_type": "code",
  408.    "execution_count": null,
  409.    "metadata": {
  410.     "deletable": false,
  411.     "nbgrader": {
  412.      "checksum": "43b6a51878665a39b0ede1313448eaa6",
  413.      "grade": true,
  414.      "grade_id": "cell-af2f0291eced6982",
  415.      "locked": false,
  416.      "points": 0,
  417.      "schema_version": 1,
  418.      "solution": true
  419.     }
  420.    },
  421.    "outputs": [],
  422.    "source": [
  423.     "# YOUR CODE HERE\n",
  424.     "raise NotImplementedError()"
  425.    ]
  426.   },
  427.   {
  428.    "cell_type": "markdown",
  429.    "metadata": {
  430.     "deletable": false,
  431.     "editable": false,
  432.     "nbgrader": {
  433.      "checksum": "b0c67a7805b6596f1ba87521c45df302",
  434.      "grade": false,
  435.      "grade_id": "cell-92211f5b42929c46",
  436.      "locked": true,
  437.      "schema_version": 1,
  438.      "solution": false
  439.     }
  440.    },
  441.    "source": [
  442.     "## Part B. The Hat Check Problem.\n",
  443.     "\n",
  444.     "There is a coat check at a party, where an attendant stores everyone’s hat while they attend the party. The attendant receives the N hats from everyone attending (all attendees come with a hat). Unfortunately, the coat check attendant forgets which hat belongs to whom. Rather than admitting a mistake, the attendant simply returns random hats back to the party goers. \n",
  445.     "What is the average number of correct hats returned? Here are some guiding questions to help you to simulate this problem. \n",
  446.     "\n",
  447.     "## Question 1. \n",
  448.     "Knowing that everyone’s hats are unique and every guest has a hat. Do you need to generate a random sample in a similar way as what you did for the hiring assistant problem? "
  449.    ]
  450.   },
  451.   {
  452.    "cell_type": "markdown",
  453.    "metadata": {
  454.     "deletable": false,
  455.     "nbgrader": {
  456.      "checksum": "259c6115bee56676178f28ab36d6db2f",
  457.      "grade": true,
  458.      "grade_id": "cell-e786799fc4eb1499",
  459.      "locked": false,
  460.      "points": 0,
  461.      "schema_version": 1,
  462.      "solution": true
  463.     }
  464.    },
  465.    "source": [
  466.     "Yes. At the end, the coat check will randomly select a hat from the sample and give it to one of the attendants. However the selection does not need to be randomly generated if we:\n",
  467.     "Create an array of hats called \"h\" which len(h) = N, which is the number of attendants. We use h.pop() and give that hat to the first attendant that comes to pick one, until all h = [], an empty list.\n",
  468.     "Other, we could pseudo randomly generate a number between 1 and N. This number would be the index of the hat which we will pop out to give to the attendant. This index should be stored, so that if we get it again in the random generation, we have to randomly generate one again until getting one we have not selected yet. This would get more difficult as we approach to 0 hats left."
  469.    ]
  470.   },
  471.   {
  472.    "cell_type": "markdown",
  473.    "metadata": {
  474.     "deletable": false,
  475.     "editable": false,
  476.     "nbgrader": {
  477.      "checksum": "c9f8182f3dd59f572cb797f373fb7464",
  478.      "grade": false,
  479.      "grade_id": "cell-e2f68e2bd4c2d099",
  480.      "locked": true,
  481.      "schema_version": 1,
  482.      "solution": false
  483.     }
  484.    },
  485.    "source": [
  486.     "## Question 2. \n",
  487.     "Which of the following commands do you think is the Pythonic way to implement that? \n",
  488.     "```\n",
  489.     "import numpy as np\n",
  490.     "n = 100 #the number of party attendants `\n",
  491.     "```\n",
  492.     "**Command 1. **\n",
  493.     "```\n",
  494.     "hat_list = [np.random.integers(0,n) for i in range(n)]`\n",
  495.     "```\n",
  496.     "**Command 2.**\n",
  497.     "```\n",
  498.     "hat_list = list(range(n)) \n",
  499.     "np.random.shuffle(hat_list) \n",
  500.     "```\n",
  501.     "**Command 3.**\n",
  502.     "```\n",
  503.     "hat_list = np.random.sample(n)\n",
  504.     "```"
  505.    ]
  506.   },
  507.   {
  508.    "cell_type": "markdown",
  509.    "metadata": {
  510.     "deletable": false,
  511.     "nbgrader": {
  512.      "checksum": "b5e83025692b2772640e9e58f0f36af1",
  513.      "grade": true,
  514.      "grade_id": "cell-b8da78e72c1c0738",
  515.      "locked": false,
  516.      "points": 0,
  517.      "schema_version": 1,
  518.      "solution": true
  519.     }
  520.    },
  521.    "source": [
  522.     "Command 2. It generates integers in the range of \"n\" and then shuffles as if they have all lost their number. The shuffle bring the mess to the problem."
  523.    ]
  524.   },
  525.   {
  526.    "cell_type": "markdown",
  527.    "metadata": {
  528.     "deletable": false,
  529.     "editable": false,
  530.     "nbgrader": {
  531.      "checksum": "ec25d5c32cc709928fa50666f21d9808",
  532.      "grade": false,
  533.      "grade_id": "cell-8915979a0b8cf6ce",
  534.      "locked": true,
  535.      "schema_version": 1,
  536.      "solution": false
  537.     }
  538.    },
  539.    "source": [
  540.     "## Question 3.\n",
  541.     "Now write a function `hat_check(N)` that has: \n",
  542.     "* Input: N the number of party attendants. \n",
  543.     "* Output: the number of hats correctly returned despite the fact that hats are randomly handed back to the guests.\n",
  544.     "\n",
  545.     "You should use the command you picked for question 2. "
  546.    ]
  547.   },
  548.   {
  549.    "cell_type": "code",
  550.    "execution_count": 33,
  551.    "metadata": {
  552.     "deletable": false,
  553.     "nbgrader": {
  554.      "checksum": "c37f6cdc2ca8cbb92644fa2746445779",
  555.      "grade": true,
  556.      "grade_id": "cell-c8499aeb1b1d76c7",
  557.      "locked": false,
  558.      "points": 0,
  559.      "schema_version": 1,
  560.      "solution": true
  561.     }
  562.    },
  563.    "outputs": [
  564.     {
  565.      "data": {
  566.       "text/plain": [
  567.        "2"
  568.       ]
  569.      },
  570.      "execution_count": 33,
  571.      "metadata": {},
  572.      "output_type": "execute_result"
  573.     }
  574.    ],
  575.    "source": [
  576.     "# YOUR CODE HERE\n",
  577.     "def hat_check(N):\n",
  578.     "    correct = 0 #starts the counter of correctly delivered hats\n",
  579.     "    hat_list = list(range(N)) #creates a list from 0 to N of the number of hats that should be in the storage\n",
  580.     "    np.random.shuffle(hat_list) #randomly shuffles the hats.\n",
  581.     "    for i in range(N): #iterates for the number of hats\n",
  582.     "        if i == hat_list[i]: #if the index number is the number of the hat, that means the hat is where it supposed to be\n",
  583.     "            #if it is where it supposed to be, then it should be delivered to the correct owner\n",
  584.     "            correct += 1 #as a result of the last conditional, it counts the number of correctly delivered hats \n",
  585.     "    return correct #returns the number of correctly delivered hats\n",
  586.     "#raise NotImplementedError()"
  587.    ]
  588.   },
  589.   {
  590.    "cell_type": "markdown",
  591.    "metadata": {
  592.     "deletable": false,
  593.     "editable": false,
  594.     "nbgrader": {
  595.      "checksum": "1ff8b95312de63513a2107ffb7ab9d5a",
  596.      "grade": false,
  597.      "grade_id": "cell-086d4cc0fc5b0155",
  598.      "locked": true,
  599.      "schema_version": 1,
  600.      "solution": false
  601.     }
  602.    },
  603.    "source": [
  604.     "## Question 4.\n",
  605.     "\n",
  606.     "Plot a curve with the x-axis showing the total number of party attendants and the y-axis showing the average number of hats correctly returned. As always, remember to run several trials. "
  607.    ]
  608.   },
  609.   {
  610.    "cell_type": "code",
  611.    "execution_count": 40,
  612.    "metadata": {
  613.     "deletable": false,
  614.     "nbgrader": {
  615.      "checksum": "c4d1251529b962f3d3ce28f6ac9f244e",
  616.      "grade": true,
  617.      "grade_id": "cell-597031ea2a5a512a",
  618.      "locked": false,
  619.      "points": 0,
  620.      "schema_version": 1,
  621.      "solution": true
  622.     }
  623.    },
  624.    "outputs": [
  625.     {
  626.      "data": {
  627.       "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHd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r2svH2+93tD9/VtX5LrC/LwSwrV3f/wDgyEGvawAfBHA/gHsAfB7AikGsawBfhLpPMA8VaV+Yp24B/I/2/u8AcEGRPMmj/4IgCANCXZtcBEEQhIyI0AVBEAYEEbogCMKAIEIXBEEYEETogiAIA4IIXRAEYUAQoQuCIAwI/x8gXbBXVn1xbgAAAABJRU5ErkJggg==\n",
  628.       "text/plain": [
  629.        "<Figure size 432x288 with 1 Axes>"
  630.       ]
  631.      },
  632.      "metadata": {
  633.       "needs_background": "light"
  634.      },
  635.      "output_type": "display_data"
  636.     }
  637.    ],
  638.    "source": [
  639.     "# YOUR CODE HERE\n",
  640.     "def plot_good_hats(N):\n",
  641.     "    num_att = [] #declares an empty list for the number of attendees\n",
  642.     "    good_hat = [] #declares an empty list for the number of hats correctly delivered\n",
  643.     "    for i in range(100): #iterates several times\n",
  644.     "        num_att.append(N) #stores in the list the number of attendees each iteration\n",
  645.     "        good_hat.append(hat_check(N)) #stores in the list the number of correctly delivered hats in the iteration \n",
  646.     "        #this check happens according to the last function\n",
  647.     "        N += 10 #for each test, increases 10 attendees to simulate another party but now with 10 more attendees than last time\n",
  648.     "    plt.plot(num_att,good_hat,color = 'red') #plots\n",
  649.     "    plt.show()\n",
  650.     "\n",
  651.     "plot_good_hats(20)\n",
  652.     "#raise NotImplementedError()"
  653.    ]
  654.   },
  655.   {
  656.    "cell_type": "markdown",
  657.    "metadata": {
  658.     "deletable": false,
  659.     "editable": false,
  660.     "nbgrader": {
  661.      "checksum": "aad5d529ed9af56148bfc12691cdb950",
  662.      "grade": false,
  663.      "grade_id": "cell-f74b2078132a5177",
  664.      "locked": true,
  665.      "schema_version": 1,
  666.      "solution": false
  667.     }
  668.    },
  669.    "source": [
  670.     "## [Optional] Question 5.\n",
  671.     "As $N$ tends to infinity, the number of correct hats returned tends towards a well-known statistical distribution. State the distribution with all its parameters. Plot several samples using your code. Does the empirical distribution match your theoretical prediction?"
  672.    ]
  673.   },
  674.   {
  675.    "cell_type": "markdown",
  676.    "metadata": {
  677.     "deletable": false,
  678.     "nbgrader": {
  679.      "checksum": "33f94a80e6d5d9c371e6c39790bd67eb",
  680.      "grade": true,
  681.      "grade_id": "cell-32fe26c1d99fdd2a",
  682.      "locked": false,
  683.      "points": 0,
  684.      "schema_version": 1,
  685.      "solution": true
  686.     }
  687.    },
  688.    "source": [
  689.     "YOUR ANSWER HERE"
  690.    ]
  691.   }
  692.  ],
  693.  "metadata": {
  694.   "kernelspec": {
  695.    "display_name": "Python 3",
  696.    "language": "python",
  697.    "name": "python3"
  698.   },
  699.   "language_info": {
  700.    "codemirror_mode": {
  701.     "name": "ipython",
  702.     "version": 3
  703.    },
  704.    "file_extension": ".py",
  705.    "mimetype": "text/x-python",
  706.    "name": "python",
  707.    "nbconvert_exporter": "python",
  708.    "pygments_lexer": "ipython3",
  709.    "version": "3.7.4"
  710.   }
  711.  },
  712.  "nbformat": 4,
  713.  "nbformat_minor": 2
  714. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top