Description
Calculate h=(sampleSize-1)*probability and return zero-based floor/ceiling indices and the fractional interpolation part.
A sample quantile locates a probability within sorted observations. Linear interpolation can use a fractional rank between two neighboring observations. This tool returns those zero-based indices and their interpolation fraction, leaving retrieval and interpolation of the actual observations to the caller.
Calculate h=(sampleSize-1)*probability and return zero-based floor/ceiling indices and the fractional interpolation part.
When to use this tool
Use Sample Quantile Index Fraction Component when you need this specific summary conversion, contribution, domain rule, or sensitivity term with matching statistical conventions.
How to use the tool and how it works
- Enter sampleSize, probability. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read lowerIndex, upperIndex, fraction. Use the output convention below.
Calculate h=(sampleSize-1)*probability and return zero-based floor/ceiling indices and the fractional interpolation part. Require sample size one through one million and probability within zero through one.1
The zero-based rank (n-1)*p corresponds to the linear interpolation convention commonly identified as quantile type 7; other quantile definitions differ.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| sampleSize | Number of observations in the sorted sample. | Required. Safe integer; minimum 1; maximum 1000000. |
| probability | Dimensionless probability from zero through one. | Required. Finite number. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| lowerIndex | Zero-based lower interpolation index. | Required. Safe integer. |
| upperIndex | Zero-based upper interpolation index. | Required. Safe integer. |
| fraction | Interpolation weight for the upper observation; the lower weight is one minus this value. | Required. Finite number. |
{
"input": {
"sampleSize": 4,
"probability": 0.5
},
"output": {
"lowerIndex": 1,
"upperIndex": 2,
"fraction": 0.5
}
} Limitations and assumptions
- This is the index term for one linear quantile convention, not a quantile value. The observations, sorting, missing-value handling, and alternative quantile definitions are separate.
- The field tables state structural bounds; the mechanics also specify cross-field constraints. Malformed inputs and unsupported domains cause errors. A successful false flag, empty branch value, or zero placeholder has the meaning stated above and is distinct from an input error.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Signed zero is exported as zero.
Alternative or Complementary methods
Use a complete estimator or model when a contribution, sensitivity, or domain check is insufficient. Verify the weight semantics, centering, denominator, and sampling assumptions before combining summaries.
References
Similar or alternative tools
- Quantile Interpolation Rank Fraction
Return zero-based Type-7 linear quantile indexes and interpolation fraction.
- Quartile Rule Midpoint Index
Half-sample membership indices for median-of-halves quartiles, with explicit odd-median inclusion.