Statistical Methods

Integrate a sampled trajectory on an irregular time grid

Define the task

Write down the quantity being integrated and the units of both axes. An area under a concentration curve has concentration-times-time units, while an area under a survival curve has time units. Decide whether straight segments are a reasonable representation between observations. A step curve may require a different rule.

Carry out the check

For each neighboring pair, average the two measured heights and multiply by the elapsed time. Add the segment areas. Retain the actual coordinates because unequal intervals carry unequal widths. Check that times increase, resolve duplicate times, and document gaps or interventions before bridging them. SciPy's trapezoid function follows the supplied coordinate order rather than sorting it.

Worked hypothetical example

For hypothetical heights 2, 4 and 2 at times 0, 1 and 3, the segment areas are 3 and 6, giving total area 9. Averaging the heights and multiplying by the total span would give 8 and answer a different approximation. Sparse observations can miss short peaks. Report the interpolation rule, observed span and missing intervals alongside the numeric area.

Method checked 14 November 2026 against SciPy documentation: trapezoid.

Open the sampled trajectory trapezoid calculator.

Download the sampled trajectory gap log.

Related reading

Reading path: Analyze data. Guide 133 of 142. Choose any guide to suit your project.

Statistical Methods

Convert differences into rates on an irregular observation grid

Separate the average of interval slopes from net change per elapsed hour when observation times are uneven.

Statistical Methods

Translate a constant rate into a waiting-time probability

Translate a constant event rate into a waiting-time probability. Includes a worked hypothetical example and checks for parameter-transfer errors.

Browse this reading pathTools for this stageGuides and downloads for this stage