Skip to content

Main content

Histogram Peak Tie Selector

Select every observed maximum histogram bin, retaining ties; an empty bank has null maximum, an all-zero bank ties every supplied bin.

Loading tool…

Description

Select every bin tied at the maximum supplied mass, retaining exact ties and empty-input evidence.

Histogram edges divide a numeric coordinate axis into ordered bins, while each bin mass represents a count or nonnegative weight. Probability mass is a fraction of the total; probability density additionally divides by bin width and therefore has inverse coordinate units. An edge plan alone contains no observations.

Select every bin tied at the maximum supplied mass, retaining exact ties and empty-input evidence.

When to use this tool

Use a tie-preserving maximum selector when every equally high bin should remain visible.

How to use the tool and how it works

  1. Enter mass using the definitions below.
  2. Run the operation. Resolve input-format errors before interpreting an output.
  3. Read result.maximum, result.indexes, using the stated boundary, ordering, sign and absence conventions.

Find the largest nonnegative mass and return every index with that exact value in input order. For an empty list return maximum null and no indexes.1

Input fieldMeaning and unitsAccepted input
massNonnegative finite bin masses in bin order; paired edge lists require mass.length=edges.length-1.Dense list of at most 128 finite numbers, under the stated integer/range rules.
Output fieldInterpretation
resultObject containing the fields below.
result.maximumLargest supplied mass, or null for an empty mass list.
result.indexesAll exact maximum-tie bin indexes, in input order.
json
{
  "input": {
    "mass": [
      2,
      3,
      3
    ]
  },
  "output": {
    "result": {
      "maximum": 3,
      "indexes": [
        1,
        2
      ]
    }
  }
}

Limitations and assumptions

  • Ties use exact numeric equality. An all-zero nonempty list selects every index; the tool does not infer peak prominence or smooth adjacent bins.
  • Masses are nonnegative finite counts or weights in bin order. Empty mass arrays are allowed. Floating-point arithmetic does not infer underlying observations or a population distribution.
  • Every declared outer field is required and unknown outer fields are rejected. Strings and JSON text have size limits, lists are bounded to 128 entries, and JSON nesting/node counts are bounded. Tighter operation-specific bounds stated above take precedence.
  • Numeric outputs must remain finite and within safe-integer magnitude. Original record indexes and cell coordinates are zero-based; stated half-open ranges exclude their end.

Alternative or Complementary methods

Keep edge definitions with mass arrays. Use common-boundary coarsening and whole-bin merging for aligned comparisons; use observation-level data when a calculation requires locations within bins.

References

  1. Tool behavior and example: Histogram Peak Tie Selector — tool.io

Similar or alternative tools