2.6 Dice rolls. If you roll a pair of fair dice, what is the probability of
a) getting a sum of 1?
b) getting a sum of 5?
c) getting a sum of 12?
dice_rolls
a) P(getting sum of 1) = 0
b) P(getting sum of 5) = countOfDifferentSum[(1,4),(2,3),(3,2),(4,1)] / totalCountOfDiceNumbers = 4/36 = 1/9
c) P(getting sum of 12) = countOfDifferentSum[(6,6)] / totalCountOfDiceNumbers = 1/36
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.
a) Are living below the poverty line and speaking a foreign language at home disjoint?
b) Draw a Venn diagram summarizing the variables and their associated probabilities.
c) What percent of Americans live below the poverty line and only speak English at home?
d) What percent of Americans live below the poverty line or speak a foreign language at home?
e) What percent of Americans live above the poverty line and only speak English at home?
f) Is the event that someone lives below the poverty line independent of the event that the person speaks a foreign language at home?
Poverty:Yes Poverty:No Total
English:Yes 0.104 0.689 0.793
English:No 0.042 0.165 0.207
Total 0.146 0.854 1.000
is_it_disjoint
No, not a disjoint because there’s 4.2% that are both

  1. P(Poverty:Yes and English:Yes) = P(Poverty:Yes) - P(Poverty:Yes and English:No) = 14.6% - 4.2% = 10.4% = 0.104
  2. P(Poverty:Yes or English:No) = P(Poverty:Yes) + P(English:No) - P(Poverty:Yes and English:No) =20.7%+14.6%-4.2%=31.1%= 0.311
  3. P(Poverty:No and English:Yes) = 1 - P(Poverty:Yes or English:No) = 1 - 0.311 = 0.689 = 68.9%
  4. P(Poverty:Yes|English:No) = P(Poverty:Yes and English:No) / P(English:No) = 0.042 / 0.207 = ~ 0.203, not equal to 0.042 therefore it's 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.

Pf = Partner (female), Sm = Self (male)

Pf_Blue Pf_Brown Pf_Green Total
Sm_Blue 78 23 13 114
Sm_Brown 19 23 12 54
Sm_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?
(b) What is the probability that a randomly chosen male respondent with blue eyes has a partner with blue eyes?
(c) What is the probability that a randomly chosen male respondent with brown eyes has a partner with blue eyes? What about the probability of a randomly chosen male respondent with green eyes having a partner with blue eyes?
(d) Does it appear that the eye colors of male respondents and their partners are independent? Explain your reasoning.
  1. P(Sm_Blue or Pf_Blue) = [P(Sm_Blue)+P(Pf_Blue)-P(Sm_Blue and Pf_Blue)] / P(total_population)

                      = (108+114-78)/204
    
                      = 144/204
    
                      = 0.71
  2. P(Sm_Blue|Pf_Blue) = [P(Sm_Blue)/P(total_population)] / [P(sm_blue_total_population)/P(total_population)]

                      = (78/204) / (114/204)
    
                      = 78 / 114
    
                      = 0.684
  3. P(Sm_Brown|Pf_Blue) = [P(Sm_Brown)/P(total_population)] / [P(sm_brown_total_population)/P(total_population)]

                      = (19/204) / (54/204)
    
                      = 19/54
    
                      = 0.352

P(Sm_Green|Pf_Blue) = [P(Sm_Green)/P(total_population)] / [P(sm_green_total_population)/P(total_population)]

                      = (11/204) / (36/204)
                    
                      = 11/36
                   
                      = 0.305
                   
  1. From c), if we consider P(Sm_Green|Pf_Blue) = 0.305 and P(Pf_Blue) = 108/204 = 0.53. We see that P(Sm_Green|Pf_Blue) and P(Pf_Blue) are not equal, therefore not independent.
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.
(a) Build a probability model, compute the average revenue per passenger, and compute the corresponding standard deviation.
(b) 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.
Type X P(X) X*P(X) Xi-E(X) (Xi-E(X))^2 P(X)*(Xi-E(X))^2
1st bag 25 0.34 8.5 9.3 86.49 29.4066
2 bags 60 0.12 7.2 44.3 1962.49 235.4988
no luggage 0 0.54 0.0 -15.7 246.49 133.1046
expected_value variance standard_deviation
15.7 398.01 19.95
population airline_revenue revenue_per_passenger variance sd
120 1884 15.7 47761.2 218.5434
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 Total
$1 to $9,999 or loss 2.2%
$10,000 to $14,999 4.7%
$15,000 to $24,999 15.8%
$25,000 to $34,999 18.3%
$35,000 to $49,999 21.2%
$50,000 to $64,999 13.9%
$65,000 to $74,999 5.8%
$75,000 to $99,999 8.4%
$100,000 or more 9.7%
(a) Describe the distribution of total personal income.
(b) What is the probability that a randomly chosen US resident makes less than $50,000 per year?
(c) 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.
(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 inpart (c) is valid.
peak_is_in_between
$35,000 to $49,999
library(ggplot2)
barplot(Total1, names.arg = Income, main="Personal Income Distribution", ylab="Total", col="lightblue")

The peak of the distribution is skewed to the right and is in between $35,000 to $49,999.

## [1] "P(less than $50,000) = 62.2 % = 0.622"
## [1] "P(less than $50,000 and is female) = 0.25502 = 25.502 %"

Assuming that the personal income and gender are independent.

  1. P(less than $50,000|71.8% of females) = P(less than $50,000 and females) / P(females)

                                      = (p/100 * female_percent * 0.718) / 0.25502
    
                                      = 0.25502 * 0.718 / 0.25502
    
                                      = 0.718

We noticed that P(less than $50,000|71.8% of females) = 0.718 is not equal to P(less than $50,000 and is female) = 0.25502 in c), threfore the assumption made is not because the gender and the icome are not independent.