iqm.benchmarks.utils.median_with_uncertainty

iqm.benchmarks.utils.median_with_uncertainty#

iqm.benchmarks.utils.median_with_uncertainty(observations: Sequence[float]) Dict[str, float]#

Computes the median of a Sequence of float observations and returns value and propagated uncertainty. Reference: https://mathworld.wolfram.com/StatisticalMedian.html

Parameters:

observations (Sequence[float]) – a Sequence of floating-point numbers.

Returns:

a dictionary with keys “value” and “uncertainty” for the median of the input Sequence.

Return type:

Dict[str, float]