var("m")
n = 100
def choose(n, k):
return factorial(n) / (factorial(k) * factorial(n-k))
def prob(m, P1, P2):
return choose(n, m) * (P1/100)^m * (P2/100)^(n-m)
def p(n):
for i in range(n): yield float(i/n)
@interact
def bd(P1=p(100), P2=p(100)):
show(plot(prob(m, P1, P2), (m,0,100)))
|
|
Click to the left again to hide and once more to show the dynamic interactive window
|