A proportion's interval near the boundary, and the coin

The coin a clock supplies

A count observed over a window comes with the times its events arrived, and given the count those times are uniform whatever the rate is — so they are a coin with a continuum of faces at every count from one up. Used to randomise the interval for a Poisson mean, they leave exactly one count without a coin, the count of zero, and what that count is given decides everything: mid-p's limit of ln 20 leaves a hole at 92.5%, and the exact interval's ln 40 is the shortest limit that leaves none, after which the interval covers exactly 97.5% below an expected count of 3.69 and exactly 95% above it.

Worth reading first: More data is not monotonically better.

The coin that is already there found that the order in which a sequence of trials’ successes arrived can play the part of the randomised interval’s coin: given the count, every arrangement of the successes is equally likely whatever the proportion, so the arrangement’s rank is a uniform that nobody drew and every analyst can recompute. Between proportions of 0.2 and 0.8 it delivered the drawn coin’s exact 95% to within a tenth of a point. At the ends it failed, because a count of zero has one arrangement and a count of one has only as many as there are trials, and a coin with one face or twenty cannot imitate a uniform.

The essay ended on a process observed continuously rather than in trials. Events that arrive at random over a window — failures over a year of service, cases over a season, decays over a counting interval — come with their times, and the times have the property the arrangement had, in a stronger form. Whether that coin removes the hole at the rare end, and what a count of zero, which has no times at all, forces the interval to give up, are both exact sums. The answer to the second turns out to decide the first.

Coverage against the expected count of the interval whose coin is read from the arrival times. The randomised interval for a Poisson mean, with its coin read from where in the window the events fell, covers exactly 97.5% at every expected count between 0.025 and ln 40 = 3.689 and exactly 95% past it, when a count of zero is given the exact interval's [0, ln 40]; its worst is 95.00%. Given mid-p's [0, ln 20] instead, it falls to 92.50% just past 3.00. Mid-p itself reaches 91.66% at 3.03; the exact interval never falls below 95.62% and averages well above 95%.
Fig. 1 Coverage against the expected count, on a logarithmic scale, of the randomised interval for a Poisson mean whose coin is read from the events’ arrival times — with a count of zero given the exact interval’s limit, and given mid-p’s — beside mid-p and the exact (Garwood) interval. The dashed line is 95%.

Times that say nothing about the rate

Suppose events arrive as a Poisson process over a window of unit length, at a rate whose expected count over the window is μ\mu. The count kk is Poisson with mean μ\mu, and it is what every interval for μ\mu uses. Given kk, the kk arrival times are distributed as kk independent uniforms on the window, sorted, and that distribution has no μ\mu in it. The times are ancillary given the count in exactly the sense the arrangement of trials was, but where the arrangement took one of (nk)\binom{n}{k} values, the times take a continuum.

That makes any function of the times that is uniform given kk an exact coin. The simplest is built from the last arrival. If t(k)t_{(k)} is the latest of kk uniform times, P(t(k)≤t)=tkP(t_{(k)} \le t) = t^k, so

u=t(k) ku = t_{(k)}^{\,k}

is uniform on the unit interval given kk, at every kk from one upwards. The randomised interval then contains every μ\mu for which P(X>k)+u P(X=k)P(X > k) + u\,P(X = k) lies between 2.5% and 97.5%, exactly as with a drawn coin, and two analysts reading the same times get the same interval.

At a count of one the coin is the single event’s position in the window, and it has a continuum of values where the order of twenty trials offered twenty. Every count that has an event in it now has a coin as good as a drawn one. Only a count of zero is left without one, because no events means no times, and the interval at a count of zero has to be a stated number.

Exact everywhere the count has a time

With a continuous coin at every count from one up, the coverage at an expected count μ\mu is the drawn coin’s 95% plus a correction that comes entirely from the count of zero. A drawn coin at zero would have covered with some probability; the stated interval at zero either covers or it does not; the difference, weighted by P(X=0)=e−μP(X = 0) = e^{-\mu}, is the whole of the departure from 95%.

The hero figure shows what that leaves. Given the exact interval’s limit at zero, [0,ln⁡40][0, \ln 40], the arrival-time interval covers exactly 97.5% at every expected count between 0.025 and ln⁡40=3.689\ln 40 = 3.689, and exactly 95% at every expected count beyond it. Its worst coverage anywhere is 95.00%. There is no oscillation and no hole: the curve is two flat segments joined by a step.

