This JavaScript program computes the maximum likelihood
estimator of, and conservative confidence intervals for, the
number of trials in a sequence of independent Bernoulli
trials. The success probability on each trial is assumed to
be known as is the observed number of successes in those
trials. The theory underlying the computations can be found
in the paper *Conservative Confidence Intervals for a
Single Parameter* by Mark Finkelstein, Howard G. Tucker
and Jerry Alan Veeh, which appeared in *Communications in
Statistics: Theory and Methods* volume 29 #8 pages
1911-1928 (2000). Some of the computational methods use
algorithms from *Applied Statistics Algorithms*. The
annotated source code is available