# Calculating the probability of a level of success on a series of tests.

This question is about performing a series of tests, each one randomly passing or failing with a known probability. Successes give you a point, fails take one away. The aim is to find out the overall likelihood of achieving a certain score at least once along the way.

Let's say we have -

n = number of tests,

p = probability of success in a test,

s = score required to pass the entire scenario.

Example: I have up to 100 coin flips to acquire a score of +10. Heads are +1 and tails are -1. If at any point i am at +10, the scenario is a pass. If i never reach +10, it's a fail. What would be the probability of passing the scenario here? (n=100, p=0.5, s=10)

If anyone can figure out the formula for this I'd be very grateful! I can't wrap my brain around this.

you are dealing with binomial distribution here, the probability of which is calculated using the formula:

X ~ Bin(n,p)

P(X=x) = (nCx)(p)^x(1-p)^(n-x)

but you dont care if you receive a value greater than x so we use a summation

________n
P(X>_x) = S((nCi)(p)^i(1-p)^(n-i))
_______i=x

in the example given, this would be

X~Bin(100,0.5)
________100
P(X>_55) = S((100Ci)(0.5)^i(0.5)^(100-i))
________i=55

which shortens to

________100
P(X>_55) = S((100Ci)(0.5)^100 = 0.1841 (4d.p.)
________i=55