{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "Homework 3\n", "====\n", "#### CHE 116: Numerical Methods and Statistics\n", "\n", "2/1/2018\n", "\n", "----" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "1. Manipulating Probability Expression (12 Points)\n", "-----\n", "\n", "Simplify the following probability expressions if possible. Some may be as simple as possible. Recall that $P(x)$ is shorthand for $P(X = x)$.\n", "\n", "\n", "1. $$\\sum_y P(y)$$\n", "1. $$\\sum_x P(x\\,|\\,y)$$\n", "2. $$\\sum_y P(x\\,|\\,y)$$\n", "3. $$\\sum_x P(x,y)$$\n", "4. $$P(x | y)P(y)$$\n", "5. $$\\frac{P(x\\,|\\, y) P(y)}{P(x)}$$\n", "6. $$\\sum_x P(y \\, |\\, x)P(x)$$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "2. Combinatorial Questions (16 Points)\n", "====\n", "\n", "*Answer these symbolically*\n", "\n", "1. [2 points] There are three people assigning five rooms in a house. How many room assignments are possible?\n", "2. [2 points] Students are handing in their homework in a pile. If there are 8 students, how many possible configurations of the pile are there?\n", "3. [2 points] You arrange 5 US currency notes in a row. US currency can be \\$1, \\$5, \\$10, \\$20, and \\$100. How many possible arrangements are possible?\n", "4. [2 points] You have a pendant molecule which has three *distinguishable* sites which can be decorated with a functional group. Assume that all sites are decorated. If you have 8 possible functional groups, how many unique molecules can you synthesize? You can use as many functional groups simultaneously as you want. \n", "5. [8 points] If you allow sites to be unreacted, so that you can have the pendant molecule with only 1 or 2 or 0 functional groups in addition to 3, how many unique molecules can you synthesize?\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "3. Loaded Die Problem (24 Points)\n", "====\n", "\n", "*Answer these symbolically*\n", "\n", "Let us continue our loaded die problem from unit 2, lecture 2. There are two possible dice being used. One is fair and one is unfair. Take $D = 0$ to indicate the fair die and $D = 1$ to indicate the unfair die. The unfair die has a probability of 90\\% of being chosen. The probability of a roll with the unfair die is $x / 21$, where $x$ is the value of the role. Answer the following questions symbolically. $X_i$ indicates the value of the roll on attempt $i$. The rolls are conditionally independent on the identity of the die. \n", "\n", "1. [4 points] Compute $P(X_0 = 3)$?\n", "\n", "2. [4 points] Compute $P(X_0, X_1 \\, | \\, D = 0)$?\n", "\n", "3. [2 points] Compute $P(D = 0, D = 1)$?\n", "\n", "4. [4 points] Compute $P(X_1 = 2,\\, X_0 = 4)$?\n", "\n", "4. [2 points] Describe in words what the following expression means:\n", "$$\n", "\\frac{P(X_1 = 6 \\,|\\, X_0 = 6)}{P(X_0 = 6)}\n", "$$\n", "\n", "5. [8 points] Calculate the above quantity and summarize in words what it means.\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "4. False Positives (28 Points)\n", "===\n", "\n", "*Answer Symbolically*\n", "\n", "One of the most famous applications of conditional probabilities is in medical tests. Consider a medical test for HIV. The test as a false positive rate of 2%. That means it indicates that someone has HIV when they *do not*. HIV has a false negative rate of 1%. That means the test indicates someone *does not* have HIV when in fact they do. The incidence rate of HIV is 0.3% in the US. Using this information, answer the following questions:\n", "\n", "1. [2 points] Write out the definition of a false negative and false positive using probability expressions.\n", "\n", "2. [2 points] Ignoring ethical concerns, if we randomly select someone, what is the probability that they have HIV?\n", "\n", "3. [6 points] If we randomly test someone for HIV, what is the probability that our test will show that they have HIV?\n", "\n", "4. [8 points] If a positive test indicates the presence of HIV, what is the probability that person has HIV? Is this surprising?\n", "\n", "5. [10 points] Assume each test is conditionally independent on whether or not the person has HIV. What is the probability that someone has HIV after two positive tests? The probabilities for false negative and positive are the same for the two tests." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "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.6.2" } }, "nbformat": 4, "nbformat_minor": 2 }