Skip to content

Main content

Sample Leverage Complement Tool

Compute one simple-regression diagonal leverage and its complement from supplied centered predictor data with an intercept.

Loading tool…

Description

Compute one simple-regression diagonal leverage and its complement from supplied centered predictor data with an intercept.

A statistical term depends on its data summaries, weighting convention, centering, denominator, and boundary rules. A contribution, derivative, domain check, or converted summary answers a narrower question than a complete estimator. Those conventions must match before terms are combined or compared.

Compute one simple-regression diagonal leverage and its complement from supplied centered predictor data with an intercept.

When to use this tool

Use Sample Leverage Complement 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

  1. Enter sampleSize, centeredPredictor, predictorSumSquares. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read leverage, complement. Use the output convention below.

Calculate leverage=1/sampleSize+centeredPredictor²/predictorSumSquares and complement=1-leverage. Require sample size at least two, positive sum of squares, and the supplied centered-value feasibility bound.1

Input fieldMeaning and unitsAccepted input
sampleSizeSample SizeRequired. Safe integer; minimum 2.
centeredPredictorCentered PredictorRequired. Finite number.
predictorSumSquaresPredictor Sum SquaresRequired. Finite number; strictly above 0.
Output fieldInterpretationReturned shape
leverageLeverageRequired. Finite number.
complementComplementRequired. Finite number.
json
{
  "input": {
    "sampleSize": 5,
    "centeredPredictor": 2,
    "predictorSumSquares": 20
  },
  "output": {
    "leverage": 0.4,
    "complement": 0.6000000000000001
  }
}

Limitations and assumptions

  • These are terms for a simple regression geometry with an intercept. Summaries are supplied; no model fitting, predictor verification, uncertainty calculation, or outlier decision is performed.
  • 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

  1. Calculation and input contract: statistics/sample-leverage-complement — tool.io

Similar or alternative tools

  • Effective Sample Size Weight Split

    Split oldWeight into firstPart and its remainder, replace its squared contribution in sumSquaredWeights, and compare effective sizes sumWeights²/squaredSum before and after.

  • Normal Score One Observation Leverage

    Calculate leverage=1/count+(value-mean)²/centeredSumSquares with positive centered sum of squares and integer count at least one.