Dice rolls. (3.6, p. 92) If you roll a pair of fair dice, what is the probability of
With a pair of dice the minimum sum is 2 so events(E) of getting sum=1 is 0, so Probability is
P(E) = n(E)/n(S) = 0/36= 0
E= {(1,4),(2,3),(3,2),(4,1)}= 4
P(E)=4/36=1/9
E={(1,1)}
P(E)=1/36
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.
Since there is population which is below pverty line and also speaks foreign language, they are not disjoint.
library(VennDiagram)
library(grid)
library(futile.logger)
vennDiag <- draw.pairwise.venn(area1 = 14.6, area2 = 20.7, cross.area = 4.2, category = c("BPL",
"Foreign language"),fill = c("light blue", "pink"), cat.pos = c(0,
0), cat.dist = rep(0.025, 2))
grid.draw(vennDiag);
10.4 %
Total in below poverty line + total speaking foreign language - the total that meet both criteria.
(14.6 + 20.7) - 4.2 = 35.3-4.2=31.1%
100 - 31.1 = 68.9%
If the events are independent then P(A ∩ B) = P(A)P(B).
P(A ∩ B) = 0.042 P(A)P(B) = 0.146 x 0.207 =0.030222
Not equal, so they are not independent.
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.
P(A) = Probability of blue eyed males P(B) = Probability of blue eyed partners
P(A or B) = P(A)+P(B)-P(A and B) =(114/204) + (108/204)-(78/204) =0.7059 70.59%
P(A|B) = P(A and B)/P(B)
P(A and B) = Blue eyed male with blue eyed partner = 78 P(B) = Blue eyed males = 114 so, 78/114=0.6842 or 68.42%
P(A|B) = P(A and B)/P(B)
P(A and B) = brown eyed male with blue eyed partner = 19 P(B) = brown eyed males = 54 so, 19/36=0.3518 or 35.18%
What about the probability of a randomly chosen male respondent with green eyes having a partner with blue eyes?
11/36 = 30.56%
From the above calculated probabilities we see - Eye colors do not seem independent, probabilities calculated above are different and show that the values are not independent.
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.
(28/95)x(59/94)= 0.1849=18.49%
(72/95)x(28/94)= 0.2257=22.57%
(72/95)x(28/95)= 0.2233=22.33%
Larger the samples, smaller the difference. 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. (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.
bags <- c('0-Bag','1-Bag','2-Bags')
fees <-c(0,25,60)
pass<-c(0.54,0.34,0.12)
sample <- data.frame(bags, fees, pass)
avg_rev_pp <- sum(sample$pass*sample$fees)/sum(sample$pass)
paste("Average revenue per passenger is ",avg_rev_pp)
## [1] "Average revenue per passenger is 15.7"
sd<- sqrt(0.54*(0-avg_rev_pp)^2 + 0.34*(25-avg_rev_pp)^2 + 0.12*(60-avg_rev_pp)^2)
paste("Standard deviation is ",round(sd,digits = 2))
## [1] "Standard deviation is 19.95"
For 120 passengers
for120 <- 120*15.7
paste("For 120 passengers the revenue is ",for120)
## [1] "For 120 passengers the revenue is 1884"
paste("Standard deviation is ",round(sd,digits = 2))
## [1] "Standard deviation is 19.95"
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.
As per the below plot, it is a continuous, multi-modal distribution
Less than 50,000 are 2.2+4.7+15.8+18.3+21.2 = 62.2% probability
Since we don’t have the information of females having less than 50k income we assume the events are independent :,
P(less than 50k income and female)=P(less than 50k income)xP(female) = 0.6220.41 =0.2550=25.50%*
P(less than 50k income and female)=P(less than 50k income)xP(female) 0.718 = 0.622*0.41 0.718 ≠ 0.255, This shows that the events are not independent and the assumption in case (c) doesn’t hold good.