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
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.
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.
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])
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.
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.
What percent of Americans live above the poverty line and only speak English at home? (100 - 14.6) - (20.7 - 4.2) = 68.9%
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.
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.
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.
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
(.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.
less50k <- 21.2 + 18.3 + 15.8 + 4.7 + 2.2
less50k*.01
## [1] 0.622
0.622 * .41
## [1] 0.25502