Skip to content

Main content

Behavioral Diary Timebin Boundary Choice Tool

Uniform bins with an explicit left-closed or right-closed boundary convention on an unfolded time axis.

Loading tool…

Description

Return a diary bin under left-closed or right-closed policy.

Behavioral-study coding depends on observation intervals, missing samples, event records and assignment rules. Partial-, whole- and momentary-sampling summaries answer different questions; local agreement or coverage does not establish actual behavior, a diagnosis or an effective intervention.

Return a diary bin under left-closed or right-closed policy.

When to use this tool

Use Behavioral Diary Timebin Boundary Choice when checking the stated behavioral-research observation, assignment, coverage or coding convention.

How to use the tool and how it works

  1. Enter time, origin, width, rightClosed. 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 index, lower, upper. Use the output convention below.

Return a diary bin under left-closed or right-closed policy. Require width > 0; index = floor((time-origin)/width) for left-closed, or ceil((time-origin)/width)-1 for right-closed, then return adjacent boundaries.1

Input fieldMeaning and unitsAccepted input
timeTimeRequired. Finite number.
originOriginRequired. Finite number.
widthInterval, bin, geometry or dimension width under the specific convention above.Required. Finite number; strictly above 0.
rightClosedTrue uses bins (lower,upper]; false uses [lower,upper). The right-closed origin belongs to index -1.Required. Boolean.
Output fieldInterpretationReturned shape
indexPosition under the explicit zero-/one-based convention, including any stated missing-position sentinel.Required. Safe integer.
lowerLowerRequired. Finite number.
upperUpperRequired. Finite number.
json
{
  "input": {
    "time": 20,
    "origin": 0,
    "width": 10,
    "rightClosed": false
  },
  "output": {
    "index": 2,
    "lower": 20,
    "upper": 30
  }
}

Limitations and assumptions

  • An exact origin enters bin -1 for the right-closed convention; no time-zone interpretation or actual diary reconstruction occurs.
  • 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 verified observations and the study’s complete sampling/coding protocol, with appropriate statistical and professional interpretation for health or intervention decisions.

References

  1. Calculation and input contract: behavioral-science/behavioral-diary-timebin-boundary-choice — tool.io

Similar or alternative tools