Answer the question
In order to leave comments, you need to log in
How many hits will happen before a series of n misses?
There is a range of numbers from 0 to 99.99. A series of numbers is selected from this interval. The program generates every iteration a random number from the first interval. How to calculate how many hits in the target row will pass (on average) until a series of n misses occurs?
The formula should take the chance of success (that is, if the target range is 0-20, then the chance of success is 20%) as a single integer and the number of misses itself.
Thank you all in advance)
Answer the question
In order to leave comments, you need to log in
You have 10000 values. You choose N values. So the probability of hitting is p0 = N/10000.
Well, the theory goes on. You need to find the probability of k hits in a row followed by n misses in a row. Hence p(k,n) = p0^k*(1-p0)^n. Then you set the confidence probability p1, they say, let the event occur if its probability is not less than 0.9. Well, choose such k and n so that p(k,n)>=p1.
And from this theory, using numerical methods, derive the formula you need in the program yourself.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question