Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# https://books.google.ie/books?id=yAMtOS6G4sgC&printsec=frontcover&source=gbs_ge_summary_r&cad=0#v=onepage&q&f=false
r = 3
n = 4
P = [0] * r
p = 0.5
q = 1 - p
P.append(p**r)
for i in range( r, n ):
P.append( P[i] + ( 1 - P[i-r])*q*p**r )
print(P[-1])
@andres-alvarado

This comment has been minimized.

Copy link
Owner Author

@andres-alvarado andres-alvarado commented Jul 29, 2020

( 1 - (1 - ( 1 - ( 1 - 6.866281707670744e-05 )**30 ))**40 ) * 100

( 1 - ( 1 - 6.866281707670744e-05 )**30 ) * 100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.