If you roll a pair of fair dice, what is the probability of
The probability of getting a sum of 1 when you roll a pair of dice is not a possible.
Probsum5 = (1/36) + (1/36) + (1/36) + (1/36)
Probsum5
## [1] 0.1111111
Probsum12 = (1/6)*(1/6)
Probsum12
## [1] 0.02777778
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.
AC=(14.6*0.01)
AC
## [1] 0.146
FL=(20.7*0.01)
FL
## [1] 0.207
ACFL=(4.2*0.01)
ACFL
## [1] 0.042
Answer: No. 4.2% of the American survyed in 2010 both are living below the poverty line and speak a language other than English. #####(b) Draw a Venn diagram summarizing the variables and their associated probabilities.
library(VennDiagram)
## Loading required package: grid
## Loading required package: futile.logger
poverty_line <- 14.6
foreign_language <- 20.7
both <- 4.2
poverty_only <- poverty_line - both
foreign_language_only <- foreign_language - both
venn.plot <- draw.pairwise.venn(poverty_line,
foreign_language,
cross.area=both,
c("Poverty Line", "Speaking a Foreign Language"),
fill=c("yellow", "blue"),
cat.dist=-0.08,
ind=FALSE)
grid.draw(venn.plot)
AC=14.6
ACFL=4.2
ACper=AC-ACFL
ACper
## [1] 10.4
AC=14.6
FL=20.7
ACFL=4.2
result=AC+FL-4.2
result
## [1] 31.1
AC=(14.6/100)
FL=(20.7/100)
ACFL=(4.2/100)
result=1-(AC+FL-ACFL)
result
## [1] 0.689
ACFL= AC * FL 0.042 = 0.146 * 0.207 Since 0.042???0.030
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.
A <- (114/204)
B <- (108/204)
AB <- (78/204)
ans <- (A + B - (AB))*100
ans
## [1] 70.58824
(78/114)*100
## [1] 68.42105
(19/54)*100
## [1] 35.18519
(11/36)*100
## [1] 30.55556
No, from the observation above, males with blue eyes favorite females with blue eyes.
The table below shows the distribution of books on a bookcase based on whether they are nonfiction or fiction and hardcover or paperback.
probDraw1 = 28/95
probDraw2 = 59/94
prob2Given1 = (probDraw1*probDraw2)*100
prob2Given1
## [1] 18.49944
probDraw1 = 72/95
probDraw2 = 28/94
prob2Given1 = (probDraw1*probDraw2)*100
prob2Given1
## [1] 22.57559
probDraw1 = 72/95
probDraw2 = 28/95
prob2Given1 = (probDraw1*probDraw2)*100
prob2Given1
## [1] 22.33795
The results are very similar because a single book counts for a small change in probability.
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.
probability <- matrix(c(0, 25, 60, .54, .34, .12, 0*.54, 24*.34, 60*.12), ncol = 3)
colnames(probability) <- c("fee", "prob", "fee * prob")
rownames(probability) <- c("no checked", "1 check", "2 check")
probability.table <- as.table(probability)
probability.table
## fee prob fee * prob
## no checked 0.00 0.54 0.00
## 1 check 25.00 0.34 8.16
## 2 check 60.00 0.12 7.20
expectrevenue <- ((0*54)+(25*.34)+(60*.12))
expectrevenue
## [1] 15.7
revenueexpect <- ((120*0)+(120*8.16)+(120*7.20))
revenueexpect
## [1] 1843.2
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.
income <- c("$1 to $9,999","$10,000 to $14,999","$15,000 to $24,999","$25,000 to $34,999","$35,000 to $49,999","$50,000 to $64,999","$65,000 to $74,999","$75,000 to $99,999","$100,000 or more")
briefPercent = c(2.2,4.7,15.8,18.3,21.2,13.9,5.8,8.4,9.7)
barplot(briefPercent,xlab='Income distribution',col=c("darkgreen"))
result = sum(briefPercent[1:5])
result
## [1] 62.2
result*.41
## [1] 25.502
0.718 = 0.622 * 0.41 Since 0.718 ??? 0.2550