We assume a fair dice with values 1-6
Zero, minimum sum that can be obtained from a pair of dice is 2(1+1).
Possible combinations for argetting the sum of 5 are (1,4), (2,3), (3,2), (4,1).
So probability of getting a sum of 5 is
4/36 = 1/9
Possible combinations for argetting the sum of 12 are (6,6)
So probability of getting a sum of 12 is =1/36
No. As according to the statistics 4.2% fall into both living below the proverty line and speaking a foreign language.
The following venn diagram summarizze the variables and their associated probabilities:
library(VennDiagram)
## Loading required package: grid
## Loading required package: futile.logger
poverty <- 14.6
foreign_Language <- 20.7
both <- 4.2
povertyOnly <- poverty - both
foreign_Language_Only <- foreign_Language - both
venn.plot <- draw.pairwise.venn(poverty,
foreign_Language,
cross.area=both,
c("Poverty", "Foreign Language"),
fill=c("pink", "lightblue"),
cat.dist=-0.08,
ind=FALSE)
grid.draw(venn.plot)
14.6-4.2
## [1] 10.4
14.6+20.7-4.2
## [1] 31.1
100-(14.6+20.7-4.2)
## [1] 68.9
The event that someone lives below the poverty line is not independent of the event that the person speaks a foreign language at home.
(114+19+11)/204
## [1] 0.7058824
(78/114)
## [1] 0.6842105
(19/54)
## [1] 0.3518519
The eye colors of male respondents and their partners are NOT independent.
P(blue male | blue female) = P(blue male) * P(blue female) (78/204) = (114/204) * (108/204).The values are not equal Therefore, eye colors of male respondents and their partners are NOT independent.
(28/95) * (59/94)
## [1] 0.1849944
(72/95) * (28/94)
## [1] 0.2257559
(72/95) * (28/95)
## [1] 0.2233795
The final answers to parts (b) and (c) are very similar because the possible events are considerable large so the outcome will not be affected much.
bag_piece <- c(0, 1, 2)
bag0 <- 0
bag1 <- 25
bag2 <- bag1 + 10
bag_fee <- c(bag0, bag1, bag2)
bag_percent <- c(0.54, 0.34, 0.12)
bag_revenue_per_person <- sum(bag_fee * bag_percent)
bag_revenue_per_person
## [1] 12.7
variance <- (25^2*.34 + 35^2*.12) - 12.7^2
variance
## [1] 198.21
standart_deviation <- sqrt(variance)
standart_deviation
## [1] 14.07871
Revenue per person is $12.7, Variance is 198.21 and the standard deviation is 14.07871
revenue_120 <- 12.7 * 120
revenue_120
## [1] 1524
standart_deviation_120 <- sqrt(variance * 120)
standart_deviation_120
## [1] 154.2245
The expected revenue for the 120 passengers is $1524. The standard deviation will be $154.2245
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")
total <- c(2.2,4.7,15.8,18.3,21.2,13.9,5.8,8.4,9.7)
distribution <- data.frame(income, total)
distribution
## income total
## 1 $1 to $9,999 2.2
## 2 $10,000 to $14,999 4.7
## 3 $15,000 to $24,999 15.8
## 4 $25,000 to $34,999 18.3
## 5 $35,000 to $49,999 21.2
## 6 $50,000 to $64,999 13.9
## 7 $65,000 to $74,999 5.8
## 8 $75,000 to $99,999 8.4
## 9 $100,000 or more 9.7
barplot(distribution$total, names.arg=income)
It seems normalcontinuous distribution.
sum(distribution[1:5,2]/100)
## [1] 0.622
0.622 * 0.41
## [1] 0.25502
Sample consists of 41% females. The probability that a randomly chosen US resident makes less than $50,000 per year and is female is 0.25502
Assumption: The probability of an income of less than $50,000 and being female are independent events.
If 71.8% of females make less than $50,000 per year the equation will be 0.718 = 0.622 * 0.41, which is not correct, so we can conclude that the assumption we made for step (c) is wrong. with the equation it looks like events are not independent.