The step is easy to account for. Below ln⁡40\ln 40 a count of zero always covers, where a drawn coin would have covered with probability 1−0.025 eμ1 - 0.025\,e^{\mu}; the excess is e−μ×0.025 eμe^{-\mu} \times 0.025\,e^{\mu}, which is exactly 2.5 points whatever μ\mu is. Above ln⁡40\ln 40 the stated interval at zero no longer covers, and neither would a drawn coin, so the excess is zero. The only thing on the curve that is not exactly 95% is the stated interval at zero being conservative where a coin would have gambled.

Beside it, mid-p’s coverage oscillates as every interval for a count does, and reaches its worst, 91.66%, at an expected count of 3.03. The exact interval never falls below 95.62% on this range and spends most of it above 98%, which is the price a guaranteed minimum always charged for a count. The score interval for a Poisson mean, the count’s analogue of Wilson’s, has the hole a hole no sample size fills found for a proportion: 83.86% at an expected count of 0.176.

The limit a count of zero needs

What the zero count is given is not a detail. Given mid-p’s limit, [0,ln⁡20][0, \ln 20], the same arrival-time coin produces the dashed curve in the hero figure: exact at 97.5% up to an expected count of 3.00, and then a drop to 92.50%, recovering towards 95% as the probability of seeing nothing dies away. The coin is the same in both curves; only the interval at zero changed, and it moved the worst case by two and a half points.

How long the interval for a count of zero has to be. The worst coverage of the arrival-time interval at any expected count, against the upper limit of the interval reported when no event is seen: 97.5% less e raised to minus that limit, for limits below ln 40, and exactly 95% from ln 40 = 3.689 on. Mid-p's limit, ln 20 = 2.996, leaves the worst at 92.5%; the exact interval's, ln 40, is the shortest that leaves none; the score interval's, the square of 1.96 = 3.841, is longer than it needs to be and buys nothing more on the minimum.
Fig. 2 The worst coverage of the arrival-time interval over every expected count, against the upper limit u0u_0 given to the interval reported when no event is seen. It is 97.5%−e−u097.5\% - e^{-u_0} below ln⁡40\ln 40 and exactly 95% from there on. Mid-p’s, the exact interval’s and the score interval’s zero limits are marked.

The frontier is in closed form. With a limit u0u_0 shorter than ln⁡40\ln 40, an expected count just above u0u_0 sees a count of zero with probability e−u0e^{-u_0}; the stated interval misses, while a drawn coin would have covered with probability 1−0.025 eu01 - 0.025\,e^{u_0}, so the coverage there is 95%−(e−u0−0.025)95\% - (e^{-u_0} - 0.025), which is 97.5%−e−u097.5\% - e^{-u_0}. Mid-p’s limit, ln⁡20=2.996\ln 20 = 2.996, puts the worst at exactly 92.5%. Lengthening the zero interval raises the worst case steadily until, at u0=ln⁡40u_0 = \ln 40, it reaches 95% and stops: any longer limit leaves the minimum where it is and adds coverage only between ln⁡40\ln 40 and the new limit.

So the exact interval’s limit at zero is not one choice among many. It is the shortest limit for which the arrival-time interval never covers below 95%, and it is forced: a reader who wants no hole has to accept [0,3.689][0, 3.689] as the report on seeing nothing. The score interval’s zero limit, z2=3.841z^2 = 3.841, is longer than it needs to be and buys nothing on the minimum. Mid-p’s is shorter than it can afford.

That is the part a count of zero forces the interval to give up. The arrival-time interval is not exactly 95% everywhere: below an expected count of 3.69 it is exactly 97.5%, conservative by a fixed two and a half points, because the report on seeing nothing has to be long enough to cover the expected counts that often produce nothing. That is a smaller concession than it sounds. The exact interval is conservative by three to five points across most of the same range, and it is conservative above 3.69 as well, where the arrival-time interval is not.

The hole was the count of zero’s all along

The same arithmetic applies to the coin read from the order of a fixed number of trials, and it says something about the order of arrival that the earlier essay did not separate. That coin had two weaknesses at the rare end: a count of none had a single face, so its interval was mid-p’s; and a count of one had only nn faces. Its worst coverage, 92.60% at twenty trials, was attributed to both.

