Skip to content

Main content

Weighted Composition One Part Perturbation Tool

Calculate weighted composition one part perturbation from explicit caller-supplied inputs.

Loading tool…

Description

Calculate newFraction=(part+change)/(total+change) and fractionChange=newFraction-part/total.

Changing one component also changes the total when that component belongs to the whole. Its new share therefore uses both an adjusted numerator and an adjusted denominator. The change in share compares that new fraction with the original fraction, so both original and adjusted totals must support division.

Calculate newFraction=(part+change)/(total+change) and fractionChange=newFraction-part/total.

When to use this tool

Use Weighted Composition One Part Perturbation when you need this specific ratio, allocation, transformation, interval, or adjustment-order calculation with an explicit base.

How to use the tool and how it works

  1. Enter part, total, change. 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 newFraction, fractionChange. Use the output convention below.

Calculate newFraction=(part+change)/(total+change) and fractionChange=newFraction-part/total. Require a nonnegative part within total, nonnegative changed part, and positive changed total.1

Input fieldMeaning and unitsAccepted input
partOriginal component amount in the same unit as total and change.Required. Finite number; minimum 0.
totalOriginal base; zero can pass the input gate but causes an output-range error.Required. Finite number.
changeSigned amount added to both the component and the total.Required. Finite number.
Output fieldInterpretationReturned shape
newFractionAdjusted component divided by adjusted total; dimensionless.Required. Finite number.
fractionChangeNew fraction minus original fraction; a fraction difference, not a percentage numeral.Required. Finite number.
json
{
  "input": {
    "part": 20,
    "total": 100,
    "change": 25
  },
  "output": {
    "newFraction": 0.36,
    "fractionChange": 0.15999999999999998
  }
}

Limitations and assumptions

  • Original total zero produces an out-of-contract nonfinite fractionChange and an output error, even if the changed total is positive. The change affects both part and whole; no undefined-ratio fallback is supplied.
  • 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

Check numerator, denominator, units, and adjustment order before comparing results. Use a complete allocation or physical mixture model when a single arithmetic term leaves relevant constraints unspecified.

References

  1. Calculation and input contract: proportions/weighted-composition-one-part-perturbation — tool.io

Similar or alternative tools

  • Part Share After Exclusion

    Subtract excluded amounts from part and whole, then return their share when remainingWhole is positive, otherwise zero with defined false.

  • Weighted Parts Common Basis Crosswalk

    Normalize a nonempty nonnegative parts list by its positive sum and multiply each fraction by nonnegative basis for amounts.