The number of possible events in which a cumulative sum of 1 can be obtained by rolling a pair of dice is 0.
p = 0/36
print(p)
## [1] 0
The number of possible events in which a cumulative sum of 5 can be obtained by rolling a pair of dice. There are two pairs of sums, which can occur in any order. The set # S = {(2,3), (3,2), (1,4), (4,1)} of ordered pairs has one element for each possible favorable outcome.
p = 4/36
print(p)
## [1] 0.1111111
The number of possible events in which a cumulative sum of 12 can be obtained by rolling a pair of dice. The set of favorable outcomes is # S = {(6,6)}
p = 1/36
print(p)
## [1] 0.02777778
Since 4.2% fall into both categories, they are not disjoint.
# require("VennDiagram")
# library(VennDiagram)
Percent who live below the poverty line and only speak English at home:
print(14.6 - 4.2)
## [1] 10.4
Percent who live below the poverty line or speak a foreign language at home:
print(14.6 + 20.7 - 4.2)
## [1] 31.1
Percent who live above the poverty line and only speak English at home:
print(100 - (14.6 + 20.7 - 4.2))
## [1] 68.9
Let A be the event that someone lives below the poverty line, Let B be the event that the person speaks a foreign language at home.
# P(A) = 0.146
# P(B) = 0.207
# P(A and B) = 0.042
# P(A) * P(B) = 0.146 * 0.207 = 0.030222
Since these two quantities are not equal, the given probabilities are not independent.
P = 114/204
print(P)
## [1] 0.5588235
P = (78/114)
print(P)
## [1] 0.6842105
# Prob. that a randomly chosen male respondent with brown eyes
# has a partner with blue eyes.
P = (19/54)
print(P)
## [1] 0.3518519
# Prob. that a randomly chosen male respondent with green eyes
# has a partner with blue eyes.
P = (11/35)
print(P)
## [1] 0.3142857
No it does not appear that the eye colors of male respondents and their partners are independent. The diagonal from the top left to bottom right contains the numbers for same-color partners. This diagonal also contains the largest numbers in each row, implying that the same-color partners always have the highest probabilities.
# The total number of possible events is
T = 95*94
# Two disjoint events:
# E1: hardcover fiction drawn, then paperback fiction drawn
# E2: hardcover nonfiction drawn, then paperback fiction drawn
E1 = 13 * 58
E2 = 15 * 59
P = (E1 + E2)/T
print(P)
## [1] 0.1835386
# Two disjoint events:
# E1: drawing a hardcover fiction book, then a hardcover book
# E2: drawing a paperback fiction book, then a hardcover book
E1 = 13 * 27
E2 = 59 * 28
P = (E1 + E2)/T
print(P)
## [1] 0.2243001
# Same as (b), except that fiction book is replaced.
E1 = 13 * 28
E2 = 59 * 28
P = (E1 + E2)/T
print(P)
## [1] 0.2257559
The values in (b) and (c) are very similar because the total number of hardcover books (28) is relatively large compared to the number removed (1). If the total number of hardcover books was much less, e.g. 4 or 5, then the probabilities would differ by a greater amount.
# Assume a sample of 100 passengers.
# Ave. revenue per passenger:
E = (54*0 + (34+12)*25 + (12*35))/100
print(E)
## [1] 15.7
# variance
V = (54*((15.7)^2) + 34*((25-15.7)^2) + 12*((60-15.7)^2))/99
# standard deviation
S = V^(1/2)
print(S)
## [1] 20.05069
# Revenue for a flight of 120 passengers
# The Expected value calculated above in part (a) can be used
R = E*120
print(R)
## [1] 1884
# The distribution appears to be a normal distribution with a
# peak around the center.
P = 21.2+18.3+15.8+4.7+2.2
print(P)
## [1] 62.2
# In a sample of 100 persons, 62.2 make below $50000.
# of those, 41% are expected to be female
P = .622*.41
print(P)
## [1] 0.25502
This assumes that gender is independent of income.
If we assume that gender has an equal proportion in all income brackets, then the expected percentage would be 25.5%.
Since this is much less than the actual 71.8%, this implies that gender is not uniformly distributed across all income levels. The assumption in (c) in invalid.