Skip to content

Main content

Audit Sample Weight Base Flag Tool

Calculate audit sample weight base flag from explicit caller-supplied inputs.

Loading tool…

Description

Calculate audit sample weight base flag from explicit caller-supplied inputs.

Quality records separate measured results, reference values, acceptance rules, and supporting evidence. Arithmetic consistency and record coverage can be checked against supplied criteria without establishing traceability, approving a method, or deciding product conformity.

Calculate audit sample weight base flag from explicit caller-supplied inputs.

When to use this tool

Use it for audit sample weight base flag when the required inputs and conventions are already available.

How to use the tool and how it works

  1. Enter sampleWeights, included, normalizeIncluded. Keep parallel arrays aligned and use the stated units and conventions.
  2. Run the calculation. Correct any input error before interpreting a result.
  3. Read denominator, includedWeight, share, defined. Inspect any known, defined, inclusion, or boundary flags before interpreting numeric values.

Require aligned sampleWeights and included flags and nonnegative weights. Sum includedWeight; use all weights for denominator unless normalizeIncluded is true, in which case use only included weights. Divide when the chosen denominator is positive.1

Input fieldMeaning and unitsAccepted input
sampleWeightsSample WeightsRequired. Array of Finite number.; maximum items 256.
includedIncludedRequired. Array of Boolean.; maximum items 256.
normalizeIncludedUse included weights for the denominator when true, otherwise all sample weights.Required. Boolean.
Output fieldInterpretationReturned shape
denominatorDenominatorRequired. Finite number.
includedWeightIncluded WeightRequired. Finite number.
shareDimensionless fraction using the denominator described above; not a percentage numeral.Required. Finite number.
definedWhether the associated denominator or quantity is defined; read this before interpreting a zero placeholder.Required. Boolean.
json
{
  "input": {
    "sampleWeights": [
      2,
      3,
      5
    ],
    "included": [
      true,
      false,
      true
    ],
    "normalizeIncluded": false
  },
  "output": {
    "denominator": 10,
    "includedWeight": 7,
    "share": 0.7,
    "defined": true
  }
}

Limitations and assumptions

  • With normalization to included weights, a defined share is one. A zero denominator returns share zero with defined false; weights and sampling representativeness are supplied assumptions.
  • The field tables describe structural bounds; the mechanics also state cross-field requirements. Malformed input shapes, disallowed keys, and invalid domains cause input errors. Results must remain finite and within the declared output contract. A successful false flag or zero placeholder is distinct from an error.
  • Numeric arithmetic uses binary floating point. Exact comparisons have no hidden tolerance or decimal rounding; negative zero is exported as zero. Decimal-text integer operations retain the exactness specifically stated above.

Alternative or Complementary methods

For audit sample weight base flag, check the source records and the supplied rule before comparing the result with another method. Use a separate evidence or method review when arithmetic consistency alone cannot establish the required conclusion.

References

  1. Calculation and input contract: quality-assurance/audit-sample-weight-base-flag — tool.io

Similar or alternative tools