معماری چندکسب‌وکاری، تجاری و تجارت الکترونیک · فصل ۲ — ICP، Serviceability، Pilot، Workload و Admission · 233

P50/P80/P95 Forecasting

Build a percentile forecast that states forecast object, horizon, sample window, distribution method, P50/P80/P95 semantics, uncertainty limits and scenario assumptions, and use percentile bands as evidence for planning rather than as guaranteed capacity outcomes. می‌تواند برای «P50/P80/P95 Forecasting» یک تصمیم bounded با constraints، cost/risk و stop/pivot condition طراحی کند.

P50/P80/P95 Forecasting — fa-IR

Lesson summary

Build a percentile forecast that states forecast object, horizon, sample window, distribution method, P50/P80/P95 semantics, uncertainty limits and scenario assumptions, and use percentile bands as evidence for planning rather than as guaranteed capacity outcomes.

می‌تواند برای «P50/P80/P95 Forecasting» یک تصمیم bounded با constraints، cost/risk و stop/pivot condition طراحی کند.

This lesson produces

می‌تواند برای «P50/P80/P95 Forecasting» یک تصمیم bounded با constraints، cost/risk و stop/pivot condition طراحی کند.

Who it is for

Foundation

Use a field map, one worked scenario and explicit state vocabulary before independent construction.

Repair

Identify the failed evidence dimension, use the smallest mutated fixture and rerun only the affected gate.

Experienced

Compress definitions; require trade-off defense, counterexample analysis and changed-context transfer.

Prerequisites

1) The real problem: three percentiles without context are not a forecast

P50/P80/P95 can look precise while being useless if the forecast object, horizon, data window, scenario, and distribution method are unknown. This lesson builds Percentile Forecast Evidence Pack v1, keeping each number beside the method and limitations that make it interpretable.

2) What a percentile says—and what it does not

Within a defined set/distribution, P95 is a threshold at or below which about 95% of observations fall. Google Cloud uses this interpretation for P95 latency within a measurement interval. That definition does not mean there is a 95% guarantee that future demand will never exceed the number. A forecast needs a future-oriented distribution or scenario process.

3) Name the forecast object precisely

“P95=820” is meaningless without an object. Is it five-minute peak requests per second, daily jobs, latency, or tokens per minute? The pack records forecast_object and unit so the percentile has a stable interpretation.

4) Horizon is part of the question

A one-month forecast and a one-quarter forecast are different problems. Seasonality, campaigns, trend, and evidence sufficiency can change. Changing horizon without refitting or revalidating produces HOLD; percentiles from the old horizon cannot simply receive a new label.

5) Keep sample window and sample size visible

A P95 computed from incomplete data—especially after removing high-demand observations—can shrink the tail artificially. The pack records the sample window, N, and completeness. If three weeks of data are later found incomplete, the previous result requires recomputation.

6) Record the distribution method

The lab uses an empirical nearest-rank percentile over sorted observations so the oracle is deterministic. Production may use a different method, but its name and scenario/version must remain attached to the pack. P50/P80/P95 without a generating method have incomplete provenance.

7) Treat tail drivers as evidence

A high P95 may be driven by a campaign, end-of-month batch, a specific tenant, or retries during failure. If a known spike exists in the calendar but is absent from the scenario, the pack must not remain USABLE. The tail driver is evidence, not decoration after the forecast.

8) Backtesting exposes historical error

A polished forecast without a backtest does not show how the method performed in comparable context. This lesson's MAKNOW DESIGN accepts backtest error up to 15%; higher error is INSUFFICIENT until the method is reviewed. That threshold is local design, not a Google Cloud requirement.

9) Freshness is its own state

If data freshness no longer matches the decision window, the pack becomes STALE even when its historical percentile calculation is correct. STALE means the old number may be valid for its old data, but it must be refreshed before the current decision.

10) Baseline: from observations to P50/P80/P95

The baseline contains 30 complete, fresh daily-peak observations, a one-month horizon under the current scenario, and 8% backtest error. Nearest-rank percentiles are computed from the visible sample and published with unit and tail driver. With object, horizon, sample, method, assumptions, and backtest present, the state is USABLE.

