Hi there!
I've written a little widget, called "Probability of Infections in a Group", dedicated to calculate the probability P
(in percent) that at least k
members of a group the size n
are infected (with some ominous virus, what might it be ...), given the population size A
and the number of cases in that population C
. For that, I've written the easiest imaginable model, based on a binomial distribution, as follows:
(100 * (1 - sum((binomial[${n},(i-1)] * ((${C}/${A})^(i-1)) * ((1 - (${C}/${A}))^(${n}-(i-1)))), i=0..${k})))
Only thing bugging me is: It doesn't work. At least not for all values. By varying one or more of the four variables in patterns I haven't fully understood yet I create either just empty white space or the error "Not a valid input; please try again".
What am I doing wrong? How can I fix it and make this very basic widget do its very basic task?
Maybe a screenshot of the "WolframAlpha Widget Builder" will help you solve this question? I'll attach it.
screenshot of the "WolframAlpha Widget Builder"
I should also mention that I don't have a genuine scientific or programming background, don't use "Wolfram Alpha" regularly and that this is my first attempt to create a widget - just so that my incompetence doesn't irritate you too much.
Thank you all, cheers!!