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