Description
Return arithmetic=first/2+second/2, harmonic=2*first*second/(first+second), and gap=arithmetic-harmonic for positive inputs.
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.
Return arithmetic=first/2+second/2, harmonic=2*first*second/(first+second), and gap=arithmetic-harmonic for positive inputs.
When to use this tool
Use Arithmetic Harmonic Mean Two Value Gap 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 first, second. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read arithmetic, harmonic, gap. Use the output convention below.
Return arithmetic=first/2+second/2, harmonic=2*first*second/(first+second), and gap=arithmetic-harmonic for positive inputs.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| first | First | Required. Finite number; strictly above 0. |
| second | Second | Required. Finite number; strictly above 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| arithmetic | Arithmetic | Required. Finite number. |
| harmonic | Harmonic | Required. Finite number. |
| gap | Gap | Required. Finite number. |
{
"input": {
"first": 2,
"second": 8
},
"output": {
"arithmetic": 5,
"harmonic": 3.2,
"gap": 1.7999999999999998
}
} Limitations and assumptions
- The values need compatible units and equal weighting. The harmonic formula can overflow in intermediate products at extreme scales; this does not select a suitable mean for a dataset.
- 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
- Arithmetic Geometric Mean Gap Two Values
Return arithmetic=(left+right)/2, geometric=sqrt(left)*sqrt(right), and gap=arithmetic-geometric for nonnegative inputs.
- Log Mean Exp Two Value Stability
Calculate log((exp(left)+exp(right))/2) using the larger input as a shift before exponentiation.