The interview problem

Practice prompt

An object-storage logger records payload size exactly up to 5 MB. Larger objects get a “5+” flag. Six records contain 1, 2, 4, 5+, 5+, 5+ MB. Another exporter drops oversized objects entirely, while a third reports size buckets. Explain how these observation processes differ, estimate a mean under an explicit model, and show what the records cannot establish.

Original fundamentals practice, not a reported interview. Examples and derivations are original. Primary technical documentation retrieved September 27, 2026; interview date not applicable.

1. Preserve what was actually observed

A “5+” record says the object exists and its size exceeds 5 MB. It does not say the size equals 5, and it is not an entirely missing measurement. Store the threshold and censoring flag separately from the displayed number.

ObservationInformation retainedClassification
Exact size 2 MBX = 2Uncensored
Below detection limit LX ≤ LLeft censored
Saturated at CX > CRight censored
Bucket (L, U]L < X ≤ UInterval censored
Only objects at most 5 MB enter the exportLarge objects have no rowsRight truncated sample

A missing telemetry row without a known size bound is not automatically censored. A logger that physically clips its measurement differs from a service that rejects large uploads: the latter may change which population of objects exists. Define whether the target is attempted, accepted or stored payloads.

For the arithmetic below, approximate positive sizes as continuous and use decimal MB. A byte-level model is discrete and uses probability masses. Zero-byte objects would require an explicit treatment, such as a separate point mass; the simple positive exponential model does not include it.

2. Match the likelihood to the observation

Let f be a continuous density, F its cumulative distribution and S = 1 − F. An exact observation contributes f(x). A bound contributes the probability of the region in which the unknown value lies:

exact x:             f(x)
left censored at L:   F(L)
right censored at C:  S(C)
interval (L, U]:     F(U) − F(L)

Multiply contributions for independent observations, or add their logarithms. These expressions assume the known measurement process can be ignored for inference about the size distribution. The fixed cap in this example is known and deterministic. If caps depend on workload, record them and model the relevant conditioning variables.

A threshold selected using hidden information about the actual size may require a joint observation model. Recording a bound does not by itself justify ignoring why that bound was produced. Likewise, arbitrary missing records cannot be supplied to a censored likelihood by inventing thresholds.

Bucket midpoints are not exact observations. A wide interval retains uncertainty that midpoint replacement erases. For continuous distributions, endpoint equality has probability zero; for discrete distributions or atoms, the chosen open and closed endpoints affect probability calculations.

3. Derive a model-based estimate

Assume the six objects are independently sampled from an exponential distribution with rate λ per MB, with its location fixed at zero:

f(x) = λ exp(−λx), x ≥ 0
S(c) = exp(−λc)
mean = 1/λ

The exact sizes sum to 1 + 2 + 4 = 7 MB. Each of the three saturated records contributes survival probability beyond 5 MB, rather than a density at 5:

L(λ) = [λ exp(−λ)] [λ exp(−2λ)] [λ exp(−4λ)] [exp(−5λ)]³
     = λ³ exp(−22λ)
log L(λ) = 3 log λ − 22λ
first derivative = 3/λ − 22
second derivative = −3/λ²

The first derivative is zero at λ̂ = 3/22, and the second derivative is negative. The maximum-likelihood estimate of the model mean is therefore 22/3 ≈ 7.33 MB.

CalculationResultMeaning
Drop all “5+” rows7/3 ≈ 2.33 MBMean among the observed small objects
Replace “5+” by exactly 522/6 ≈ 3.67 MBMean of the capped measurements
Fit the stated censored exponential model22/3 ≈ 7.33 MBEstimated full mean under the model

The last estimate is not an unbiasedness guarantee and is highly uncertain with six observations. Its tail comes from the exponential assumption, not from observing the missing sizes.

For a dataset containing only exact and right-censored observations under this same model, with d exact observations and total recorded exposure E equal to exact sizes plus right-censoring thresholds, this exponential log likelihood is d log λ − λE. When d = 0 and E > 0, its supremum occurs as λ approaches zero. There is no finite positive-rate maximizer; a numerical optimizer returning a huge mean has not discovered a well-supported tail.

4. Explain why dropping rows changes the likelihood

Now suppose only objects with X ≤ 5 enter an export, and neither the original object count nor the number excluded is retained. The three visible sizes are again 1, 2 and 4. Conditional on inclusion, their density is f(x)/F(5), so the exponential likelihood is:

Ltruncated(λ) = λ³ exp(−7λ) / [1 − exp(−5λ)]³

The denominator accounts for selecting only the lower part of the distribution. This differs from the censored likelihood, which knows that three more objects exceed the cap. Fitting an ordinary exponential density to the three exported values ignores selection.