The worst coverage of a coin read from the data, by where it is read and what a count of none is given. Worst coverage over the whole range of the proportion or the expected count. The coin read from the order of the trials, whose count of none has one face and so reports mid-p's interval: 92.51% at 10 trials, 92.60% at 20 trials, 92.72% at 50 trials. With the counts of none and of all given the exact interval's one-sided limit instead: 94.56%, 94.79%, 94.93% — short of 95% only because a count of one still has n faces rather than a continuum. Read from arrival times, which give a count of one a continuum: 92.50% with mid-p's limit at none and 95.00% with the exact one.
Fig. 3 The worst coverage over the whole range of the proportion, for the coin read from the order of ten, twenty and fifty trials — with its single face at a count of none, and with the counts of none and of all given the exact interval’s one-sided limit instead — and over the whole range of the expected count for the coin read from arrival times, with each limit at zero. Bars start at 90%.

Give the counts of none and of all the exact interval’s one-sided limit, as the arrival-time interval’s zero count was given, and the order’s worst coverage rises from 92.51% to 94.56% at ten trials, from 92.60% to 94.79% at twenty and from 92.72% to 94.93% at fifty. Most of the hole was the single face at zero. What remains — a fifth of a point at twenty trials, seven hundredths at fifty — is the count of one’s nn faces, which cannot quite imitate a continuum. Read from a clock, the count of one has a continuum of faces and the remainder is zero.

The arrival times are the order’s limit in the plainest sense: as the trials become more numerous and each less likely to succeed, with the expected count held fixed, the positions of the successes among the trials become uniform times in a window, which is the Poisson limit of a binomial count applied to the coin as well as to the count. So the figure is one sequence. The order of ten trials is a coin with ten faces at a count of one, of fifty trials one with fifty, and the clock is the coin with all of them, and in every case the decisive choice is what is reported when nothing happened.

When the rate drifts across the window

The times are ancillary only if the rate is constant across the window. If it drifts — a hazard rising with age, a season building towards its peak — events crowd towards the end, the last arrival tends to be late, and the coin built from it is no longer uniform given the count.

Which side the clock coin's interval misses the average rate on, when the rate drifts, at an expected count of 5. With the rate rising linearly across the window, the coin read from the last arrival leaves the average rate below its interval 2.07% of the time and above it 3.34% at the largest drift, where the rate starts at zero, against 2.50% and 2.50% with none; its coverage is 94.59%. The folded coin, read from each event's distance to the window's middle, misses 2.50% and 2.50% at every drift: a linear trend moves no probability between distances from the middle.
Fig. 4 With the rate rising linearly across the window from (1−δ)(1 - \delta) to (1+δ)(1 + \delta) times its average, the share of intervals that miss the window’s average rate on each side, at an expected count of five, for the coin read from the last arrival and for the folded coin read from the events’ distances to the middle of the window. Exact sums, with each coin’s law under the drift in closed form.

The last-arrival coin tilts the way the order of trials did. At an expected count of five, with the rate rising from zero at the start of the window to twice its average at the end, the interval leaves the average rate below it 2.07% of the time and above it 3.34%, against 2.50% and 2.50% with no drift, and covers 94.59%. At half that drift the split is 2.26% and 2.92%. A late last arrival gives a large coin value, a large coin value moves the interval down, and the interval errs low. A coin built from the first arrival tilts in the same direction by a different amount, since the first arrival is late too when the rate rises.

A clock has more than one coin in it, though, and some are immune. Fold each time about the middle of the window, si=∣2ti−1∣s_i = |2t_i - 1|, and build the coin from the largest: u=(max⁡isi)ku = (\max_i s_i)^k. Under a constant rate the sis_i are uniform, so the coin is exact. Under a linearly drifting rate they are still uniform, because a linear intensity adds exactly as much probability at distance ss on one side of the middle as it removes at the same distance on the other. The folded coin’s misses stay at 2.50% and 2.50% at every drift, exactly, and its coverage does not move.

The folded coin is not immune to everything. A rate that peaks in the middle of the window, or at both ends, moves probability between distances from the middle, and a folded coin would tilt under it as the last-arrival coin tilts under a trend. What the folding buys is protection against the one departure most likely to go unnoticed in a single window, and it buys it at no cost under the null, since every one of these coins is exactly uniform when the rate is constant.

What the interval costs in width

A coin that covers less where the exact interval covers more should give a shorter interval, and it does.

What each interval for a count costs in width, against the exact one. Expected width as a share of the exact (Garwood) interval's. The arrival-time interval, with the exact limit at a count of zero: 95.8% at 0.25, 93.2% at 0.5, 90.6% at 1, 89.6% at 2, 90.0% at 3, 91.3% at 5, 92.7% at 8, 93.8% at 12. Mid-p: 83.4%, 85.0%, 87.1%, 89.4%, 90.6%, 92.0%, 93.2%, 94.1%. The score interval: 102.4%, 101.1%, 99.3%, 97.2%, 96.3%, 95.5%, 95.4%, 95.6%.
Fig. 5 Expected width against the expected count, as a share of the exact interval’s, for the arrival-time interval with the exact limit at zero, for mid-p and for the score interval. The coin is integrated over sixty-four values at each count.

