# Uniform distribution and probability

Let $$Y \sim \mathcal{U}(0,4)$$. If 20 independent random samples are extracted, what is the probability that in at least 5 of them $$Y > 2$$?

My attempt was: the required probability should be given by $$1 - P(Y \leq 2)^5$$, which would result in $$\boxed{\boxed{P^\star = 1-0,5^5 = 0.96875}}$$. However, when simulating the problem using R, I find that the probability is around $$0.993$$ or $$0.994$$.

Could anyone help me figure out where I am going wrong?

Thanks!

• The simulation is correct and your calculation is not. If you have learned about the binomial distribution, try thinking about it that way. Each one has a 50% chance of being greater than 2. It's like flipping 20 coins and finding the probability that you see at least 5 heads out of the 20. Mar 19, 2021 at 17:43
• Yes, indeed. I was able to see that. The correct calculation should be $1 - 0,5^{20} \cdot \left[ \binom{20}{0} + \binom{20}{1} + \binom{20}{2} + \binom{20}{3} + \binom{20}{4} \right] \approx 0,99409$, is that right? Thanks! Mar 19, 2021 at 17:47
• Yes that is correct. Mar 19, 2021 at 18:17

As pointed out in the comments, the correct answer is given by: $$1 - 0,5^{20} \cdot \left[ \binom{20}{0} + \binom{20}{1} + \binom{20}{2} + \binom{20}{3} + \binom{20}{4} \right] \approx 0,99409$$