A bo* contains 54 red marbles, 9 white marbles, and 75 blue marbles. If a marble is randomly selected from the bo, what is the probability that it is red or blue? Epress your answer as a fraction or a decimal number rounded to four decimal places.
round((54+75)/(54+75+9), digits = 4)
## [1] 0.9348
round((20)/(19+24+17+20), digits = 4)
## [1] 0.25
Since we are being asked to provide NOT male or Does not live with parents, we are looking at two sets which are then added together (NO Male; Not with parents)
female <- round((228+79+97+72+252)/(1399), digits = 4)
male <- round((81+116+215+130+129)/(1399), digits = 4)
Noparents <- round((1399-215-252)/(1399), digits = 4)
round(female+Noparents/1399, digits = 4)
## [1] 0.5209
ANSWER: A) If we assume they are linked events, then the dependent. Loosing weight “can” be dependent on going to the gym.
# 8 different veggies where we choose 3
veggies <- choose(8,3)
# 7 different condiments where we choose 3
condiments <- choose(7,3)
# 1 types of tortilla where we choose 1
tortilla <- choose(3,1)
# combining all of them to get the answer
veggies*condiments*tortilla
## [1] 5880
Answer: B) Independent - there is no link between Jeff running out of gas and Liz watching the news. If Jeff ran out of gas, had an accident and Liz was watching the news for updates, then they would be dependent.
factorial(14)/factorial(14-8)
## [1] 121080960
However, Rank matters. I am not sure how to calculate this with RANK.
# out of 9 reds we want 0
red_jelly <- choose(9,0)
# out of 4 orange we want 1
orange_jelly <- choose(4,1)
# out of 9 green we want 3
green_jelly <- choose(9,3)
# if choice was free
all <- choose((9+4+9),4)
# probability pull
pull <- red_jelly*orange_jelly*green_jelly
round(pull/all, 4)
## [1] 0.0459
\[\frac { 11! }{ 7! } \]
The Factorial of 11 would be equal to \(11*10*9*8*7*6*5*4*3*2*1\) The Factorial of 7 would be equal to \(7*6*5*4*3*2*1\)
factorial(11)/factorial(7)
## [1] 7920
If 67% of the magazine are greater than age of 34 then the reverse or complement of this would be all users less than 34 years old.
age34 <- 0.67
1-age34
## [1] 0.33
(a <- pbinom(3, size = 4, prob = .5)-pbinom(2, size = 4, prob = .5))
## [1] 0.25
n <- 1-a
games <- 559
games*((a*97)-(n*30))
## [1] 978.25
(a <- pbinom(4, size= 9, prob = .5))
## [1] 0.5
negative.)
n <- 1-a
games <- 994
games*((a*23)-(n*26))
## [1] -1491
If the payout amount is higher than the win amount, the result will always be a loss to the player. If the win amount is higher than the payout amount, there is a good chance the player will take the profit.
If we reverse the numbers where I will pay you $26. Otherwise you pay me $23, you get:
n <- 1-a
games <- 994
games*((a*26)-(n*23))
## [1] 1491
If you reduce the amount of games but keep i pay you $23. Otherwise you pay me $26. You still get a loss:
n <- 1-a
games <- 2
games*((a*23)-(n*26))
## [1] -3
liar <- .20
truth <- 1-liar
detect_lie<- liar * .59
detect_truth <- truth *.90
answer_tbl <- data.frame(Detect_lies = c(detect_lie, truth-detect_truth),
Detect_truths = c(liar-detect_lie, detect_truth),
row.names = c("Lies", "Truths"))
answer_tbl
## Detect_lies Detect_truths
## Lies 0.118 0.082
## Truths 0.080 0.720
round(answer_tbl$Detect_truths[2]/(answer_tbl$Detect_truths[1]+answer_tbl$Detect_truths[2]),4)
## [1] 0.8978
(answer_tbl$Detect_lies[1]+answer_tbl$Detect_lies[2])+((answer_tbl$Detect_lies[1]+answer_tbl$Detect_truths[1])-answer_tbl$Detect_lies[1])
## [1] 0.28