2.6 Dice rolls. If you roll a pair of fair dice, what is the probability of:

(a) getting a sum of 1?

The probability if of getting a 1 is 0 - Not possible. Two (2) is the lowest possible outcome.

(b) getting a sum of 5?

There are four ways to get 5: (4,1) = 1/36 + (3,2) = 1/36 + (2,3) = 1/36 + (4,1) = 1/36 = 4/36 or [1/9]

(c) getting a sum of 12?

There is one way to get 12 (6,6) = 1/36

2.8 Poverty and language. The American Community Survey is an ongoing survey that provides data every year to give communities the current information they need to plan investments and services. The 2010 American Community Survey estimates that 14.6% of Americans live below the poverty line, 20.7% speak a language other than English (foreign language) at home, and 4.2% fall into both categories.

(a) Are living below the poverty line and speaking a foreign language at home disjoint?

No, both outomes happen concurrently 4.2%.

(b) Draw a Venn diagram summarizing the variables and their associated probabilities.

library(VennDiagram)
## Loading required package: grid
## Loading required package: futile.logger
draw.pairwise.venn(area1=14.6, area2= 20.7, cross.area = 4.2, category = c("Below Poverty","Speaks Other Than English"))

## (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])

(c) What percent of Americans live below the poverty line and only speak English at home?

10.4% of Americans live belwo the poverty line and only speak english at home.

(d) What percent of Americans live below the poverty line or speak a foreign language at home?

31.1% of Americans live below the below the poverty line or speak a foreign language at home.

(e) What percent of Americans live above the poverty line and only speak English at home?

AbovePov = 1-.146 = .854, SpeaksEng = 1-.207 = 0.793, AbovPoc and SpeakEng = (0.854 * 0.793) = 0.677

(f) Is the event that someone lives below the poverty line independent of the event that the person speaks a foreign language at home?

The events are independent if P(live in pov | Speaks other than Eng) = P(live in pov) 4.2 <> 14.6. Therefore they are not independent.

2.20 Assortative mating. Assortative mating is a nonrandom mating pattern where individuals with similar genotypes and/or phenotypes mate with one another more frequently than what would be expected under a random mating pattern. Researchers studying this topic collected data on eye colors of 204 Scandinavian men and their female partners. The table below summarizes the results. For simplicity, we only include heterosexual relationships in this exercise.

** (a) What is the probability that a randomly chosen male respondent or his partner has blue eyes?**

P(A or B = P(A) + P(B) - P(AB)
A  <- 114/204
B  <- 108/204
AB <- 78/204
P <- A + B - AB
P
## [1] 0.7058824

(b) What is the probability that a randomly chosen male respondent with blue eyes has a partner with blue eyes?

PBlueBlue <- 78 / 114
PBlueBlue
## [1] 0.6842105

(c) What is the probability that a randomly chosen male respondent with brown eyes has a partner with blue eyes? What about the probability of a randomly chosen male respondent with green eyes having a partner with blue eyes?

PBrownBlue <- 19 /54
PBrownBlue
## [1] 0.3518519
PGreenBlue <- 11 /36
PGreenBlue
## [1] 0.3055556

(d) Does it appear that the eye colors of male respondents and their partners are independent? Explain your reasoning.

No, the disparity between blue eyed males vs Brown and Green eyed males indicates a dependency.

2.30 Books on a bookshelf. The table below shows the distribution of books on a bookcase based on whether they are nonfiction or fiction and hardcover or paperback.

** (a) Find the probability of drawing a hardcover book first then a paperback fiction book second when drawing without replacement.**

Hardcover <- 28/95
PaperFiction <- 59 / 94
P <- Hardcover * PaperFiction
P
## [1] 0.1849944

(b) Determine the probability of drawing a fiction book first and then a hardcover book second when drawing without replacement.

Fiction <- 72 /95
Hardcover <- 28 / 94
P <- Fiction * Hardcover
P
## [1] 0.2257559

(c) Calculate the probability of the scenario in part (b), except this time complete the calculations under the scenario where the first book is placed back on the bookcase before randomly drawing the second book.

Fiction <- 72 /95
Hardcover <- 28 / 95
P <- Fiction * Hardcover
P
## [1] 0.2233795

(d) The final answers to parts (b) and (c) are very similar. Explain why this is the case. In this scenario replacement did not make a big difference because we were only replacing a single book or relatively small portion of all the book 1/95.

2.38 Baggage fees. An airline charges the following baggage fees: $25 for the first bag an $35 for the second. Suppose 54% of passengers have no checked luggage, 34% have one piece of checked luggage and 12% have two pieces. We suppose a negligible portion of people check more than two bags.

(a) Build a probability model, compute the average revenue per passenger, and compute the corresponding standard deviation.

p1 <- 0  * 0.54
p2 <- 25 * 0.34
p3 <- 60 * 0.12
AvgPerCust <- p1 + p2 + p3
AvgPerCust
## [1] 15.7
varAvgCust1 <- (((p1-AvgPerCust)^2) *.54)
varAvgCust1
## [1] 133.1046
varAvgCust2 <- (((p2-AvgPerCust)^2)*.34)
varAvgCust2
## [1] 17.6256
varAvgCust3 <- (((p3-AvgPerCust)^2) *.12)
varAvgCust3
## [1] 8.67
varAvgCust <- varAvgCust1 + varAvgCust2 + varAvgCust3
varAvgCust
## [1] 159.4002
sdPerCust <- sqrt(varAvgCust)
sdPerCust
## [1] 12.62538

(b) About how much revenue should the airline expect for a flight of 120 passengers? With what standard deviation? Note any assumptions you make and if you think they are justified.

Revenue = 120 * AvgPerCust
Revenue
## [1] 1884
sdRevenue = sqrt(120 * varAvgCust)
sdRevenue
## [1] 138.3041

This assumes the fees and percentage from part a still apply.

2.44 Income and gender. The relative frequency table below displays the distribution of annual total personal income (in 2009 inflation-adjusted dollars) for a representative sample of 96,420,486 Americans. These data come from the American Community Survey for 2005-2009. This sample is comprised of 59% males and 41% females.

(a) Describe the distribution of total personal income.

inc <- data.frame(c("< 10","10-14","15-24","25-34","35-49", "50-64","65-74","75-99","> 100"), c(2.2,4.7,15.8,18.3,21.2,13.9,5.8,8.4,9.7))
colnames(inc) <- c("bin","percent")
barplot(inc$percent, names.arg=inc$bin, xlab="Income Bin", ylab="Percent of Pop")

The distribution is unimodal and is right skewed with a fat right tail(leptokuritic).

(b) What is the probability that a randomly chosen US resident makes less than $50,000 per year?

Plessthan50k <- 0.022+ 0.047 + 0.158 +0.183 + 0.212
Plessthan50k
## [1] 0.622

(c) What is the probability that a randomly chosen US resident makes less than $50,000 per year and female? Note any assumptions you make.

Plt50Kfemale <- Plessthan50k * .41
Plt50Kfemale 
## [1] 0.25502

This assumes income and gender are independent.

(d) The same data source indicates that 71.8% of females make less than $50,000 per year. Use this value to determine whether or not the assumption you made in part (c) is valid.

femaleLT50 <- 0.718
Plessthan50k 
## [1] 0.622
femaleLT50
## [1] 0.718

femakeLT50 != Plessthan50k so my assumption in c may be invalid.