2.6 Dice rolls.

(a)getting a sum of 1?

0  

(b)getting a sum of 5?

4/36, it could be 4 1,1 4, 2 3,3 2  

(c)) getting a sum of 12?

1/36

2.8Poverty and language

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

No, there are 4.2% overlapped.

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

library(VennDiagram)
## Loading required package: grid
## Loading required package: futile.logger
grid.newpage()
draw.pairwise.venn(14.6, 20.7, 4.2, 
                   category = c("live below the poverty line", "language other than English at home"), 
                   lty = rep("blank", 2), 
                   fill = c("red", "black"), 
                   alpha = rep(0.5, 2), 
                   cat.pos = c(.5, 0.5), 
                   cat.dist = rep(0.025, 2))

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

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

10.4%

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

31.1%=16.5%+4.2%+10.4%

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

68.9%=1-31.1%

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

No, it is dependent.

2.20 Assortative mating

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

P_a = (78+19+11+23+13)/204
P_a
## [1] 0.7058824

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

p_b = 78/204 
p_b
## [1] 0.3823529

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?

P_brown_blue<- 19/204
P_brown_blue
## [1] 0.09313725
P_green_blue<- 11/204 
P_green_blue
## [1] 0.05392157

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

The event is not independent,since the P(male bule|female bule)> p(male bule|female brown)

2.30 Books on a bookshelf.

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

p_a<-(28/95)*(59/94)
p_a
## [1] 0.1849944

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

p_b<-(72/95)*(28/94)
p_b
## [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.

p_c<-(72/95)*(28/95)
p_c
## [1] 0.2233795

(d) The final answers to parts (b) and (c) are very similar. Explain why this is the case.

1 out of 95,we consider small in this case.

2.38 Baggage fees

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

num_bag<-c(0,1,2)
fee <-c(0,25,60)
prob <-c(0.54,0.34,0.12)
avg_revenue<-sum(fee*prob)
avg_revenue
## [1] 15.7
sd=sqrt((sum(fee^2 * prob) - avg_revenue^2))
sd
## [1] 19.95019

(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.

total_rev  = 120 * avg_revenue
total_rev
## [1] 1884

2.44 Income and gender.

(a) Describe the distribution of total personal income

The distribution is multimodal

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

P_44b = (21.2+18.3+15.8+4.7+2.2)/100
P_44b
## [1] 0.622

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

p_44c<-P_44b*0.41
p_44c
## [1] 0.25502

(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.

The assumption is not valid.