Q1 Marbles

A box contains 54 red marbles, 9 white marbles, and 75 blue marbles. If a marble is randomly selected from the box, what is the probability that it is red or blue? Express your answer as a fraction or a decimal number rounded to four decimal places.

(54+75)/(54+9+75)
## [1] 0.9347826

Q2 Golf Balls

You are going to play mini golf. A ball machine that contains 19 green golf balls, 20 red golf balls, 24 blue golf balls, and 17 yellow golf balls, randomly gives you your ball. What is the probability that you end up with a red golf ball?

20/(19+20+24+17)
## [1] 0.25

Q3 Pizza

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.

alt text here

alt text here

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.

(81+116+215+130+129+252)/(81+228+116+79+215+252+130+97+129+72)
## [1] 0.659757

Q4 Weight Loss

Determine if the following events are independent. Going to the gym. Losing weight. 4. Answer: Dependent

Q5 City Subs

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?

# If we assume that every sub MUST have 3 DIFFERENT veggies, 3 condiments and 1 tortilla (no "plain" subs alllowed, no "double onions") 

choose(8,3)*choose(7,3)*3
## [1] 5880

Q6 News

Determine if the following events are independent. Jeff runs out of gas on the way to work. Liz watches the evening news.

Independent

Q7 Cabinet

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?

factorial(14) / factorial(14-8)
## [1] 121080960

Q8 Jellybeans

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?

correct_comobos <- choose(4,1) * choose(9,3)
all_combos <- choose(9+4+9,4)
correct_comobos/all_combos
## [1] 0.04593301

Q9 Factorials

Evaluate the following expression.
11! / 7!

factorial(11) / factorial(7)
## [1] 7920
#For good measure 

11*10*9*8
## [1] 7920

Q10 Fitness Mag

Describe the complement of the given event. 67% of subscribers to a fitness magazine are over the age of 34.

33% of subscribers are 34 years old, or younger.

Q11 Heads / Tails

If you throw exactly three heads in four tosses of a coin you win $97. If not, you pay me $30.

Step 1. Find the expected value of the proposition. Round your answer to two decimal places.

WinOdds <- pbinom(3, 4, 0.5) - pbinom(2, 4, 0.5)

WinOdds*97 + (1-WinOdds)*(-30)
## [1] 1.75

Step 2. If you played this game 559 times how much would you expect to win or lose? (Losses must be entered as

negative.)

WinOdds*97 + (1-WinOdds)*(-30)*559
## [1] -12553.25

Coin Flip

Flip a coin 9 times. If you get 4 tails or less, I will pay you $23. Otherwise you pay me $26.

Step 1. Find the expected value of the proposition. Round your answer to two decimal places.

WinOdds <- (choose(9,4)+choose(9,3)+choose(9,2)+choose(9,1))*(1/(2^9))

WinOdds*23 + (1-WinOdds)*(-26)
## [1] -1.595703

Step 2. If you played this game 994 times how much would you expect to win or lose? (Losses must be entered as

negative.)

(WinOdds*23 + (1-WinOdds)*(-26)) * 994
## [1] -1586.129

Polygraph

The sensitivity and specificity of the polygraph has been a subject of study and debate for years. A 2001 study of the use of polygraph for screening purposes suggested that the probability of detecting a liar was .59 (sensitivity) and that the probability of detecting a “truth teller” was .90 (specificity). We estimate that about 20% of individuals selected for the screening polygraph will lie.

TruthTeller = .8
LieTeller = .2
TruthTeller_Pass = .8.9 TruthTeller_Fail = .8(1-.9) LieTeller_Fail = .2.59 LieTeller_Pass = .2(1-.59)

df <- data.frame(c(.8*.9,.8*(1-.9)),c(.2*.59,.2*(1-.59)))
names(df)<-c("Truth","Lie")
row.names(df) <- c("Correct","Incorrect")
df
##           Truth   Lie
## Correct    0.72 0.118
## Incorrect  0.08 0.082
  1. What is the probability that an individual is actually a liar given that the polygraph detected him/her as such? (Show me the table or the formulaic solution or both.)
#Lie_Correct / [Lie_Correct+Truth_Incorrect]
.118/(.118+.08)
## [1] 0.5959596
  1. What is the probability that an individual is actually a truth-teller given that the polygraph detected him/her as such? (Show me the table or the formulaic solution or both.)
#Truth_Correct / [Truth_Correct + Lie_Incorrect]

.72/(.72+.082)
## [1] 0.8977556
  1. What is the probability that a randomly selected individual is either a liar or was identified as a liar by the polygraph? Be sure to write the probability statement.
#All Liars + Truth_Incorrect 

.2 + .08
## [1] 0.28