ForecastObjectHorizonSample NScenarioMethodP50P80P95UnitTail DriverBacktestFreshnessStateEvidence
Baselinedaily peak demand30d30current-planempirical nearest-rank600690820req/smonth-end + tenant bursts8%2dUSABLEfixture://forecast/base
Tail removeddaily peak demand30d26 incompletecurrent-planempirical nearest-rank580660700req/stail was removed8%2dHOLDfixture://forecast/tail-removed
Quarter transferdaily peak demand90d32 + incomplete weeks2 known campaignsmust refit610720980req/scampaign spikes8%2dHOLDfixture://forecast/transfer

11) Wrong shortcut: delete the tail to make the forecast look cleaner

Removing several high-demand observations makes P95 lower and more attractive, but the declared sample is no longer represented. This mutation produces HOLD until the sample is repaired and the forecast rebuilt. A percentile is meant to expose distribution shape, not hide its tail.

12) Campaigns and known events belong in the scenario

A confirmed campaign announced after forecast generation changes the assumption set. If the spike is material and has not been incorporated, the state is HOLD. A separate campaign scenario is valid; presenting the no-campaign baseline as the campaign forecast is not.

13) Lab: eight fixtures, one reproducible oracle

The lab contains baseline, tail removal, horizon change, known-spike omission, missing object/unit, stale data, high backtest error, and transfer fixtures. The evaluator uses visible inputs and deterministic rules only. No answer key is stored under the learner path; evaluation uses visible inputs and explicit rules, while evaluation-only materials remain outside learner paths.

14) Transfer: campaigns, incomplete data, and a quarterly horizon

The transfer adds two known spikes, discovers three incomplete weeks, and changes the horizon from one month to one quarter. This is not merely a request for a new P95: the distribution process and evidence sufficiency changed. The state is HOLD until data repair, horizon refit, and spike scenarios are recomputed.

15) Delivery checklist

The evidence pack records Forecast ID/Object, horizon, sample window/N, seasonality/scenario, distribution method, P50/P80/P95, unit, tail driver, backtest error, data freshness, assumption set, decision use, and evidence ref. The decision must also state that a percentile is not a capacity guarantee, and material changes to horizon, sample, or scenario require recomputation.

Assessment

There is no answer key in this lesson pack; answer it yourself and mark honestly. "Needs review" sends the lesson to your review queue.

ARC-014-Q1 retrieval

Explain what P95 means and why it is not a 95% guarantee about future maximum demand.

lesson ✗AI ✗notes ✗

ARC-014-Q2 application

Build Percentile Forecast Evidence Pack v1 for the complete baseline fixture.

lesson ✗AI ✗notes ✗

ARC-014-Q3 diagnosis

Several high-demand observations are removed. Identify why the pack must not remain USABLE and name the repair.

lesson ✗AI ✗notes ✗

ARC-014-Q4 transfer

Recompute or HOLD after two known campaign spikes, three incomplete weeks, and a horizon change from 30d to 90d.

lesson ✗AI ✗notes ✗
Assessment rubric
  • Boundary: the owned artifact is explicit; adjacent lesson outcomes are not absorbed.
  • Evidence: decisive fields trace to visible sources/fixtures and missing data remains typed.
  • Negative case: at least one tempting shortcut is rejected with the exact failed dimension.
  • Bounded state: the result is no stronger than evidence and includes a stop/review/recompute trigger.
  • Transfer: changed-context evidence is recomputed; the baseline label is not copied.

References & freshness

Google Cloud Monitoring — Application Monitoring
·
P95 latency is the 95th percentile of request latency over the selected time period; it is an observed metric, not a future demand guarantee.
Google Cloud Observability — Using Cloud Load Balancing metrics
·
A p95 value for an interval divides observations so 95% are at or below that value; it does not prescribe a forecasting distribution or confidence guarantee.

Case studies

Lesson visuals

ARC-014-PERCENTILE-FORECAST-FLOW

Lab files

از همین پوشه اجرا کنید:

python run_checks.py

برای هر Fixture، P50/P80/P95 را با روش nearest-rank روی Observations visible محاسبه و State را از Completeness، Horizon fit، Known events، Backtest و Freshness تعیین کنید. P95 را Guarantee ظرفیت تعبیر نکنید.