Graded: 2.6, 2.8, 2.20, 2.30, 2.38, 2.44 #2.6 Dice rolls. If you roll a pair of fair dice, what is the probability of (a) getting a sum of 1? 0 (b) getting a sum of 5? 4/36 (c) getting a sum of 12?1/36
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 (a) Are living below the poverty line and speaking a foreign language at home disjoint? No, it is possible to live below poverty line and speak foreign language
#install.packages('VennDiagram')
#install.packages('futile.logger')
library(VennDiagram)
## Loading required package: grid
## Loading required package: futile.logger
grid.newpage()
draw.pairwise.venn(area1 = 14.6, area2 = 20.7, cross.area =4.21, category = c("Poverty line",
"Foreign Language"))
## (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? P(below poverty line) =0.146 P(speak english) = 0.042 P(Below poverty and English)= .146 - 0.042 = .104 Percentage = 10.4%
Is the event that someone lives below the poverty line independent of the event that the person speaks a foreign language at home?yes, because knowing someone speaks a foreign language does not tell us about the poverty line
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.65 Partner (female) Blue Brown Green Total Blue 78 23 13 114 Self (male) Brown 19 23 12 54 Green 11 9 16 36 Total 108 55 41 204 (a) What is the probability that a randomly chosen male respondent or his partner has blue eyes? P(M_Blue or F_Blue) = 108/204 + 114/204 - 78/204 P(M_Blue or F_Blue) = 0.7059 (b) What is the probability that a randomly chosen male respondent with blue eyes has a partner with blue eyes? Probability =78/114=0.68
What about the probability of a randomly chosen male respondent with green eyes having a partner with blue eyes? 11/36 =0.305
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. Format Hardcover Paperback Total Type Fiction 13 59 72 Nonfiction 15 8 23 Total 28 67 95 (a) Find the probability of drawing a hardcover book first then a paperback fiction book second when drawing without replacement.
Probability(Hardcover and Paper back fiction) =28/95 x 59/94 =0.185
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. Pr(fiction and hardcoverbook) = 72/95 x 13/72 = 0.75789 x 0.180 = 0.136
The final answers to parts (b) and (c) are very similar. Explain why this is the case.
In this case the answers are very similar, this is because when the possible events are considerable large, the outcome will not be affected by much when there’s no replacement in random drawings.
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. (a) Build a probability model, compute the average revenue per passenger, and compute the corresponding standard deviation.
# Number of bags
bags <- c(0, 1, 2)
# Fees charges for o pieces of luggage in dollars
Lug_0 <- 0
# Fees charges for 1st luggage in dollars
Lug_1 <- 25
# Fees charges for 2nd luggage in dollars
Lug_2 <- Lug_1 + 35
# Baggage fees table
baggage_fees <- c(Lug_0,Lug_1,Lug_2)
# Percentage of passangers that check baggage in decimal form
baggage_per_bag <- c(0.54, 0.34, 0.12)
# Find Expected value for each x_i
E_revenue <- baggage_fees * baggage_per_bag
# Find the overall Expected value AKA mu
Ex <- sum(E_revenue)
# Expected Revenue per passenger
Ex
## [1] 15.7
#standard deviation
baggage_variance <- baggage_fees - Ex
# Calculate the Variance^2 and P(X=x_i)
baggage_EVariance <- baggage_variance^2 * baggage_per_bag
Variance2 <- sum(baggage_EVariance)
# Find the standard deviation by calculating the square root of the variance
sd <- Variance2^(1/2)
# Prinr the standard deviation
sd
## [1] 19.95019
# Number of bags
bags <- c(0, 1, 2)
# Fees charges for o pieces of luggage in dollars
Lug_0 <- 0
# Fees charges for 1st luggage in dollars
Lug_1 <- 25
# Fees charges for 2nd luggage in dollars
Lug_2 <- Lug_1 + 35
# Baggage fees table
baggage_fees <- c(Lug_0,Lug_1,Lug_2)
# Percentage of passangers that check baggage in decimal form
baggage_per_bag <- c(0.54, 0.34, 0.12)
# Find Expected value for each x_i
E_revenue <- baggage_fees * baggage_per_bag*120
# Find the overall Expected value AKA mu
Ex <- sum(E_revenue)
# Expected Revenue per passenger
Ex
## [1] 1884
#standard deviation
baggage_variance <- baggage_fees - Ex
# Calculate the Variance^2 and P(X=x_i)
baggage_EVariance <- baggage_variance^2 * baggage_per_bag
Variance2 <- sum(baggage_EVariance)
# Find the standard deviation by calculating the square root of the variance
sd <- Variance2^(1/2)
# Prinr the standard deviation
sd
## [1] 1868.407
The expected revenue for the 120 passengers is $1884.00. The standard deviation will be $1868.41.
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.69 (a) Describe the distribution of total personal income. This is a smooth continuous distribution
P(Resident < $50000) = P($1 to $9,999) + P($10,000 to $14,999) + P($15,000 to $24,999) +P($25,000 to $34,999) + P($35,000 to $49,999)
P(Resident < $50000) = 0.022 + 0.047 + 0.158 + 0.183 + 0.212
P(Resident < $50000) = 0.622
I will be assuming that they are independent events then P(A and B) = P(A) x P(B).
P(Resident < $50000 and F) = P(Resident < $50000) * P(F)
P(Resident < $50000 and F) = 0.622 * 0.41
P(Resident < $50000 and F) = 0.2550
Answer: The probability that a randomly chosen US resident makes less than $50,000 per year and is female is 25.50%. (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. P(Resident < $50000 and F) = P(Resident < $50000) * P(F)
0.718 = 0.622 * 0.41
Since 0.718 ?????? 0.2550
We conclude that these events are not independent