2.6 Dice Rolls If you roll a pair of fair dice, what is the probability of
0/36
## [1] 0
#1 & 4, 4 & 1, 2 & 3, 3 & 2
4/36
## [1] 0.1111111
#6 & 6
1/36
## [1] 0.02777778
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 the poverty line, 20.7% speak a language other than English (foreign language) at home, and 4.2% fall into both categories.59
Are living below the poverty line and speaking a foreign language at home disjoint?
No, living below the poverty line and speaking a foreign language at home are not disjoint because they both can occur at the same time.
Draw a Venn diagram summarizing the variables and their associated probabilities.
library(VennDiagram)
## Loading required package: grid
## Loading required package: futile.logger
grid.newpage()
venn.plot <- draw.pairwise.venn(area1 = 20.7,
area2 = 14.6,
cross.area = 4.2,
category = c("Foreign
language", "Below
poverty
line"))
What percent of Americans live below the poverty line and only speak English at home?
10.4%
What percent of Americans live below the poverty line or speak a foreign language at home?
31.1%
What percent of Americans live above the poverty line and only speak English at home?
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?
P(below poverty line) * P(foreign language) = P(below poverty line and foreign language)
.146*.207=.042
.03=.042
Not equal, so not independent
2.20 Assortative mating 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.
(108+114-78)/204
## [1] 0.7058824
78/114
## [1] 0.6842105
#P(male with brown eyes has partner with blue eyes):
19/54
## [1] 0.3518519
#P(male with green eyes has partner with blue eyes):
11/36
## [1] 0.3055556
P(male with blue eyes and female with blue eyes) = P(male with blue eyes)*P(female with blue eyes)
78/204 = (78/108)*(78/114)
0.3823529 = 0.494152
These probablilities are not equal. Therefore, the eye colors of male respondents and their partners are not independent
2.30 Books on a bookshelf The table below shows the distribution of books on a bookcase based on whether they are nonfiction or fiction and hardcover or paperback.
(28/95)*(59/94)
## [1] 0.1849944
#P(draw hardback fiction) + P(draw paperback fiction)
(13/95)*(27/94) + (59/95)*(28/94)
## [1] 0.2243001
(72/95)*(28/95)
## [1] 0.2233795
The final answers to parts (b) and (c) are very similar. Explain why this is the case.
The final answers to parts b and c are very similar because it is calculating the probability for the same scenario except with and without replacement.
2.38 Baggage fees. 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.
bagNumber <- c(0,1,2)
bagPrice <- c(0,25,60)
bagPercent <- c(.54, .34, .12)
meanBagRev <- weighted.mean(bagPrice,bagPercent)
meanBagRev
## [1] 15.7
#Average revenue per person:
var <- (0.54*(0-meanBagRev)^2 + 0.34*(25-meanBagRev)^2 + 0.12*(60-meanBagRev)^2)
var
## [1] 398.01
sdBag <- sqrt(var)
sdBag
## [1] 19.95019
#Assuming 54% of passengers have no checked luggage, 34% have one piece of checked luggage and 12% have two pieces:
120*meanBagRev
## [1] 1884
#The expected revenue for a flight of 120 passengers is $1884 with a standard deviation of $19.95
2.44 Income and gender. 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(2.2, 4.7, 15.8, 18.3, 21.2, 13.9, 5.8, 8.4, 9.7)
barplot(income, xlab = "Income Bracket", ylab = "Percent")
#The distribution is almost symmetrical
.212+.183+.158+.047+.022
## [1] 0.622
(.212+.183+.158+.047+.022)*.41
## [1] 0.25502
#My assumption is that the probably of being female and the probability of making less than $50,000 per year are independent
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.
I caluclated the probability to be about 25.5% in part c. Therefore, my assumption that the two events are independent is not valid.