{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "Homework 2\n", "====\n", "#### CHE 116: Numerical Methods and Statistics\n", "\n", "1/23/2020\n", "\n", "----" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# 1. Combinations and Permutation\n", "\n", "**For each problem, write out the number of objects ($n$), the length of the sequence/sample ($l$), if repeats are allowed, and if you are computing permutations or combinations.**\n", "\n", "1. [2 points] How many ways can you rearrange the letters in the word \"serif\"?\n", "2. [2 points] How many ways can you rearrange the letters in the word \"sans\"?\n", "3. [3 points] You are trying to decide which days of the week you will exercise. If you can exercise once or not at all on each day, how many ways can you choose?\n", "4. [3 points] You have instead decided that you should exercise four days per week. How many ways can you arrange your weekly exercise plan?\n", "5. [3 points] You are playing five games against your friend. You can either win, draw, or tie. How many possible scores (total number of wins, losses, ties) can occur?\n", "6. [3 points] You are playing five friends one at a time in the same type of game. How many scores are possible if you break them out per friend (wins, losses, ties against friend 1, wins losses ties against friend 2, ...)\n", "7. [5 points] You are manufacturing ink in a batch reactor. You need to manufactor five different colors per day and each color takes 1 hours. Assuming you can only begin/end on the hour, how many possibles schedules could you create?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# 2. Working with Probability Expressions\n", "\n", "Simplfiy the following expression and write in words the probability law or definition being used to go from the left-hand-side to the right-hand-side. There should be no intermediate steps. **Answer the following questions in Markdown**. Worth 2 points each\n", "\n", "$\\DeclareMathOperator{\\P}{P}$\n", "$\\DeclareMathOperator{\\E}{E}$\n", "\n", "\n", "1. $\\sum_{y \\in \\mathcal{Y}}\\P(X = 3 | Y = y)P(Y = y) = $\n", "\n", "\n", "2. If $y$ and $x$ are independent: $\\P(X = 0|Y = 1) = $\n", "\n", "\n", "3. $\\sum_{y \\in \\mathcal{Y}}\\P(X = -1, Y = y) = $\n", "\n", "\n", "4. $\\sum_{x \\in \\mathcal{X}}\\P(X = x | Y = 1) = $\n", "\n", "\n", "5. $\\frac{\\P(X = 4,Y = 1)}{\\P(Y = 1)} = $\n", "\n", "\n", "6. If $x,y$ are conditionally independent on $z$ : $\\P(X = 0 | Z = 0, Y = 1) = $" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# 3. Medical Diagnosis\n", "\n", "2019-nCoV (武汉肺炎, pronounced Wǔhàn fèiyán) is a new coronavirus first found in the city of Wuhan in the Hubei province of China. A new protocol has been suggested for screening people arriving from the Hubei region. We want to use this test to quarantine probable cases to prevent the spread of nCoV and predict probability of death. People can either not have nCov or have nCov and our test can be positive or negative and the person can be dead or alive from the disease. Let's take the random variable $C$ to indicate if the patient has nCov, $T$ to indicate if the test is positive, and $S$ to be their state (alive = 1) after 7 days. On our first day of testing, 1200 people were tested and 200 had a positive test. Follow-up testing of those 200 showed that 11 had confirmed infections by nCov. We also, to ensure accuracy, did additional tests on the 1,000 who had a negative test result and found that one had nCov. Separately, we know that out of the 560 confirmed cases of nCov, 17 people died from the disease. Using this information, answer the following question:\n", "\n", "1. [1 point] Write out the sample space\n", "\n", "2. [3 points] Write out three probability statements given by the prompt.\n", "\n", "3. [8 points] Make a markdown table showing the probability of every element in the state space. State any assumptions you make.\n", "\n", "3. [3 points] What is the probability of dying and having a positive test?\n", "\n", "4. [3 points] What is the probability of dying if your test was positive? So should you be worried about a positive test?\n", "\n", "5. [3 points] What is the probability of dying if your test was negative?\n", "\n", "5. [5 points] If we decide to use this test and 2,400 people arrive per day from Wuhan, how many will get through with nCov? Use $2,400 \\times P(C = 1, T = 0)$ Is this a good test?" ] } ], "metadata": { "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.7.3" } }, "nbformat": 4, "nbformat_minor": 2 }