The public garden has an entrance counter and a report someone refreshes every Monday. One row says zero for an hour before opening. Another says zero for an hour when the gate was open and nobody came through. The third says zero when the counter had stopped reporting. The rows look identical when printed in a single column. But they describe three different relationships between the garden, the visitors, and the instrument. A model that takes the column literally will get those relationships wrong before it has a chance to reveal anything useful about attendance.

The first zero is imposed by a condition of the defined entry process. If the target is authorized admissions through this entrance and the gate really was shut, none was possible there during that interval. The second zero is an observed result under conditions that allowed a positive count. The third is not an observed zero at all. It is an unknown count that may have been exported with a convenient default. The first two can both be valid zeros for particular purposes. The third needs to be recovered as missing unless another valid source makes the count known.
The target matters even in this simple setting. The counter may record passages in both directions, authorized entries only, or the number of times an automatic gate opens. Those are not the same. An empty hour at one entrance does not establish that nobody visited the garden; people may have used another gate. And a gate formally shut to routine admissions may still have staff movements. Calling an interval a structural zero makes sense only if the event definition and verified closure exclude the event. Do not use a schedule's dark shading in place of that check.
The NIST/SEMATECH gallery of graphical techniques catalogs displays useful for exploring shape and order, while its process modeling chapter distinguishes model building, fitting and validation. They are methodological references, not sources for the garden numbers. Diane Lambert's original zero-inflated Poisson regression paper illustrates how a formal mixture can combine a state that always produces zero with an ordinary count process that can also produce zero. A plausible story about this garden is a reason to check the records, not proof that Lambert's model fits them.
Records with different reasons for an apparent zero
Illustrative only. These interval counts are invented. They are not observations, predictions, estimates of an actual device's performance, or an official reporting target.
| Apparent-zero classification | Intervals |
|---|---|
| Closed | 12 |
| Open and empty | 8 |
| Device unavailable | 5 |
The figure summarizes 25 toy records initially displayed as zero. Under verified closure and the specified gate definition, twelve are known no-opportunity intervals. Eight are measured empty intervals while the gate was open and monitoring worked. Five lack a valid count because the counter was unavailable and the toy supplies no independent way to recover the true entry count. It would therefore be wrong to write that the entrance recorded 25 observed zeros. Twenty are verified zeros for an all-hours count of the defined event, under those conditions; five are missing.
It would also be wrong to use eight divided by 25 as the garden's probability of an empty open interval. The chart provides neither the full set of open intervals nor the number of positive counts. It is explicitly selected from records that looked like zeros in a preliminary export. The proportion eight out of 25 describes how many apparent zeros in this selected set fell into one recoded category. To find a probability or proportion of empty open intervals, divide observed open-and-empty intervals by a defensible count of comparable monitored open intervals, and separately address what was not monitored.
This distinction would remain even if the audit found no device failures. An all-hours dashboard can reasonably include closed intervals as zero admissions within its total. The same hours do not belong in the denominator of an estimate of admissions per open hour. Neither denominator is inherently superior. Naming each makes both useful. If a staffing plan is based on the all-hours rate without realizing that the denominator includes overnight closure, it may underestimate expected workload during the shifts when someone actually has to be there.
The five missing intervals are not necessarily known to have been open in the toy table. Device state and gate state are separate. An external check could clarify both, or it could leave one unknown. If a missing device interval were independently verified as a fully closed interval for the defined event, closure could establish a logical zero without relying on the counter. That is not the same as accepting every device default zero. Save the derivation and source, so the observed count and the logically determined value do not look identical in a later audit.
What kind of opportunity was present?
A schedule gives a plan, not always a record of actual operation. A gate can open late or close early. A special gathering may use a separate admission arrangement. If the study needs actual authorized entry time at the gate, a dated operation log or other suitably reliable record is more useful than a static weekly schedule alone. Label what is known. “Scheduled closed” can be an administrative fact even where actual state has not been verified. It can also be useful for studying intended staffing, a different question from whether entry was possible.
Consider two nominal one-hour bins. The first was open for 60 minutes, the second for ten before an early closure. Both produce a count of zero with working monitoring. They are equally empty for the simple question “did we detect anyone in this bin?” They are not equal trials of a full hour's demand. If a model assumes more opportunity gives more expected arrivals, the monitored time belongs in the record. A manager reading a frequency of empty hours should know whether it includes short exposures that had much less chance to register an entry.
A third bin can be open throughout but observed for only the first twenty minutes. The measured partial count answers what passed while the device was live, not what happened over the full hour. It may still be useful for an analysis explicitly of covered periods. Put the minutes covered and the minutes eligible in separate fields, and do not quietly extrapolate to an hour without a stated assumption. A short stretch around opening might be busier than the twenty minutes near closing; live time is not necessarily a random slice of traffic.
A monitoring window may overlap a gate transition and a device outage. Suppose 15 minutes were closed, then the gate opened as planned for 45 minutes, but the counter reported for only the last 30. A zero for the last 30 and a logical zero for the first 15 do not establish the full interval. The open unmonitored 15 remain unknown. Joining event histories at their actual boundaries lets a report acknowledge the known pieces without claiming the whole bin is classified. Keep the original bin available if the reporting audience needs it, but derive its status from those pieces.
There is an important asymmetry between evidence of presence and absence. A reliably associated entry record at minute five can establish that an interval was not empty, even if the instrument later went offline. It still cannot establish the total count for the interval. By contrast, a silent first five minutes and a later outage cannot demonstrate the interval was empty. A useful record can therefore have both “at least one entry known” and “total incomplete.” Treating the entire interval as either perfect data or worthless discards that distinction and may leave less information for a future decision.
Separate operational state from device state
A gate log and a counter log describe different systems. Imagine a closed gate with a working counter. A zero from the counter is not itself proof that the gate was closed. A gate that was open during a quiet period might give the same readout. Conversely, a counter that has not reported in two hours might show a zero placeholder even as people arrive during open hours. An availability heartbeat, source timestamps, maintenance records, and reconciliation with authorized independent observations can help distinguish the cases. None should be treated as definitive beyond what its definition guarantees.
Power, connectivity and measurement validity can also diverge. A device might be offline from the central dashboard while retaining counts locally. Later retrieval could replace an unknown count with an observed one. Meanwhile a powered and connected device could report bad readings because the event type or direction was misconfigured. “Online” is useful evidence about the device, not universal proof that its count is valid. Store whether the measurement passed the checks appropriate to the intended event, separately from whether messages could be exchanged with the device.
Some counter exports are cumulative. A reading that drops to zero might indicate a reset, not absence of entries. The desired interval count is normally a difference between appropriately ordered cumulative readings, with resets and rollover handled explicitly. A simple subtraction over a restart can create a negative count. A script that clips all negative differences to zero has created apparent emptiness from a telemetry event. Save the raw readings, identify the gap or reset, and reconstruct only when the source supports it. If not, preserve the interval as incomplete.
Similarly, a system can repeat the last known reading after communications fail. The difference between two copies of a stale total is arithmetically zero but not a verified zero count for the corresponding time. Check when the device actually generated each reading, not merely when the dashboard saved it. A poll timestamp can advance without a new measurement. Compare the time fields and validity flags before building an hourly series. Otherwise the very effort of plotting continuous bins may convert interruptions into deceptively orderly quiet periods.
Small data-lifecycle decisions can either protect or obscure these distinctions. An export might use blank for unavailable, zero for an observed count and a separate closure field. Importing it through a tool that converts blanks to zero can destroy the distinction before an analyst sees it. Keep a raw copy and audit a few source rows against the rendered dataset. The future question is not merely whether the integers sum correctly. It is whether a zero in the analysis means what it meant before the conversion.
A structural-zero explanation does not automatically require a mixture
If the gate's actual closure is observed and valid counts can be identified, much of this garden's puzzle has a direct solution. For an all-hours forecast, use the known closed intervals as deterministic zeros when the planned operation is indeed the scenario being predicted; separately model admissions during open time. For demand while the gate is open, analyze eligible open intervals with usable observations and describe what monitoring was missed. An independent observation provides the state assignment. A latent statistical model is not needed merely to infer which of those clearly documented intervals were closed.
A formal zero-inflated Poisson model asks a different question. It specifies two probability-generating components. With a probability called pi, the count is necessarily zero. With the remaining probability, the count is Poisson with expected count lambda, and that component can generate zeros too. The overall zero probability is pi plus one minus pi times the ordinary Poisson zero probability, written as pi plus (1 minus pi) times exp of negative lambda. A positive count can arise only in the Poisson component in this particular model. An observed zero by itself does not tell us which component produced it.
For example, suppose a purely hypothetical entry process has pi equal to one quarter and lambda equal to one. The ordinary component alone would produce zero with probability about 0.368, while the mixture puts about 0.526 of its mass at zero. The second number comes from adding 0.25 to 0.75 times 0.368. The calculation does not estimate this garden's closure fraction from the chart. It illustrates why a mixture can allow more zeros than a Poisson count process with that same lambda, and why even a large number of fitted zeros need not all have one origin.
The mean of that mixture is 0.75 times one, from weighting an always-zero component and one with mean one. That lets us compare the implication with a single Poisson of the same marginal mean, 0.75. The single Poisson would give a zero probability of about 0.472. The mixture differs both from the conditional count process with mean one and from the marginal same-mean Poisson. It is helpful to say which one is being compared rather than writing simply that the model “has more zeros.” The comparison should concern a genuine alternative for the same data scope.
The model's latent state, meaning a state not directly observed in the records used for the fit, does not have to correspond neatly to a physical gate. A separately observed closure might already account for when entry was impossible. A fitted component beyond that could reflect poor specification, unmeasured differences, or genuine no-opportunity states not documented by the gate log. The data may not cleanly distinguish them. Do not use a fitted zero probability to assign concrete explanations to individual silent hours without additional evidence. Mathematical probability of membership is not the same thing as a verified service event.
Contrast this with a model that first asks whether any entry occurred and then models the count conditional on at least one. This is a hurdle structure: the positive count distribution excludes zero once the hurdle is crossed. A quiet open hour could still fall on the zero side even when entry was possible. One part may predict the chance an hour starts receiving visitors, and another may predict how busy the positive hours are. That can be useful without positing a hidden group in which entry could never happen. The substantive story and the mathematical design still have to be justified for the garden.
Compare against appropriate alternatives
A count may contain many zeros even without a separate zero state. A rate close to zero naturally produces many zero observations in a simple Poisson model. A mixture of genuinely busy periods and quiet periods can look zero-heavy compared with a single Poisson fitted to the mean count across both. Before inventing latent closure, check the interval length, time of day, day of week, scheduled events, and whether the count definition changed. These variables can matter even among open intervals. A model should not need to recreate a calendar the analysts discarded during data cleaning.
Variation beyond that of a plain Poisson is another possibility. The ordinary Poisson associates its mean and variance tightly for a fixed set of conditions. Visitors can arrive in families, school groups or organized parties. That can generate many small counts and occasional large counts. A negative binomial is one possible count model when conditional variance is larger than the Poisson structure allows, but it does not follow simply from seeing a group in the garden. The key is to compare candidate models on the same valid counts and examine how well they describe both zeros and the positive tail.
A quiet bin and a neighboring burst may not be independent. If visitors queue just before an opening, the first few bins after opening can share demand that built over the closure. Counting those bins as unrelated may make the dataset look richer than it is. A prediction goal might require leaving out whole dates or time blocks when testing forecasts, not randomly interleaving adjacent bins across training and validation. That is another reason the chronological display belongs next to the count histogram. The distribution of values and the order of those values expose different properties.
Prediction and explanation should be separated. A more elaborate model can predict the number of empty intervals reasonably well even if its latent interpretation has little physical meaning. A simpler open-hours model may support a clearer operational explanation while missing some variation. Which result is preferable depends on the question, but report predictive checks and explanatory claims separately. A good score on unseen data is evidence about prediction under similar conditions; it is not proof that a hidden class corresponds to a real closure, different visitor behavior, or a particular kind of equipment failure.
There is also a different model for detection. If entry occurred but the device often missed passages, then a count model for admissions and a model of how they become observed might both be needed. That is not accomplished by treating an outage as just another always-zero event-generating state. In the outage, the target events remain possible; the observation can be missing. The distinction matters particularly if outages are more common when usage is high or power is interrupted during particular weather. The corrected dataset can expose the problem, but it cannot identify a true count without assumptions or independent measurements.
Watch the denominator shift in a staffing example
Suppose a separate invented day offers five confirmed closed hours and ten scheduled open hours. The gate is verified open throughout those ten. The counter provides valid full-hour totals for eight of them, adding to 32 entries. Two open hours lack counts. The observed rate on covered open hours is four per hour. Computing 32 divided by all ten reports 3.2 only by assigning the two unobserved hours zero. The correct coverage statement is eight of ten open hours. A full-open-hours rate requires the actual two counts or an explicitly justified estimation procedure.
An all-hours report for that 15-hour window can combine the five known zeros with the eight known open counts and clearly mark two hours missing. It still cannot report a complete total of 32 as though none passed in the two unknown hours. Under the stipulated measurements, it can report that 32 events were counted in the covered hours and that the complete count would be at least 32, taking the numbers as valid and assuming all entries are nonnegative. It cannot give a useful finite upper bound merely from the known counts. Additional evidence or a relevant physical limit would be needed for such a bound.
Now imagine the unavailable hours both followed an announced group tour. The monitored rate of four could be a poor estimate for those hours. If the outages instead occurred during quiet periods, the full-day open-hours rate could be lower than a naive extrapolation. Neither outcome is proven by the scenario. The enduring lesson is that an uncovered hour is not just a lost amount of sample size. It can be missing from a part of the schedule with systematically different demand. Report which time blocks lacked monitoring rather than offering a single coverage percentage as assurance of representativeness.
A related summary is the fraction of observed valid open hours with no entries. If three of the eight covered open hours in the toy were empty, the observed fraction would be three eighths. The two missing hours could make the full ten-hour fraction as low as three tenths and as high as five tenths, provided their only unresolved classification is empty versus not empty. This simple range needs no guessed count values. A daily mean count raises a different problem because a positive missing hour could have many possible values. Choose bounds suited to the question rather than reusing one range for every result.
Let the first display show state as well as count
Before making a histogram, draw a small chronological strip with open, closed, and unresolved gate periods alongside counter availability. Plot observed counts in open intervals and use an explicit gap for unavailable values. More than one strip may be necessary if the device serves multiple routes or the scope changes. When the longest run of zeros aligns with a period known to be closed, show that relationship rather than allowing an all-hours histogram to imply demand simply disappeared. The goal of an exploratory display is to make a competing explanation visible before fitting it.
The next view can show the distribution of valid counts among fully observed open intervals. If positive counts are rare, label the sample size for the positive portion and do not hide the zeros. Where durations vary, separate or account for them rather than expecting all observations to have the same opportunity. A group-level display can compare similar open periods by weekday or hour after opening. The original NIST gallery supplies general plotting choices, not a prescribed garden workflow. The useful display is whichever reveals the structure the proposed model otherwise assumes away.
A plot can also expose sensor transitions. Suppose zeros suddenly start appearing in every hour on the date a device was replaced. Before inferring a dramatic change in use, examine which export field changed or whether a status code started being represented differently. Compare the device change date with the count history, but do not automatically blame the equipment. A real closure or extraordinary weather could coincide. Time order helps identify plausible checks; it does not prove a cause by itself. The two records should be reviewed together.
For an ordinary briefing, name the reporting scope near the first chart. “All hours at Gate A” sounds similar to “verified open hours at Gate A” but includes periods that were excluded from the second analysis. “Measured entries” sounds similar to “all garden arrivals” but gate assignments could differ. These wording choices can change the decisions that follow the report. A service manager trying to staff the open gate should not need to decipher the denominator from a footnote on a later slide.
Do not connect a line through gaps as though the missing intervals had measured values unless the interpolation is explicitly shown as an assumption with a visual distinction. Empty bins can be drawn at the zero baseline. Missing bins can instead be blank or carry a labeled open marker at a separate location on the plot. Extended outages usually deserve a whole shaded strip rather than several points at zero. These choices preserve an intuitive reading: a dot at zero can mean a valid measurement, while the absence of a dot is something else.
Build an interval record someone else can check
A compact record can hold the entrance and event definition, interval start and end, actual gate state and its evidence, device validity and its evidence, the raw count or cumulative source readings, and the derived result. Save observed count and classification separately. A number could be zero and valid, zero by logical closure, or unavailable altogether. Retain any substitute sources and the rules for reconciling them. If the device firmware or export format changes, note when the change occurred rather than overwriting the earlier representation and assuming the settings were always the same.
Mark whether a recorded closure covers the entire bin. Timezones and clock shifts matter when comparing two records built by different systems, especially if one clock logs local time and another uses a universal timestamp. A simple double-check can compare a short sample of independently timestamped openings against device transitions. An apparently closed bin with many entries may flag timing or entrance identity mistakes, not just an exception to the gate rule. Keep the conflicting data and investigate the matching process before erasing the contradiction.
One practical audit starts with examples known by a separate source. Confirm that the data pipeline preserves a valid observed zero from an open hour. Confirm that it does not turn an outage into the same value. Confirm that a verified closed interval can be accounted for as zero authorized entries even if its device count was not needed, under the example's chosen event definition. Test a partial hour and an apparent duplicate. Many systems are excellent at averaging clean rows and surprisingly poor at preserving these differences when conditions change.
Give corrections an evidence trail. A late local download might legitimately fill a missing interval. A documented closure might legitimately change an unknown all-hours count to a verified logical zero. A silent blank filled with a default is not the same kind of revision. If the data are used for recurring reports, keep a version of the status rules and the date through which recovery was attempted. Somebody looking at last month's report should be able to understand why this month's reconstruction differs without finding that the old state codes have become unreadable.
A separate field for notes can protect unusual events without turning them into formal categories too soon. If an approved alternative entrance opened for a small event, the note can distinguish site-level admission from the count at the main gate. If staff used an access route that the target excludes, say why the passage data and admission data diverge. If an unexpected pattern repeats, it may merit a dedicated code in the next version. Rules should improve as the process becomes clearer, but changes in rule should not get confused with changes in demand.
Match the statistical check to the intended decision
For an all-hours prediction, first decide what opening schedule the prediction assumes and whether that schedule is known. Zero admissions during a future scheduled closure can be an assumption of the scenario; a forecast that anticipates unexpected closures would need a separate treatment of that uncertainty. For an open-hours staffing forecast, focus on comparable operational periods, retain the observation coverage, and check how well the model predicts busy periods as well as empty ones. A model that predicts many quiet bins perfectly but repeatedly misses peaks may fail the decision it was built for.
For a study of ordinary visitor behavior, a distinct question is what counts would have looked like during hours that were closed. No actual authorized entries at the closed gate does not mean there was no latent demand then. A visitor might have come if the garden were open, waited until opening, or never attempted a visit. Estimating the effect of different hours would require a design and evidence appropriate to that question. A regression fitted to zeros at night does not automatically supply the demand that would have occurred under a changed schedule.
For maintenance, the practical priority may instead be reliability of the count system. Report unavailable minutes, which open periods they overlap, which readings were recovered, and which outages recur. This outcome needs neither a zero-inflated visitor model nor a conclusion about hours of likely demand, although those might help prioritize coverage. Preserve the distinction between unavailable equipment and an open gate with empty traffic so repairs are directed at the actual issue. Quiet observations are worthwhile measurements; they should not be treated as instrument problems simply because the number is small.
Even among count models, choose a check that corresponds to the intended compromise. Compare predicted and observed frequencies of zero, one and larger counts for similarly exposed windows. Check whether errors accumulate around a particular segment of the schedule. Inspect whether a fitted zero component improves forecasts on held-back periods compared with simpler alternatives. If the improvement is confined to periods with independently recorded closures, a direct state split may communicate the same distinction more clearly. A fit can add insight only after the units and observations allow its comparison to mean something.
Check whether changing the bin length changes the story
An hour without an arrival and six ten-minute windows without an arrival describe the same absence at two resolutions if each ten-minute window was fully monitored. Their contributions to a zero fraction are not comparable without the positive windows and total exposures at each resolution. The finer series will split busy hours into stretches with and without visits. A zero-heavy ten-minute histogram is not necessarily evidence of a new state that disappeared when the analyst made the hourly plot. It may simply be the expected result of watching for a shorter time.
Bin boundaries knit together opportunity and coverage in different ways. A gate that opens at a quarter past the hour will have a partly closed first clock hour. If the report instead groups time in hours since opening, the first exposure window might be full length and easier to compare with another date. But such a transformation can obscure an operational question about arrival workload at a particular clock time. The two reports serve different decisions. Retaining actual interval boundaries allows both to be made without duplicating or discarding the source observations.
A similar distinction applies to aggregating missing data. Suppose five ten-minute subintervals show no entries and the sixth has no working observation. The hour does not become a measured zero because most of it was quiet. Report fifty observed empty minutes and an incomplete total, unless verified closure supplies the remainder or some independent count covers it. If one known subinterval had two entries, the hour would be known positive and still incomplete. An aggregation rule should preserve this difference between classifying any event and observing a full total.
For a model comparison, use the same window definition or examine the implications of changing it explicitly. A model that does well for hourly totals might hide clustering important for staffing the moment a tour arrives. Another model might predict ten-minute traffic well but rely on a schedule that is not available far in advance. Neither case is resolved by picking the analysis with the prettiest zero histogram. Name the decision interval, preserve shorter source records when possible, and report differences of scale without interpreting them as changes in visitor behavior.
The order of those checks is important. A field audit that establishes unmonitored times can change which observations belong in the outcome series. A statistical model should not be used to decide whether an inconvenient field record was actually invalid. Record the measurement adjudication before comparing models, and explain any later change as a revision of the data rather than a victory by one candidate distribution.
A zero deserves a specific sentence
Try writing a caption that a manager can use without the analyst in the room. “A closed gate had no authorized admissions during 12 verified closed intervals. A live counter measured no entries during eight fully monitored open intervals. No valid count was available in five others.” That is longer than “there were 25 zeros,” but it exposes all three conclusions rather than encouraging somebody to fill in the blanks. It also gives the right next question for each: verify opportunity, understand unusually quiet periods, or recover absent measurements.
A scenario that doesn't fit those categories is informative rather than disruptive. A gate can be temporarily open under unusual conditions, a counter can cover part of an interval, and somebody can know that at least one person entered without knowing the total. Preserve evidence at that granularity before moving to a model that wants one number per row. Where the row cannot be classified, keep it visible and state which sources would help. Reducing all uncertainty to zero impoverishes the record about attendance and about why it was hard to observe.
The best use of a formal mixture is for a question that actually needs its probability structure. The best use of an operational history is to say which states were independently known. In this garden example, three apparent zeros can lead to three distinct actions even while the display originally made them look the same. Ask what event was possible, what was measured, and what the source shows about that interval before deciding that a zero belongs in the fit.