Skip to content

GeometricMean ​

The n-th root of the product of n values.

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguageGeometricMean✓
GeometricMean(collection)x1x2⋯xnn\sqrt[n]{x_1 x_2 \cdots x_n} for the nn elements of collectioncollection.
Typed signatures
TypePackageApplies
(collection<any>) -> numbercombinatoricsalways

Domain: Collections

Details

Examples

1 more kept as data, checked against the oracles
Basic #

2⋅8=4\sqrt{2 \cdot 8} = 4

live ↗
InGeometricMean([2,8])\mathrm{GeometricMean}(\bigl\lbrack2, 8\bigr\rbrack)Out44

1⋅2⋅43=2\sqrt[3]{1 \cdot 2 \cdot 4} = 2

live ↗
InGeometricMean([1,2,4])\mathrm{GeometricMean}(\bigl\lbrack1, 2, 4\bigr\rbrack)Out22

For symbols this is the fourth root of the product, abcd4\sqrt[4]{abcd}

live ↗
InGeometricMean([a,b,c,d])\mathrm{GeometricMean}(\bigl\lbrack a, b, c, d\bigr\rbrack)Outabcd4\sqrt[4]{abcd}

A matrix is averaged column by column, each exact root left unevaluated

live ↗
InGeometricMean([[5,10],[2,1],[4,3],[12,15]])\mathrm{GeometricMean}(\bigl\lbrack\bigl\lbrack5, 10\bigr\rbrack, \bigl\lbrack2, 1\bigr\rbrack, \bigl\lbrack4, 3\bigr\rbrack, \bigl\lbrack12, 15\bigr\rbrack\bigr\rbrack)Out[4804,4504]\bigl\lbrack\sqrt[4]{480}, \sqrt[4]{450}\bigr\rbrack
Scope #

An exact irrational result

live ↗
InGeometricMean([2,3])\mathrm{GeometricMean}(\bigl\lbrack2, 3\bigr\rbrack)Out6\sqrt{6}

63\sqrt[3]{6}

live ↗
InGeometricMean([1,2,3])\mathrm{GeometricMean}(\bigl\lbrack1, 2, 3\bigr\rbrack)Out63\sqrt[3]{6}

Symbolic data

live ↗
InGeometricMean([a,b])\mathrm{GeometricMean}(\bigl\lbrack a, b\bigr\rbrack)Outab\sqrt{ab}

Exact integers keep an exact radical, 244\sqrt[4]{24}

live ↗
InGeometricMean([1,2,3,4])\mathrm{GeometricMean}(\bigl\lbrack1, 2, 3, 4\bigr\rbrack)Out244\sqrt[4]{24}

A 30-digit numeric list gives a 30-digit result

live ↗
InGeometricMean(N([1,2,3,4],30))\mathrm{GeometricMean}(N(\bigl\lbrack1, 2, 3, 4\bigr\rbrack, 30))Out2.213 363 839 400 643 184 822.213\,363\,839\,400\,643\,184\,82
live ↗
InGeometricMean([π,e,2])\mathrm{GeometricMean}(\bigl\lbrack π, e, 2\bigr\rbrack)Out2eπ3\sqrt[3]{2e π}
Properties #

The log of a geometric mean is the arithmetic mean of the logs

live ↗
InPowerExpand(ln⁡(GeometricMean([a,b,c,d])))\mathrm{PowerExpand}(\ln(\mathrm{GeometricMean}(\bigl\lbrack a, b, c, d\bigr\rbrack)))Out14(ln⁡(a)+ln⁡(b)+ln⁡(c)+ln⁡(d))\frac{1}{4}(\ln(a)+\ln(b)+\ln(c)+\ln(d))

The same identity read through a reciprocal

live ↗
InPowerExpand(1ln⁡(GeometricMean([a,b,c,d])))\mathrm{PowerExpand}(\frac{1}{\ln(\mathrm{GeometricMean}(\bigl\lbrack a, b, c, d\bigr\rbrack))})Out4ln⁡(a)+ln⁡(b)+ln⁡(c)+ln⁡(d)\frac{4}{\ln(a)+\ln(b)+\ln(c)+\ln(d)}
About
Examples13
Checked againstWolfram Language 13 agree
CrosswalkWolfram Language

See also: HarmonicMean, Mean