Consider 20 independent repetitions of drawing a bulb from a lot.
Probability that the bulb drawn will work for more than 500 hrs is 0.2.
Plot a probability distribution using python or scilab for getting k success in 20 trial
If I do something that has a constant probability of success - how many times do I need to do it to ensure that, on average, I'll be successful?
If you succeed with probability π independently of all previous attempts, then the probability you succeed at least once after π tries is 1β(1βπ)π . To succeed at least once on average you need
1β(1βπ)πβ₯0.5 (1βπ)πβ€0.5 πlog2(1βπ)β€β1 πβ₯β1log2(1βπ)
Edit: The difference between this answer and the other common answer of 1/π lies in the interpretation of the question, which is somewhat ambiguous. My answer gives π , the number of flips needed so that after performing π trials, the probability of having succeeded at least once is at least 0.5 . The answer 1/π is the average number of trials you will perform until you succeed once.
The difference is easily apparent for π=1/2 . My solution gives the answer π=1 since after one trial you will have succeeded half the time. The average number of trials you would perform to succeed once is greater than this because the minimum possible number of trials you could perform is one and sometimes it takes longer than that.