# GeometricMean GeometricMean[data]

gives the geometric mean of the values in data.

# Details • For VectorQ data {x1,x2,,xn}, the geometric mean is given by .
• GeometricMean[{{x1,y1,},{x2,y2,},}] gives {GeometricMean[{x1,x2,}],GeometricMean[{y1,y2,}]}. »
• For ArrayQ data, the geometric mean estimate is equivalent to ArrayReduce[GeometricMean,data,1]. »
• • GeometricMean handles both numerical and symbolic data.
• The data can have the following additional forms and interpretations:
•  Association the values (the keys are ignored) » SparseArray as an array, equivalent to Normal[data] » QuantityArray quantities as an array » WeightedData weighted mean, based on the underlying EmpiricalDistribution » EventData based on the underlying SurvivalDistribution » TimeSeries, TemporalData, … vector or array of values (the time stamps ignored) » Image,Image3D RGB channel's values or grayscale intensity value » Audio amplitude values of all channels »

# Examples

open allclose all

## Basic Examples(2)

Geometric mean of a list:

Geometric mean of columns of a matrix:

## Scope(13)

### Basic Uses(6)

Exact input yields exact output:

Approximate input yields approximate output:

Find the geometric mean of WeightedData:

Find the geometric mean of EventData:

Find the geometric mean of a TimeSeries:

The geometric mean depends only on the values:

Compute a weighted geometric mean:

Find the geometric mean of data involving quantities:

### Array Data(5)

GeometricMean for a matrix gives columnwise means:

Mean for a tensor works across the first index: »

Works with large arrays:

When the input is an Association, GeometricMean works on its values:

SparseArray data can be used just like dense arrays:

Find the geometric mean of a QuantityArray:

### Image and Audio Data(2)

Channelwise geometric mean value of an RGB image:

Geometric mean intensity value of a grayscale image:

On audio objects, GeometricMean works channelwise:

## Applications(1)

Find the geometric mean for the heights of children in a class:

## Properties & Relations(3)

GeometricMean is logarithmically related to Mean for positive values:

GeometricMean is logarithmically related to HarmonicMean for positive values:

For positive data, HarmonicMean[d]GeometricMean[d]Mean[d]:

Prove the inequality symbolically:

## Possible Issues(1)

GeometricMean may return complex values when data contains negative values:

For different sample realizations, the geometric mean is real: