content/commands/tdigest.trimmed_mean.md
Returns an estimation of the mean value from the sketch, excluding observation values outside the low and high cutoff quantiles.
is the key name for an existing t-digest sketch.
</details> <details open><summary><code>low_cut_quantile</code></summary>a floating-point value in the range [0..1]. It must be lower than high_cut_quantile.
When equal to 0, no low cut.
When greater than 0, exclude observation values lower than this quantile.
</details> <details open><summary><code>high_cut_quantile</code></summary>a floating-point value in the range [0..1]. It must be higher than low_cut_quantile.
When less than 1, exclude observation values greater than or equal to this quantile.
When equal to 1, no high cut.
</details>{{< highlight bash >}} redis> TDIGEST.CREATE t COMPRESSION 1000 OK redis> TDIGEST.ADD t 1 2 3 4 5 6 7 8 9 10 OK redis> TDIGEST.TRIMMED_MEAN t 0.1 0.6 "4" redis> TDIGEST.TRIMMED_MEAN t 0.3 0.9 "6.5" redis> TDIGEST.TRIMMED_MEAN t 0 1 "5.5" {{< / highlight >}}
| Redis Software | Redis Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> | |:----------------------|:-----------------|:------| | <span title="Supported">✅ Supported</span> | <span title="Supported">✅ Flexible & Annual</span> <span title="Supported">✅ Free & Fixed</nobr></span> | |
{{< multitabs id="tdigest-trimmedmean-return-info" tab1="RESP2" tab2="RESP3" >}}
One of the following:
nan if the sketch is empty.-tab-sep-
One of the following:
nan if the sketch is empty.{{< /multitabs >}}