r = 54
w = 9
b = 75
t = r+ w + b
round((b+r)/t,4)
## [1] 0.9348
g = 19
r = 20
b = 24
y = 17
t = g+r+b+y
round(r/t,4)
## [1] 0.25
3.A pizza delivery company classifies its customers by gender and location of residence. The research department has gathered data from a random sample of 1399 customers. The data is summarized in the table below. Gender and Residence of Customers Males Females Apartment 81 228 Dorm 116 79 With Parent(s) 215 252 Sorority/Fraternity House 130 97 Other 129 72
What is the probability that a customer is not male or does not live with parents? Write your answer as a fraction or a decimal number rounded to four decimal places.
round((81 + 228+116 + 79+130 + 97+129 + 72 + 252) / (81 + 228+116 + 79+130 + 97+129 + 72+ 215 + 252),4)
## [1] 0.8463
4.Determine if the following events are independent. Going to the gym. Losing weight.
Answer: A) Dependent
5.A veggie wrap at City Subs is composed of 3 different vegetables and 3 different condiments wrapped up in a tortilla. If there are 8 vegetables, 7 condiments, and 3 types of tortilla available, how many different veggie wraps can be made?
choose(8,3) * choose(7,3) * choose(3,1)
## [1] 5880
6.Determine if the following events are independent. Jeff runs out of gas on the way to work. Liz watches the evening news.
Answer: B) Independent
7.The newly elected president needs to decide the remaining 8 spots available in the cabinet he/she is appointing. If there are 14 eligible candidates for these positions (where rank matters), how many different ways can the members of the cabinet be appointed?
choose(14,8)
## [1] 3003
8.A bag contains 9 red, 4 orange, and 9 green jellybeans. What is the probability of reaching into the bag and randomly withdrawing 4 jellybeans such that the number of red ones is 0, the number of orange ones is 1, and the number of green ones is 3? Write your answer as a fraction or a decimal number rounded to four decimal places.
(choose(9,3) * choose(4,1)) / choose(22,4)
## [1] 0.04593301
9.Evaluate the following expression. 11!/7!
factorial(11) / factorial(7)
## [1] 7920
10.Describe the complement of the given event. 67% of subscribers to a fitness magazine are over the age of 34. This must mean that 33% of subscribers are equal or under the age of 34.
l = 30*(1-((1/2)^3))*-1
w = 97*(1/2)^3
l+w
## [1] -14.125
Step 2. If you played this game 559 times how much would you expect to win or lose? (Losses must be entered as negative.)
(l+w)*559
## [1] -7895.875
w = pbinom(q = 4,size = 9,prob = .5)
l = 1-w
(23*w) - (26*l)
## [1] -1.5
Step 2. If you played this game 994 times how much would you expect to win or lose? (Losses must be entered as negative.)
-1.5*994
## [1] -1491
sensitivity = .59
specificity = .90
l = .2
t = .8
l_sensitivity = sensitivity*l
false_sensitivity = (1-sensitivity)*l
t_specificity = specificity*t
false_specificity = (1-specificity)*t
l_sensitivity
## [1] 0.118
false_sensitivity
## [1] 0.082
t_specificity
## [1] 0.72
false_specificity
## [1] 0.08
l_sensitivity/(false_specificity+l_sensitivity)
## [1] 0.5959596
t_specificity/(t_specificity+false_sensitivity)
## [1] 0.8977556
l+sensitivity -l_sensitivity
## [1] 0.672