x`— title: “Chapter 3 - Probability” author: “” output: pdf_document: extra_dependencies: [“geometry”, “multicol”, “multirow”] —

Dice rolls. (3.6, p. 92) If you roll a pair of fair dice, what is the probability of

  1. getting a sum of 1? 0/36 = 0
  2. getting a sum of 5? 4/36 = 0.111 = 0.11
  3. getting a sum of 12? 1/36 = 0.277 = 0.28

Poverty and language. (3.8, p. 93) 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.

  1. Are living below the poverty line and speaking a foreign language at home disjoint? These properties are non-disjoint because they are not mutually exclusive and can occur simultaneously.

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

d <- read.csv("https://raw.githubusercontent.com/wco1216/homeworkex/master/h3prob1.csv", TRUE, ",")
require(VennDiagram)
## Loading required package: VennDiagram
## Loading required package: grid
## Loading required package: futile.logger
nrow(subset(d, poverty == 1))
## [1] 146
nrow(subset(d, foreign == 1))
## [1] 207
nrow(subset(d, poverty == 1 & foreign == 1))
## [1] 41
grid.newpage()
draw.pairwise.venn(area1 = 14.6, area2 = 20.7, cross.area = 4.1, category = c("Poverty", 
    "Foreign"))

## (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. What percent of Americans live below the poverty line and only speak English at home? 14.6 - 4.5 = 10.2% live below the poverty line and only speak English.

  2. What percent of Americans live below the poverty line or speak a foreign language at home? 14.6 + 20.7 - 4.2 = 31.1% live below the poverty line or speak a language other than English.

  3. What percent of Americans live above the poverty line and only speak English at home? (100 - 14.6) - (20.7 - 4.2) = 68.9%

  4. Is the event that someone lives below the poverty line independent of the event that the person speaks a foreign language at home? These events are indeed random because the probability of each event occuring is not effected even the other being true.

PLEASE DO F


Assortative mating. (3.18, p. 111) 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.

  1. What is the probability that a randomly chosen male respondent or his partner has blue eyes? (114 + 108 - 78) / 204 = 0.7058 = 70.6%
  2. What is the probability that a randomly chosen male respondent with blue eyes has a partner with blue eyes? 78 / 108 = 72.2%
  3. Whatistheprobabilitythatarandomlychosenmalerespondentwithbrowneyeshasapartner with blue eyes? What about the probability of a randomly chosen male respondent with green eyes having a partner with blue eyes? 19 / 108 = 17.6% …. 11 / 108 = 10.2%
  4. Does it appear that the eye colors of male respondents and their partners are independent? Explain your reasoning. It appears that the eye color of male respondents and their partners are dependent. Given that a male has blue colored eyes, the likelihood of their partner having blue colored eyes increases dramatically.

Books on a bookshelf. (3.26, p. 114) The table below shows the distribution of books on a bookcase based on whether they are nonfiction or fiction and hardcover or paperback.

  1. Find the probability of drawing a hardcover book first then a paperback fiction book second when drawing without replacement. (28 / 95) * (59 / 94) = 18.5%
  2. Determine the probability of drawing a fiction book first and then a hardcover book second, when drawing without replacement. (72 / 95) * (28 / 94) = 22.6%
  3. 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. (72 / 95) * (28 / 95) = 22.3%
  4. The final answers to parts (b) and (c) are very similar. Explain why this is the case. These answers are very similar because then the book is placed back on the bookcase the total possibilities of outcome is increased by one. This will reduce the liklihood of the desired outcome by 0.3% which is relatively small because the total number of outcomes are large.

Baggage fees. (3.34, p. 124) An airline 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 one piece of checked luggage and 12% have two pieces. We suppose a negligible portion of people check more than two bags.

  1. Build a probability model, compute the average revenue per passenger, and compute the corresponding standard deviation.
p.bag <- matrix(c(0,1,2,.54,.34,.12, (0*.54), (1*.34), (2*.12), (0-.58)^2, (1-.58)^2, (2-.58)^2, (.54*.3364), (.34*.1764), (.12*2.0164)), ncol=5)
colnames(p.bag)<- c('X', 'P(X)', 'X*P(X)', '(X-E(X))^2', 'P(X)*(X-E(X))^2')
prob.model <- as.table(p.bag)
prob.model
##          X     P(X)   X*P(X) (X-E(X))^2 P(X)*(X-E(X))^2
## A 0.000000 0.540000 0.000000   0.336400        0.181656
## B 1.000000 0.340000 0.340000   0.176400        0.059976
## C 2.000000 0.120000 0.240000   2.016400        0.241968
mean <- (.34+.24+0) 
var <- 0.181656 + 0.059976 + 0.241968
sd <- (var)^(1/2)
sd(p.bag)
## [1] 0.6577408

0 = 0.54 1 = 0.34 2 = 0.12

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

(.54120)0 = $0 (.34120)25 = $1,020 (.12120)35 = $504 $0 * 0.695 $1,020 * 0.695 = $708.9 $504 * 0.695 = $350.28 About $1520 total revenue with a sd of $1,059.18. The approximated revenue was calculated by multiplying the probability of number of bags checked by total number of passengers and then by revenue made from that scenario. The sum of these values were taken. The individual values were multiplied by the SD calculated in part a and summed to receive our final answer.


Income and gender. (3.38, p. 128) 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.

  1. Describe the distribution of total personal income. This distribution has a right tail. This distribution appears to be
  2. What is the probability that a randomly chosen US resident makes less than $50,000 per year?
less50k <- 21.2 + 18.3 + 15.8 + 4.7 + 2.2 
less50k*.01
## [1] 0.622
  1. 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. We assume the gender distribution is the same throughout each class of income. Specifically that 41% of individuals making less than 50k are females.
0.622 * .41
## [1] 0.25502
  1. 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 was made that women are distributed evenly throughout each class of income. Since 62.2% of people make less than 50k this assumption would conclude that 62.2% of women also make less than 50k. This information will invalidate our assumption because it turns out more women than expected make less than 50k income.