How this calculation works
A Bernoulli confidence sequence updates an interval for the same unknown success probability after every observed trial. A beta-mixture likelihood-ratio construction controls the probability of ever excluding the truth under the named IID model, so optional monitoring is part of its interpretation rather than an afterthought.
M_t(p)=B(S_t+a,t−S_t+b)/(B(a,b)p^S_t(1−p)^(t−S_t)); C_t={p:M_t(p)<1/alpha}.A worked example
With twenty alternating0,1 observations, ten successes, a=b=1 and95%confidence, the twentieth mixture interval is approximately[0.2042984121,0.7957015879]. Its width reflects time-uniform monitoring rather than a fixed-time binomial interval.
Good to know
1–10000 entered0/1 outcomes, confidence80–99.9%, positive beta-mixture shape inputs0.1–10. Compute log beta-binomial mixture ratios, invert both endpoints and report the full sequence including all-success/all-failure boundaries. IID Bernoulli model; repeated monitoring is covered under the named construction, not arbitrary dependent trials or post-hoc mixture selection.
Reference: Howard et al., Time-uniform nonparametric nonasymptotic confidence sequences (opens in a new tab) ↗
A statement that survives repeated monitoring
A fixed-time confidence interval is designed for a specified sample size. Recalculating it after every observation and stopping when it looks persuasive generally changes its error behavior. A confidence sequence instead aims to contain the same unknown parameter simultaneously throughout the monitored sequence. Its width pays for that broader repeated-time statement.
The construction here is for IID Bernoulli trials: each outcome is zero or one with a common success probability. The entered order identifies the sequence of monitoring times. Ordered outcomes do not make changing success probabilities or serial dependence acceptable. Those are different stochastic models, even when the sample fraction appears stable.
Compare this with the Sequential probability ratio test calculator for Bernoulli trials. Invert a nonnegative mixture likelihood-ratio martingale at every time to obtain a time-uniform confidence sequence for an unknown success probability. The existing SPRT tests two fixed probabilities and returns a stopping decision; it does not estimate a continuously varying set of plausible probabilities.
Choose the mixture before looking at results
The positive beta shapes a and b specify a mixture of alternative success probabilities. They tune the evidence process but are not posterior-prior declarations about a population in this interface. Fixing them before observing the sequence preserves the intended martingale argument. Selecting whichever shapes give the narrowest displayed interval after inspection requires additional correction.
Confidence is one minus alpha. At each time, the calculator combines the current success count, failure count and fixed mixture shapes. It works in logarithms so products of many small probabilities do not underflow. Outcomes other than exact zero or one, empty rows or unsupported monitoring lengths are rejected rather than silently rounded into trials.
Invert the mixture evidence process
For a proposed probability p, compare a beta-integrated Bernoulli likelihood with the likelihood under p. Under the null model, that ratio is a nonnegative martingale with initial value one. A threshold of one divided by alpha controls the probability that it ever crosses the threshold, using the same declared mixture throughout monitoring.
The confidence set keeps parameter values whose ratios have not become too large. For an interior success fraction, the log ratio is convex in p and reaches its minimum at the observed fraction. There is one lower and one upper boundary to solve. In all-success or all-failure prefixes, one endpoint remains at the parameter-space boundary.
Check the alternating-trial example
Twenty alternating zero and one outcomes contain ten successes and ten failures. With a equal to b equal to one, the integrated likelihood numerator is B(11,11). The95%threshold is twenty. Solving B(11,11) divided by p to the tenth power times one minus p to the tenth power equal to twenty gives the two endpoints.
The resulting interval is approximately0.2042984121 to0.7957015879. Symmetry around one half is expected because both the counts and mixture shapes are symmetric. This is wider than many fixed-sample intervals with the same nominal confidence. That difference is not a calculation defect: the confidence sequence supports simultaneous monitoring over time.
Read the path without changing its target
The success fraction is a descriptive estimate at each prefix; the band is the time-uniform uncertainty statement. A surprising early run may create a wide or asymmetric interval. Later observations can move both endpoints. Individual mixture intervals need not be nested, although intersecting all previous confidence sets gives an optional nested sequence with the same coverage protection.
An optional stopping time may be marked on the path after the construction has been fixed. The event that the confidence sequence always contains the truth already accounts for such monitoring. This does not justify selecting a favorable starting point, discarding inconvenient earlier observations or searching several uncorrected confidence-sequence methods after observing their results.
Validate boundary behavior numerically
Complement every outcome and exchange the two beta shapes. Lower and upper endpoints should transform to one minus the previous upper and lower endpoints. This complement symmetry is a strong check on success/failure bookkeeping. Log-ratio values evaluated at solved endpoints should also agree with the chosen logarithmic threshold within the reported numerical tolerance.
For short sequences, enumerate every possible path at a fixed true p and add the probabilities of paths crossing by the chosen horizon. The total should remain below alpha, allowing only controlled numerical error. Such enumeration checks finite prefixes; the theoretical infinite-horizon interpretation still rests on the martingale construction and its sampling assumptions.
Distinguish related sequential procedures
A sequential probability ratio test compares two fixed probability hypotheses and may stop with a decision between them. This calculator estimates a continuum of plausible success probabilities instead. Group-sequential boundaries for a planned collection of normal test statistics answer yet another question. Similar-looking time plots do not make these procedures interchangeable.
The page does not adapt to an unknown changing probability or correct repeated trials from the same dependent subject. A numerical result should be reported with the outcome definition, monitoring origin, mixture shapes and confidence level. Diagnostics about the data-generating process remain necessary; a time-uniform mathematical statement cannot repair a misspecified observation model.
A few questions, answered
Can I stop after seeing a narrow interval?
Optional monitoring and stopping are covered under the specified confidence-sequence construction and IID model, provided its tuning was fixed appropriately.
Are the beta shapes posterior beliefs?
They define the mixture evidence process used for coverage. A Bayesian posterior interpretation is a separate analysis and is not needed for this guarantee.
Must intervals shrink every time?
No. Individual mixture intervals may move or widen. A running intersection can provide a nested sequence, but is a distinct displayed convention.
What if every observation is a success?
The success-probability upper endpoint remains at one. The lower endpoint is still determined by the mixture evidence calculation.