If the original count of six is known and the only exclusion rule is size above 5, the three absent objects supply tail-count information. Up to parameter-independent counting factors, the appropriate likelihood again contains three survival contributions. Missing row identities need not destroy that count information.

For contrast, left truncation that includes only X > L uses conditional density f(x)/S(L). Left censoring retains rows known to satisfy X ≤ L. Similar vocabulary does not make these the same experiment. Software supporting censored observations does not automatically implement the required truncation normalization.

5. Separate identifiable quantities from tail assumptions

Two possible full datasets produce exactly the original logged records:

Underlying sizes in MBActual six-object mean
1, 2, 4, 6, 6, 625/6 ≈ 4.17 MB
1, 2, 4, 50, 50, 50157/6 ≈ 26.17 MB

There is no finite upper bound on this sample's full mean without another size constraint. Its mean is strictly above 22/6 because each saturated size strictly exceeds 5. These are statements about possible completions of the six records, not confidence intervals for a population parameter.

If an independently justified physical limit guarantees every object is at most 20 MB, the sample mean is at most (7 + 3 × 20)/6 = 67/6 ≈ 11.17 MB. The logger's 5 MB display cap is not such a physical limit.

At the population level, fixed-cap observations can reveal the distribution below the cap and the fraction exceeding it, but cannot distinguish arbitrary shapes farther into the tail. Even unlimited capped data cannot nonparametrically identify the full mean when that tail is unrestricted.

A useful alternative target is E[min(X, 5)], the mean capped size. All six capped measurements are observed, and their sample mean is 3.67 MB. The sample exceedance fraction is 3/6 = 50%, which estimates a population tail probability with sampling uncertainty. Report these quantities honestly when a full-mean claim would depend on unjustified extrapolation.

6. Keep numerical and modeling errors separate

Use a log-survival function for right-censored contributions rather than computing log(1 − F(c)) after F(c) rounds to one. Interval contributions need a stable log difference of CDF or survival probabilities; subtracting nearly equal floating-point numbers can erase a small interval probability.

Preserve units, endpoints and censoring types in the data schema. A change from bytes to MB changes density units and rate parameters. Do not compare raw likelihood numbers across different observation representations as if they used the same measurement scale.

For this example, fix exponential location at zero when checking a library fit. Allowing the location to vary fits a different model. Check support, convergence and sensitivity to starting values; a solver reporting success does not prove that the family or observation mechanism is appropriate.

Plot exact measurements and censoring rates by source and time. A changed logger cap can create an apparent size shift. Store the cap version per observation so the model can distinguish measurement changes from population changes.

7. Validate what the data can actually test

On held-out data collected with the same mechanism, compare predicted frequencies for observable size ranges and the saturated category. This tests the observed-data fit. It cannot validate whether objects above 5 MB tend to be 6 MB or 50 MB when both always produce the same flag.

Compare conclusions under plausible alternative tail models and clearly separate that sensitivity from sampling uncertainty within one model. Bootstrapping the capped sample under a fixed fitting procedure does not make unobserved tail assumptions disappear.

Collect an authorized random audit of actual sizes, including saturated objects, when the full mean matters. Record selection probabilities if sampling different strata at different rates, and use corresponding weighting for population estimates. Size metadata may suffice; there is no need to copy payload contents solely to measure their length.

Unlike an outcome that is merely delayed, a saturated measurement will not become exact by waiting. Recover source metadata or change collection. If recovery is impossible, narrow the reported statistical claim to an identifiable target while explaining the missing evidence for the full mean.

Failure analysis and self-review

  • The cap becomes a fake exact value: preserve the bound and flag.
  • Large objects disappear: determine whether truncation counts are available before choosing a likelihood.
  • An impressive fit hides an arbitrary tail: distinguish observable fit from extrapolation.
  • Every observation is censored: inspect boundary estimates instead of trusting a solver's finite output.
  • A logger upgrade looks like growth: condition on threshold and measurement version.
  • Missing telemetry is labeled “above cap”: require evidence for that bound.

Follow-ups: What changes with different caps per object? How would a zero-size point mass affect the model? What if only interval buckets are stored? Can the excluded-object count restore information? How would you validate an assumed tail using a small stratified audit?

A strong answer classifies the observation process, derives the likelihood and distinguishes capped from full means. An excellent answer handles truncation conditioning, states mechanism assumptions, identifies the all-censored boundary and explains why more data under the same cap cannot reveal an unrestricted tail.

Sources and attribution

Retrieved September 27, 2026; documentation labeled version 1.18.0; exact page publication dates unstated. The payload scenario, exponential derivation, truncation comparison and indistinguishable datasets are original. No reported interview or company attribution is claimed.

Continue your preparation

Choose a connected learning path or browse more ML fundamentals questions. Read our editorial method and attribution policy.