At an expected count of one the arrival-time interval is 90.6% as wide as the exact interval on average; at two, 89.6%; at twelve, 93.8%. Its width falls back towards the exact interval’s only at the smallest expected counts, 95.8% of it at a quarter, where a count of zero is the likeliest outcome and the two report the same interval on it. Mid-p is narrower still at small expected counts, 87.1% of the exact width at one, and the difference is precisely its shorter zero interval — the length that leaves the hole at 92.5%. The score interval is 99.3% of the exact width at one and pays for that width with the deepest hole of the three.

So the comparison the figure draws is the one the frontier implied. Among intervals that never cover below 95%, the arrival-time interval with the exact zero limit gives back a tenth of the exact interval’s width through the middle of the range. Among intervals that are shorter still, every one buys its extra narrowness at the rare end, by reporting less than [0,ln⁡40][0, \ln 40] on seeing nothing.

The objection, and where the clock leaves it

The coin that is already there set out the objection that reproducibility does not answer: two records with the same count have the same likelihood for the rate, and an interval that differs between them depends on something the likelihood ignores. The clock makes that sharper. Two windows with one event each, one early and one late, carry the same evidence about the rate in the likelihood’s sense and get different intervals.

The defence is the same one and no stronger: a 95% interval is a promise about the procedure, and this is a procedure that keeps the promise exactly wherever an event was seen, with a coin anyone can recompute from the record. The clock adds a second commitment the order of trials needed too, and the essay on the order measured what breaking it costs: which function of the times is the coin has to be stated before the times are read. The last arrival, the first, the folded maximum and infinitely many others are all exact coins, and an analyst free to choose among them after looking is a coin re-drawn until it lands well. The ceiling on that failure is the same as for the order — the test that rejects whenever any coin value would — and the remedy is the same: write the coin down in advance.

What the arrival times can be used for

As the coin of the randomised interval for a rate, whenever the times of the events in the window are recorded. Given the exact interval’s limit at a count of zero, the interval covers exactly 95% at every expected count above 3.69 and exactly 97.5% below it, and is about a tenth narrower than the exact interval through the middle of the range.

With the zero count’s limit chosen on purpose. The worst coverage is 97.5%−e−u097.5\% - e^{-u_0} for any limit below ln⁡40\ln 40, so mid-p’s limit costs 2.5 points at an expected count of three and the exact limit costs nothing. The same choice lifts the coin read from the order of a fixed number of trials from 92.6% to 94.8% at twenty trials.

With the folded coin where a trend is possible, since it is exact under any linear drift and costs nothing when there is none.

Every coverage here is a finite sum over counts with, at each count, the probability of the coin values that cover — computed exactly, because each coin’s distribution given the count is known in closed form, with and without a drift. The coverage with the exact zero limit is checked never to fall below 95% and to equal 95% to nine decimals past ln⁡40\ln 40, and the folded coin’s coverage is checked to be unchanged by drift to twelve decimals. The worst coverages for the order of trials are taken over a thousand proportions. Mid-p’s zero limit is refused as harmless at the rare end: the clock coin with it covers 92.50% just past ln⁡20\ln 20.

Still open: two windows and a ratio

Everything here is one window and one rate. The comparisons people actually make with counts are between two — a rate of adverse events in two arms, cases in two seasons — and the interval for a ratio of two Poisson means is conditional on the total: given that k1+k2k_1 + k_2 events occurred, the number in the first window is binomial, with a proportion that depends only on the ratio. That turns the two-rate problem back into the proportion problem, with an order of arrival available again, now in the form of which window each event fell in and when.

Whether the arrival times in both windows supply a continuous coin for the conditional binomial — so that the interval for the ratio is exact at every total except zero — and what a total of zero then forces the ratio’s interval to report, is computable exactly on the same terms as the sums here. Whether the conditional test’s familiar conservatism at small totals is entirely the zero total’s, as the hole here was entirely the zero count’s, has not been computed.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

A flat tag is an object no other essay names yet.

Clopper–PearsonConservative intervalCoverageDiscretenessExchangeabilityInterval widthMid-pPoisson limitRandomised intervalReproducibilityWilson interval