[Probability] There are two mobile restroom stalls at a construction site where I work. There are also three situations that have an equal chance of occurrence: a. none of them is occupied b. only one of them is occupied c. both are occupied 1. If I were to pick one at random, what is the probability that it is occupied? 2. If it turns out that that first one I go to is occupied and I decide to try the other one, what is the probability that the second one is also occupied? (Asked in Facebook interviews)

Data Science Interview QuestionsCategory: Data Science[Probability] There are two mobile restroom stalls at a construction site where I work. There are also three situations that have an equal chance of occurrence: a. none of them is occupied b. only one of them is occupied c. both are occupied 1. If I were to pick one at random, what is the probability that it is occupied? 2. If it turns out that that first one I go to is occupied and I decide to try the other one, what is the probability that the second one is also occupied? (Asked in Facebook interviews)
MockInterview Staff asked 6 years ago
1 Answers
MockInterview Staff answered 6 years ago

the answer to the first question is – 1/3 + 1/3*1/2 = 1/2

the answer to the second question require the formula of conditional probability. Let’s say:
P(A) – probability that second stall is occupied
P(B) – probability that the first stall is occupied
P(A\B) = P(AandB) / P(B)

P(B) = 1/2 (first question)
P(AandB) = 1/3
P(A\B) = (1/3) / (1/2) = 2/3
Source

Your Answer

19 + 3 =