Homework 03: Probability

Due: Friday, March 5 11:59pm ET

Goals

General guidelines

Getting started

Packages

library(tidyverse)

Part I

Data

In a study from 1984, Kahneman and Tversky posed the following to 150 students: Imagine that you face the following pair of concurrent decisions. First examine both decisions, then indicate the options you prefer.

Decision 1 - Choose between:

Decision 2 - Choose between:

Kahneman and Tversky were interested in studying risky choices and the framing of those choices. The results of the choices by 150 students with respect to the above decision set, gamble versus sure-thing, when framed as gain versus loss can be accessed with the below code.

gamble <- read_table("http://users.stat.ufl.edu/~winner/data/riskgamble.dat",
                      col_names = FALSE)

Take a look at gamble. The Decision 1 response is in column 1, the Decision 2 response is column 2, and the counts are in column 3. The data is coded such that 1 = “A”, 2 = “B” in column 1, and 1 = “C”, 2 = “D” in column 2.

  1. Mutate gamble so it looks like the tibble below. Overwrite gamble.

    # A tibble: 4 x 3
      decision_1 decision_2 count
      <chr>      <chr>      <dbl>
    1 A          C             16
    2 A          D            110
    3 B          C              4
    4 B          D             20
  2. Based on the study, compute the probability a person chose “A” for Decision 1. Display your result as a tibble with one row and two columns – decision_1 and probability.

  3. Based on the study, compute the probability a person chose “A” and “D”. Display your result as a tibble with one row and three columns – decision_1, decision_2, and probability.

  4. Given a person chose “B” for Decision 1, what is the probability they chose “D” for Decision 2? Display your result as a tibble with one row and one column – probability.

  5. Given a person chose “B” for Decision 1, what is the probability they chose “A” for Decision 2? Code is optional here.

  6. Given a person chose “D” for Decision 2, what is the probability they chose “B” for Decision 1? Display your result as a tibble with one row and one column – probability.

  7. Which pair of options would you choose? Why? Explain your reasoning in less than five sentences.

Part II

In this part you will use simulation to compute some more challenging probabilities. Run 10,000 experiments for your simulation. Do not modify the set_seed code chunk in your Rmd file.

  1. Consider a standard deck of 52 cards and a fair six-sided die. You will draw a card and roll the die. What is the probability that you get matching numbers on the card draw and die roll? Do not treat Aces as one. Display your result as a tibble with one row and one column – probability.

  2. Consider a standard deck of 52 cards and a fair six-sided die. You will draw a card and roll the die. What is the probability that you get a face card or a six on the die roll? Display your result as a tibble with one row and one column – probability.

  3. Consider a standard deck of 52 cards. Suppose you draw three cards sequentially but with replacement. What is the probability all three cards are in increasing order from the three sequential draws. Ties do not count. Define the following card rankings: 2 < 3 < ... < 10 < J < Q < K < A. Display your result as a tibble with one row and one column – probability.

Submission

Knit to PDF to create a PDF document. Stage and commit all remaining changes, and push your work to GitHub. Make sure all files are updated on your GitHub repo.

Only upload your PDF document to Gradescope. Before you submit the uploaded document, mark where each answer is to the exercises. If any answer spans multiple pages, then mark all pages. Associate the “Overall” section with the first page.

References

D. Kahneman and A. Tversky (1984). “Choices, Values, and Frames”, American Psychologist, Vol.35, #4, pp. 341-350.