Module lvbdist
Classes
class LVBdistribution (base, additional, threshold)-
Linearly varying "binomial" distribution
The probability of success given some trails will increase given successive failures util it hits 1, and the probability will reset to base if one success occurs
base: the starting probability to success. between 0 and 1. eg. 0.02additional: the constant added to the base probability upon failures. between 0 and 1. eg 0.02threshold: how many successive failures to trigger. nonnegative. eg 50Methods
def have_first_success_at_n(self, n)-
the chance for one fails for
n-1times, then succeed atn-th def have_first_success_at_n_E(self)-
average waiting trails until a success
def have_m_or_more_successes_within_n_attempts(self, n, m)-
the chance of having m or more successes within
ntrails def have_m_successes_within_n_attempts(self, n, m)-
the chance of having
msuccesses withinntrails def have_m_successes_within_n_attempts_E(self, n)-
average number of successes given
ntrails def have_special_success_within_n_attempts(self, n, p)-
an event with probability
pgiven a success can be marked as a special success.the chance of having at least one such special success within
ntrailspis between 0 and 1 exclusively. def have_special_success_within_n_attempts_E(self, p)-
an event with probability
pgiven a success can be marked as a special success.the average waiting trails until a success
pis between 0 and 1 exclusively. def have_success_given_no_successes_before(self, n)-
given that one failed for
n-1times, the chance of success atn-th def have_success_within_n_attempts(self, n)-
the chance of having at least one success within
ntrails def max_times_to_ensure_success(self)-
the index of trail where the success chance is 1