Description
Reconcile migration cohort counts with exact integer arithmetic.
Population records distinguish cohort balances, time exposure, survival expectations and observation coverage. Exact arithmetic can preserve counts while the definitions, exclusions and missingness still need independent verification.
Reconcile migration cohort counts with exact integer arithmetic.
When to use this tool
Use Migration Cohort Balance Gap when checking an explicit cohort record or exposure-support convention.
How to use the tool and how it works
- Enter start, arrivals, departures, observedEnd. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read expectedEndDecimal, residualDecimal. Use the output convention below.
Reconcile migration cohort counts with exact integer arithmetic. Require nonnegative whole counts and departures <= start+arrivals; return expectedEndDecimal = start+arrivals-departures and observed-minus-expected residualDecimal.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| start | Nonnegative safe-integer numeric starting count; output totals use exact BigInt arithmetic. | Required. Safe integer; minimum 0. |
| arrivals | Nonnegative safe-integer numeric arrivals count. | Required. Safe integer; minimum 0. |
| departures | Nonnegative safe-integer numeric departures count, no greater than start+arrivals. | Required. Safe integer; minimum 0. |
| observedEnd | Nonnegative safe-integer numeric observed ending count. | Required. Safe integer; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| expectedEndDecimal | Exact start+arrivals-departures as a decimal integer string. | Required. Text; maximum UTF-16 length 8192. |
| residualDecimal | Exact observedEnd-expectedEnd as a decimal integer string. | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"start": 100,
"arrivals": 20,
"departures": 10,
"observedEnd": 108
},
"output": {
"expectedEndDecimal": "110",
"residualDecimal": "-2"
}
} Limitations and assumptions
- Exact decimal strings preserve large totals; no migration events or cohort identity are verified.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- 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. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use suitable population and event data, including censoring and coverage evidence, for demographic inference beyond local bookkeeping.
References
Similar or alternative tools
- Population Fiscal Balance One Cohort
Return one cohort's supplied fiscal balance.
- Age Band Survival Share
Return a cohort survival share with a zero-initial-count flag.