Overview

Due before class on October 23rd.

Fork the hw03 repository

Go here to fork the repo for homework 03.

Exercises on sample spaces and probability (10 points)

Complete each of the following exercises. Some exercises require an analytical answer, others require you to write code to complete the exercise. When writing your answer to analytical exercises, be sure to use appropriate \(\LaTeX\) mathematical notation.

Defining the sample space

Consider the experiment of rolling a pair of dice. Suppose we are interested in the sum of the face values showing on the dice. The sum of 2 dice could equal any value from 2 to 12; that is, \(2,3,4,5,6,7,8,9,10,11,12\). In view of this, a student remarked that since there are 6 even values – 2, 4, 6, 8, 10, 12 – but only 5 odd values – 3, 5, 7, 9, 11 – there would be, over many trials, more even than odd values. Do you agree?

Geniuses and chocolate

Out of the students in a class, 60% are geniuses, 70% love chocolate, and 40% fall into both categories. Determine the probability that a randomly selected student is neither a genius nor a chocolate lover.

Rolling the dice

We roll two fair 6-sided dice. Each one of the 36 possible outcomes is assumed to be equally likely.

  1. Find the probability that doubles are rolled.
  2. Given that the roll results in a sum of 4 or less, find the conditional probability that doubles are rolled.
  3. Find the probability that at least one die roll is a 6.
  4. Given that the two dice land on different numbers, find the conditional probability that at least one die roll is a 6.

A two-envelope puzzle

The release of two out of three prisoners has been announced, but their identity is kept secret. One of the prisoners considers asking a friendly guard to tell him who is the prisoner other than himself that will be released, but hesitates based on the following rationale: at the prisoner’s present state of knowledge, the probability of being released is \(2/3\), but after he knows the anser, the probability of being released will become \(1/2\), since there will be two prisoners (including himself) whose fate is unknown and exactly one of the two will be released. What is wrong with this line of reasoning?

The hunter

A hunter has two hunting dogs. One day, on the trail of some animal, the hunter comes to a place where the road diverges into two paths. He knows that each dog, indepdnent of the other, will choose the correct path with probability \(p\). The hunter decides to let each dog choose a path, and if they agree, take that one, and if they disagree, to randomly pick a path. Is his strategy better than just letting one of the two dogs decide on a path?

The king’s sibling

The king has only one sibling. What is the probability that the sibling is male? Assume that every birth results in a boy with probability \(1/2\), independent of other births. Be careful to state any additional assumptions you have to make in order to arrive at an answer.

The prickly professor

A particular class has had a history of low attendance. The annoyed professor decides that she will not lecture unless at least \(k\) of the \(n\) students enrolled in the class are present. Each student will independently show up with probability \(p_g\) if the weather is good, and \(p_b\) if the weather is bad.

  1. Given the probability of bad weather on a given day, obtain a mathematical expression for the probability that the professor will teach her class on that day.
  2. Identify the probability the professor teaches class for the following scenarios:
    1. \(n = 40, k = 20, p_g = 0.5\)
    2. \(n = 60, k = 20, p_g = 0.5\)
    3. \(n = 60, k = 20, p_g = 0.7\)
    4. \(n = 60, k = 50, p_g = 0.8\)
  3. Generate a graph that visualizes the probability that the professor teaches class on a given day for \(n=40, k = 20, 0 \leq p_g \leq 1\).

The birthday problem

Consider \(n\) people who are attending a party. We assume that every person has an equal probability of being born on any day during the year, independent of everyone else, and ignore the additional complication presented by leap years (i.e. assume that nobody is born on February 29).

  1. Define the sample space of all possible outcomes in terms of \(n\).
  2. Identify the generic function that defines the probability that each person has a distinct birthday.
  3. Write a function whose input is \(n\), the number of people attending a party, and whose output is the probability that every individual has a unique birthday.
  4. Generate a graph that visualizes the probability that every individual has a unique birthday for \(n\) in \([1,365]\).
  5. For what value of \(n\) is the probability that every individual has a unique variable approximately \(0.5\)?

Submit the assignment

Your assignment should be submitted as an R Markdown document rendered as an HTML document. Don’t know what an R Markdown document is? Read this! Or this! I have included starter files for you to modify to complete the assignment, so you are not beginning completely from scratch.

Follow instructions on homework workflow. As part of the pull request, you’re encouraged to reflect on what was hard/easy, problems you solved, helpful tutorials you read, etc.

This work is licensed under the CC BY-NC 4.0 Creative Commons License.