MSDS Spring 2018

DATA 606 Statistics and Probability for Data Analytics

Jiadi Li

Chapter 2: Probability

HW 2: 2.6, 2.8, 2.20, 2.30, 2.38, 2.44

2.6 Dice rolls.

roll a pair of fair dice:
(a) P(sum = 1) = 0
(b) P(sum = 5) = \(\frac{4}{36}\) = \(\frac{1}{9}\)
(c) P(sum = 12) = \(\frac{1}{36}\)

2.8 Poverty and language.

P(A) = P(below poverty line) = 14.6%
P(B) = P(speak foreign language at home) = 20.7%
P(A\(\bigcap\)B) = P(both) = 4.2%

  1. No, these two sets are not disjointed because P(both) = 4.2%.
  2. Draw a venn diagram:
library(VennDiagram)
## Loading required package: grid
## Loading required package: futile.logger
grid.newpage()
draw.pairwise.venn(14.6,20.7,4.2,category = c("Poverty","Foreign"),lty = rep("blank",2),fill = c("light blue","light green"))

## (polygon[GRID.polygon.1], polygon[GRID.polygon.2], polygon[GRID.polygon.3], polygon[GRID.polygon.4], text[GRID.text.5], text[GRID.text.6], text[GRID.text.7], text[GRID.text.8], text[GRID.text.9])
  1. P(A\(\bigcap\)B\(^c\)) = 10.4%
  2. P(A\(\bigcup\)B) = P(A) + P(B) - P(A\(\bigcap\)B) = 31.1%
  3. P(A\(^c\bigcap\)B\(^c\)) = 1 - P(A\(\bigcup\)B) = 68.9%
  4. No. Because P(A\(\bigcap\)B) = 4.2% \(\neq\) P(A)\(\times\)P(B) = 3.02%

2.20 Assortative mating.

  1. P(either one has blue eyes) = (108+114-78)/204 = 70.59%
  2. P(both blue eyes) = 78/204 = 38.24%
  3. P(male brown, female blue) = 19/204 = 9.31%
    P(male green, female blue) = 11/204 = 5.39%
  4. No, they are dependent. Given a male having blue eyes, the possibility for his partner to have blue eyes is higher.

2.30 Books on a bookshelf.

  1. P(first hardcover, then paperback, no replacement) = (28/95)*(67/94) = 21.0%
  2. P(first fiction, then hardcover, no replacement) = (72/95)*(27/94) = 21.77%
  3. P(senario b with replacement) = (72/95)*(28/95) = 22.34%
  4. Because the replacement of 1 book doesn’t change the denominator too much.

2.38 Baggage fees.

probability model

fee <- c(0,25,35)
P <- c(0.54,0.34,0.12)
revenue <- fee*P
var(revenue)
## [1] 18.06333
sd(revenue)
## [1] 4.250098