Professional Documents
Culture Documents
Google Data Science Interview Question With Solution PDF
Google Data Science Interview Question With Solution PDF
Google Data Science Interview Question With Solution PDF
Given three random variables independent and identically distributed from a uniform distribution
of 0 to 4, what is the probability that the median is greater than 3?
Solution:
If we break down this question, we'll find that another way to phrase it is to ask what the
probability is that at least two of the variables are larger than 3.
For example, if look at the combination of events that satisfy the condition, the events can
actually be divided into two exclusive events.
Given these two events satisfy the condition of the median > 3, we can now calculate the
probability of both of the events occuring. The question can now be rephrased as P(Median > 3)
= P(A) + P(B).
Let's calculate the probability of the event A. The probability that a random variable > 3 but less
than 4 is equal to 1/4. So the probability of event A is:
The probability of event B is that two values must be greater than 3, but one random variable is
smaller than 3. We can calculate this the same way as the calculating the probability of A. The
probability of a value being greater than 3 is 1/4 and the probability of a value being less than 3
is 3/4. Given this has to occur three times we multiply the condition three times.