{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "Homework 2\n", "====\n", "#### CHE 116: Numerical Methods and Statistics\n", "\n", "Version 1.3 (1/19/2016)\n", "\n", "----" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "1. Combiations and Permutations (8 Points)\n", "====\n", "\n", "1. [1 point] How many ways can you rearrange the letters 'fodbar'?\n", "2. [1 point] How many ways can the 75 students in this class enter the classroom? How does that compare to the number of atoms in the universe $\\left(10^{80}\\right)$\n", "3. [1 point] A family may have up to 4 cars. On a street with 3 families, how many permutations of car ownership among the 3 familaies can their be?\n", "4. [1 point] You and your friends are playing a MOBA game and there are 100 characters you can use. You may only be one character. You play as a team of 5 characters with no repeated characters. How many character combinations can be on one team?\n", "5. [4 points] How many unqiue match-ups of 5 vs 5 teams can there be for this MOBA game? *Hint: This will be a product of a few equations. Start by asking how many combinations of 10 there are and then think about splitting those up into 2 teams*. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "2. Two Dice (8 Points)\n", "===\n", "\n", "1. What is the sample space size for 2 dice?\n", "2. [2 points] Is the sum of the 2 dice, $S(roll)$,an event, element of the sample space or random variable? What is $P(S = s)$?\n", "3. [2 points] What are the minimum and maximum values for $P(s)$ and $S$?\n", "4. [2 points] What is the expected value of $S$?\n", "5. You are playing the game craps, where on the first roll a sum of 2,3 and 12 results in an immediate loss. If you know that you lost after the first roll, what is the probability of the sum of dice? That is, what is $P(s\\,|\\, \\textrm{loss})$? Show your work using the *definition of a conditional distribution* equation." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "3. Playing the Lottery (13 Poitns)\n", "====\n", "To play the megamillions, you chose 5 unique numbers from 1 to 75 and then one number from 1 to 15 that can overlapp with the previous 5. The first 5 numbers are note replaced, meaning during the drawing there are no repeated numbers. Each ticket costs \\$2. Consider the following:\n", "\n", "1. [2 points] What is the sample space size for the lottery?\n", "2. [1 point] What is the probability of winning the lottery (matching all numbers)?\n", "3. [2 points] What is the expected value (in dollars) of the lottery as a function of jackpot amount? How big should the jackpot be for the expected value of playing exceed the cost of a ticket?\n", "4. [2 points] Assume that each ticket costs \\$2 and 50% goes to the jackpot (the other is kept for profit). How many people must be playing for the expected value to exceed the price of a ticket?\n", "5. [4 ponits] Given the answer from part 4, what is the probability that no one else wins? Answer symbolically and numerically. \n", "6. [2 points] Let's simplify (we'll revisit later) and assume that if someone else wins, you collect half the jackpot. What's the expected value now?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "4. Countries & Career (8 Points)\n", "=====\n", "\n", "You are a baby being carried in a stork to your parents. Your parents live in either:\n", "\n", "1. USA (u, 320)\n", "2. China (c, 1300)\n", "3. Germany (g, 80)\n", "\n", "The probability of your birth location is proportional to the populations. As a baby, you are concerned with your career options, which are\n", "\n", "1. Rock star (r)\n", "2. Professor (p)\n", "3. Doctor (d)\n", "\n", "Answer the following using $B$ as the random variable for birthplace and $J$ as the random variable for job. We have the following information:\n", "\n", "$$P(J = r \\,|\\, B = c) = 0.05$$\n", "\n", "$$P(J = d \\,|\\, B = c) = 0.5$$\n", "\n", "$$P(J = r \\,|\\, B = u) = 0.8$$\n", "\n", "$$P(J = p\\,|\\, B = u) = 0.01$$\n", "\n", "$$P(J = p\\,|\\, B = g) = 0.75$$\n", "\n", "$$P(J = d \\,|\\, B = g) = 0.2$$\n", "\n", "1. [2 points] What is the probability that you will be a rockstar?\n", "2. [2 points] What is the probability that you will be a professor born in China?\n", "3. [1 point] You were born in Germany, what's the probability of becoming a rock star?\n", "4. [2 points] Consider the random variable $Z$, which indicates if you have a college degree (true for $J=d$ and $J=p$). What is $P(Z \\,|\\, B=g)$?\n", "5. [1 points] What is $P(B=u \\,|\\, Z)$?\n" ] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.11" } }, "nbformat": 4, "nbformat_minor": 0 }