Monday, June 14, 2010

Getting the Square Root and Cube Root

The OpenOffice Calc spreadsheet formula for square root is:

= sqrt ( A )

Where A = data

This can also be reformulated as:

= A^(1/2)

This reformulation is versatile as it can be extended to handle cube roots as follows:

= A^(1/3)

Harmonic Mean

The Harmonic Mean formula is:

HM = 1.5 / (0.5/A + 0.5/B + 0.5/C )

Where: A, B, and C = sample data
0.5 is the assigned weight for each sample
1.5 is the total assigned weight for all samples

Given only two samples, the formula becomes:

HM = 1 / ( 0.5/A + 0.5/B )

The manual calculation of Harmonic Mean becomes tedious as the number of samples increases.

OpenOffice Calc spreadsheet uses the following formula in calculating for the Harmonic Mean:

= harmean ( range of cells of the sample data )

Geometric Mean Formula

The geometric mean formula is:

GM = ( A * B * C ) ^ (1 / n )

Where: A, B, and C = sample data
n = is the number of samples, in this case 3

If there are only 2 sample data, the formula becomes:

GM = ( A * B ) ^ (1/2)

The calculation of the Geometric Mean becomes tedious as soon as the number of samples increases. Fortunately, modern spreadsheets can easily calculate this measure of central tendency. The OpenOffice formula for the Geometric Mean is:

=geomean( range of cells of the sample data )