ContraharmonicMean[list]
gives the contraharmonic mean of the values in list.
ContraharmonicMean[list,p]
gives the order p Lehmer contraharmonic mean.
ContraharmonicMean
ContraharmonicMean[list]
gives the contraharmonic mean of the values in list.
ContraharmonicMean[list,p]
gives the order p Lehmer contraharmonic mean.
Details
- For the list {x1,x2,…,xn}, the contraharmonic mean is given by
. - The order p Lehmer mean is given by
. - ContraharmonicMean handles both numerical and symbolic data.
- ContraharmonicMean[{{x1,y1,…},{x2,y2,…},…}] gives {ContraharmonicMean[{x1,x2,…}],ContraharmonicMean[{y1,y2,…}]}.
Examples
open all close allBasic Examples (2)
Scope (9)
Exact input yields exact output:
ContraharmonicMean[{1, 2, 3, 4}]ContraharmonicMean[{π, E, 2}, 1 / 2]Approximate input yields approximate output:
ContraharmonicMean[{1., 2., 3., 4.}]ContraharmonicMean[N[{1, 2, 3, 4}, 30], 7]ContraharmonicMean for a matrix gives columnwise means:
ContraharmonicMean[Array[Subscript[a, ##]&, {2, 2}]]ContraharmonicMean[RandomReal[1, 10 ^ 7]]ContraharmonicMean[RandomReal[1, {10 ^ 6, 3}]]SparseArray data can be used just like dense arrays:
ContraharmonicMean[SparseArray[{{1} -> 1, {2} -> 7}]]ContraharmonicMean[SparseArray[{{1, 1} -> 1, {2, 1} -> 2, {2, 2} -> 3}]]Find the contraharmonic mean of WeightedData:
ContraharmonicMean[WeightedData[{1, 2, 3}, {Subscript[w, 1], Subscript[w, 2], Subscript[w, 3]}]]data = {8, 3, 5, 4, 9, 1, 4, 2, 2, 3};
weights = {0.15, 0.09, 0.12, 0.10, 0.16, 0.3, 0.11, 0.08, 0.08, 0.09};ContraharmonicMean[WeightedData[data, weights]]Find the contraharmonic mean of EventData:
e = {1.0, 2.1, 3.2, 4.5, 5.7};
ci = {0, 0, 0, 1, 0};ContraharmonicMean[EventData[e, ci]]Find the contraharmonic mean of a TimeSeries:
ContraharmonicMean[TemporalData[TimeSeries, {{{0.15864140638143098, 0.3435049074668335, -1.9621462271938013,
-1.6890669314901334, 0.6954484987268401, -1.9567202370040935, -1.3930016185102279,
-2.0833128365294504, 1.7359349394508587, -1.7039727275329852, -1. ... 29228893625929153, -0.5363532084601115, -2.796595136284031, 1.2765327710447636,
-2.9905979211205196}}, {{0, 107, 1}}, 1, {"Continuous", 1}, {"Discrete", 1}, 1,
{ResamplingMethod -> {"Interpolation", InterpolationOrder -> 1}}}, False, 10.1]]Find the contraharmonic mean for data involving quantities:
data = Quantity[RandomReal[1, 6], "Meters"]ContraharmonicMean[data]Properties & Relations (2)
The contraharmonic mean is a quotient of two means:
v = {a, b, c};ContraharmonicMean[v] == Mean[v ^ 2] / Mean[v]The geometric mean of the arithmetic and contraharmonic means is the root mean square:
v = {a, b, c};GeometricMean[{Mean[v], ContraharmonicMean[v]}] == RootMeanSquare[v]Related Guides
History
Text
Wolfram Research (2008), ContraharmonicMean, Wolfram Language function, https://reference.wolfram.com/language/ref/ContraharmonicMean.html.
CMS
Wolfram Language. 2008. "ContraharmonicMean." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ContraharmonicMean.html.
APA
Wolfram Language. (2008). ContraharmonicMean. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ContraharmonicMean.html
BibTeX
@misc{reference.wolfram_2026_contraharmonicmean, author="Wolfram Research", title="{ContraharmonicMean}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/ContraharmonicMean.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_contraharmonicmean, organization={Wolfram Research}, title={ContraharmonicMean}, year={2008}, url={https://reference.wolfram.com/language/ref/ContraharmonicMean.html}, note=[Accessed: 12-June-2026]}