2.6 Coin Flip: If you flip a fair coin 10 times, what is the porbability of:

#note: there are 36 possibilities #a. getting a sum of 1? 0 because the smallest sum possible is 2 #b. getting a sum of 5? 4/36 #C. getting a sum of 12? 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 poverty line, 20.7% speak a language other than English 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 they are not as we have families who both speak a foreign language at home and fall below the poverty line. #b. Draw a Venn Diagram summarizing the variables and their associated probabilities. library(VennDiagram) library(grid) draw.pairwise.venn(area1 = 14.6, area2 = 20.7, cross.area = 4.2, category = c(‘Below Pov. Line’, ‘Speak Foreign Lang.’), cat.pos = c(0,0), cat.dist = rep(.025,2), fill = c(“blue”, “light grey”)); #c. What percent of Americans live below poverty line and only speak English at home? 14.6-4.2 #14.6%(live below poverty line) - 4.2%(both) = 10.4 #d. What percent of Americans live below the poverty line or speak a foreign language at home? 14.6+20.7-4.2 #14.6%(live below poverty line) + 20.7%(speak foreign language) - 4.2% (both) = 31.1% #e. What percent of American live above the poverty line and only speak English at home? 100-31.1 #100-31.1= 68.9 #f. Is the event that someone lives below the poverty line independent of the event that the person speaks a foreign language? #No they are not independent. We see this when we work out Bayes Theorem.

2.20 Assortative mating. Assortative mating is a nonramdom 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 coolors 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 have blue eyes? #P(A or B) = P(A)+P(B)-P(A and B) #(114/204)+(108/204)-(78/204)= .7059 =70.59% #b. What is the probability that a randomly chosen male respondent with blue eyes has a partner with blue eyes? #78/114 = .6842 = 68.42% #c. What is the probability that a randomly chose 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? #19/54= .352 = 35.2%, 11/36 = .306 = 30.6% #d. Does it appear that the eye colors of male respondents and their partners are independent? Explain you reasoning. #I would say that they are dependent. The probability of having a female with brown eyes is 55/204 which is about a 27% chance while the probability of having a male with brown eyes have a brown eyed partner is 23/54 which is about 43% chance. This is about double the probability of randomly selecting a female respondent with brown eyes.

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

#a. Find the probability of drawing a hardcover book first then a paperback fiction the second time without replacement? #P(hardcover)=28/95 #P(paperback and fiction) = 59/94 #P(hardcover then paperback&fiction) = 28/95 * 59/94 = .1850 = 18.50% #b. Determine the probability of drawing a fiction book first and then a hardcover book second, when drawing without replacement. #P(fiction) = 72/95 #P(hardcover) = 28/94 #P(fiction then hardcover no replacement) = 72/95 * 28/94 = .2258 = 22.58% #c. Calculate the probability of the scenario in part(b), except this time complete the calculaltions under the scenario where the first book is placed back on the bookcase before randomly drawing a second book. #P(fiction) = 72/95 #P(hardcover) = 28/95 #P(fiction then hardcover with replacement) = 72/95 * 28/95 = .2233 = 22.33% #d. The final answers to parts b and c are very similar. Explain why this is the case. #The bigger the sample size is, the less difference replacement makes in the grand scheme of things.

2.38 Baggage fees. An airlinig charges the following baggage fees: $25 for the first bag and $35 for the second. Suppose 54% of passengers have no checked luggage, 34% have on piece of 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. Event <- c(“No Bags”, “One Bag”, “Two Bags”) Prob.Event <- c(.54, .34, .12) Price.Event <- c(0, 25, 60) Prob.Price <- c(0, 8.5, 7.20) baggage.fees <- data.frame(Event, Prob.Event, Price.Event, Prob.Price) baggage.fees #compute revenue: \(15.7 average.revenue <- sum(baggage.fees\)Prob.Price) average.revenue #compute the SD: $19.97 var <- (((0-15.7)2).54)+(((25-15.7)^2).35)+(((60-15.7)2).12) sqrt(var) #b. About how much revenue shoul 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. x <- (120.34)25 #41 people @25 y <- (120.54)0 #65 people @0 z <- (120.12)60 #14 people @60 revenue =x+y+z #$1884 with SD being $19.97 revenue #2.44 Income and gender. The relative frequency table belwo displays the distribuition of annual total personal income(in 2009 inflation-adjusted dollar) for a representative sample of 96,420,486 Americans. These data cone 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. #The distribution is multimodal, skewed to the right. The median would be 35000 to 49999. #b. What is the probability that a randomly chosen US resident makes less thatn $5000 per year? 62.2% 21.2+18.3+15.8+4.7+2.2 #sum probability of all less than $50000 #c. What is the probability that a randomly chosen US resident makes less than $5000 AND is female? #We are assuming that the probability of chosing a femae is 41% and independent to income. We multiply this by the probability of part b. .41.622 #.25502 = 25.5% #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. #My assumption was not valid.