Description
Calculate weightSum=sum(weights) and effectiveDof=weightSum-sum(weights²)/weightSum from a nonempty nonnegative weight list with positive sum.
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.
Calculate weightSum=sum(weights) and effectiveDof=weightSum-sum(weights²)/weightSum from a nonempty nonnegative weight list with positive sum.
When to use this tool
Use Weighted Sample Degrees of Freedom Constraint 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 weights. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read weightSum, effectiveDof, valid. Inspect valid before interpreting the associated values.
Calculate weightSum=sum(weights) and effectiveDof=weightSum-sum(weights²)/weightSum from a nonempty nonnegative weight list with positive sum. Return valid when effectiveDof is strictly positive.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| weights | Weights | Required. Array of finite number; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| weightSum | Weight Sum | Required. Finite number. |
| effectiveDof | Weighted-variance denominator W-sum(w²)/W, not effective sample size minus one. | Required. Finite number. |
| valid | Whether this tool’s specific rule passes, not a broader approval. | Required. Boolean. |
{
"input": {
"weights": [
1,
1,
2
]
},
"output": {
"weightSum": 4,
"effectiveDof": 2.5,
"valid": true
}
} Limitations and assumptions
- EffectiveDof is a weighted-variance denominator, not effective sample size minus one. Weight semantics and statistical assumptions are not selected, and one positive weight yields a zero denominator.
- 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
- Weight Rescale Standard Error Invariance Check
Calculate effectiveSize=sumWeights²/sumSquaredWeights and return the same number as rescaledEffectiveSize with invariant true.
- statistics/weighted-mean
Calculate an arithmetic mean using nonnegative observation weights.