Gaussian elimination: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>David Eppstein
m →‎History: Supply requested citation
Line 1: Line 1:
{{Refimprove|article|date=May 2010}}
The writer is recognized by the title of Figures Lint. Puerto Rico is exactly where he and his wife live. My working day occupation is a meter reader. Body developing is what my family and I enjoy.<br><br>Stop by my weblog - [http://360vc.myblackicoffee.com/space.php?uid=191489&do=blog&id=172425 at home std testing]
 
[[Image:Geometric mean 3D plot from 0 to 100.png|thumb|300px|Three dimensional plot showing the values of the geometric mean of varying ''x'' and ''y'' values.]]
 
In mathematics, the '''geometric mean''' is a type of [[mean]] or [[average]], which indicates the central tendency or typical value of a set of numbers by using the product of their values (as opposed to the [[arithmetic mean]] which uses their sum). The geometric mean is defined as the [[Nth root|''n''th root]] (where n is the count of numbers) of the [[product (mathematics)|product]] of the numbers.
 
For instance, the geometric mean of two numbers, say 2 and 8, is just the [[square root]] of their product; that is <math>\sqrt{2\cdot 8}=4</math>. As another example, the geometric mean of the three numbers 4, 1, and 1/32 is the [[cube root]] of their product (1/8), which is 1/2; that is <math>\sqrt[3]{4\cdot 1\cdot 1/32}=1/2</math>.
 
A geometric mean is often used when comparing different items – finding a single "figure of merit" for these items – when each item has multiple properties that have different numeric ranges.<ref>{{cite web|title=TPC-D – Frequently Asked Questions (FAQ)|url=http://www.tpc.org/tpcd/faq.asp#anchor1140017|publisher=Transaction Processing Performance Council|accessdate=9 January 2012}}</ref> For example, the geometric mean can give a meaningful "average" to compare two companies which are each rated at 0 to 5 for their environmental sustainability, and are rated at 0 to 100 for their financial viability. If an arithmetic mean was used instead of a geometric mean, the financial viability is given more weight because its numeric range is larger- so a small percentage change in the financial rating (e.g. going from 80 to 90) makes a much larger difference in the arithmetic mean than a large percentage change in environmental sustainability (e.g. going from 2 to 5). The use of a geometric mean "normalizes" the ranges being averaged, so that no range dominates the weighting, and a given percentage change in any of the properties has the same effect on the geometric mean. So, a 20% change in environmental sustainability from 4 to 4.8 has the same effect on the geometric mean as a 20% change in financial viability from 60 to 72.
 
The geometric mean can be understood in terms of [[geometry]]. The geometric mean of two numbers, <math>a</math> and <math>b</math>, is the length of one side of a [[square (geometry)|square]] whose area is equal to the area of a [[rectangle]] with sides of lengths <math>a</math> and <math>b</math>. Similarly, the geometric mean of three numbers, <math>a</math>, <math>b</math>, and <math>c</math>, is the length of one side of a [[cube]] whose volume is the same as that of a [[cuboid]] with sides whose lengths are equal to the three given numbers.
 
The geometric mean applies only to positive numbers.<ref>The geometric mean only applies to positive numbers in order to avoid taking the root of a negative product, which would result in [[imaginary number]]s, and also to satisfy certain properties about means, which is explained later in the article. Note that the definition is unambiguous if one allows 0 (which yields a geometric mean of 0), but may be excluded, as one frequently wishes to take the logarithm of geometric means (to convert between multiplication and addition), and one cannot take the logarithm of 0.</ref> It is also often used for a set of numbers whose values are meant to be multiplied together or are exponential in nature, such as data on the growth of the [[World population|human population]] or interest rates of a financial investment.
 
The geometric mean is also one of the three classical [[Pythagorean means]], together with the aforementioned arithmetic mean and the [[harmonic mean]]. For all positive data sets containing at least one pair of unequal values, the harmonic mean is always the least of the three means, while the arithmetic mean is always the greatest of the three and the geometric mean is always in between (see [[Inequality of arithmetic and geometric means]].)
 
==Calculation==
The geometric mean of a data set <math>\{a_1,a_2 , \ldots,a_n\}</math> is given by:
:<math>\left(\prod_{i=1}^n a_i \right)^{1/n} = \sqrt[n]{a_1 a_2 \cdots a_n}.</math>
 
The geometric mean of a data set [[inequality of arithmetic and geometric means|is less than]] the data set's [[arithmetic mean]] unless all members of the data set are equal, in which case the geometric and arithmetic means are equal. This allows the definition of the [[arithmetic-geometric mean]], a mixture of the two which always lies in between.
 
The geometric mean is also the '''arithmetic-harmonic mean''' in the sense that if two [[sequence]]s (<math>a_n</math>) and (<math>h_n</math>) are defined:
:<math>a_{n+1} = \frac{a_n + h_n}{2}, \quad a_0=x</math>
 
and
:<math>h_{n+1} = \frac{2}{\frac{1}{a_n} + \frac{1}{h_n}}, \quad h_0=y</math>
 
where <math>h_{n+1}</math> is the [[harmonic mean]] of the previous values of the two sequences, then <math>a_n</math> and <math>h_n</math> will converge to the geometric mean of <math>x</math> and <math>y</math>.
 
This can be seen easily from the fact that the sequences do converge to a common limit (which can be shown by [[Bolzano–Weierstrass theorem]]) and the fact that geometric mean is preserved:
:<math>\sqrt{a_ih_i}=\sqrt{\frac{a_i+h_i}{\frac{a_i+h_i}{h_ia_i}}}=\sqrt{\frac{a_i+h_i}{\frac{1}{a_i}+\frac{1}{h_i}}}=\sqrt{a_{i+1}h_{i+1}}</math>
 
Replacing the arithmetic and harmonic mean by a pair of [[generalized mean]]s of opposite, finite exponents yields the same result.
 
===Relationship with arithmetic mean of logarithms {{anchor|Log-average}}===<!--"Log-average" redirects here-->
By using [[logarithmic identities]] to transform the formula, the multiplications can be expressed as a sum and the power as a multiplication.
:<math>\left(\prod_{i=1}^na_i \right)^{1/n} = \exp\left[\frac1n\sum_{i=1}^n\ln a_i\right]</math>
 
This is sometimes called the '''log-average'''.  It is simply computing the [[arithmetic mean]] of the logarithm-transformed values of <math>a_i</math> (i.e., the arithmetic mean on the log scale) and then using the exponentiation to return the computation to the original scale, i.e., it is the [[generalised f-mean]] with <math>f(x) = \log x</math>. For example, the geometric mean of 2 and 8 can be calculated as:
:<math>b^{(\log_b (2)+\log_b (8))/2} = 4,</math>
where <math>b</math> is any base of a [[logarithm]] (commonly 2, [[e (mathematical constant)|<math>e</math>]] or 10).
 
The right-hand side formula above is generally the preferred alternative for implementation in computer languages: overflows or underflows are less likely to happen compared to calculating the product of a set of numbers due to taking logarithms.
 
===Relationship with arithmetic mean and mean-preserving spread===
 
If a set of non-identical numbers is subjected to a [[mean-preserving spread]] — that is, two or more elements of the set are "spread apart" from each other while leaving the arithmetic mean unchanged — then the geometric mean always decreases.<ref>{{cite journal |last=Mitchell |first=Douglas W. |title=More on spreads and non-arithmetic means |journal=[[The Mathematical Gazette]] |volume=88 |year=2004 |pages=142–144 }}</ref>
 
===Computation in constant time===
In cases where the geometric mean is being used to determine the average growth rate of some quantity, and the initial and final values <math>a_0</math> and <math>a_n</math> of that quantity are known, the product of the measured growth rate at every step need not be taken.  Instead, the geometric mean is simply
:<math>\left(\frac{a_n}{a_0}\right)^{\frac1n},</math>
where <math>n</math> is the number of steps from the initial to final state.
 
If the values are <math>a_0, \ldots, a_n</math>, then the growth rate between measurement <math>a_k</math> and <math>a_{k+1}</math> is <math>a_{k+1}/a_k</math>.  The geometric mean of these growth rates is just
:<math>\left( \frac{a_1}{a_0} \frac{a_2}{a_1} \cdots \frac{a_n}{a_{n-1}} \right)^{\frac1n} = \left(\frac{a_n}{a_0}\right)^{\frac1n}</math>
 
==Properties==
The fundamental property of the geometric mean, which can be proven to be false for any other mean, is
 
: <math>
    \mathit{GM}\left(\frac{X_i}{Y_i}\right) = \frac{\mathit{GM}(X_i)}{\mathit{GM}(Y_i)}
</math>
 
This makes the geometric mean the only correct mean when averaging ''normalized'' results, that is results that are presented as ratios to reference values.<ref>{{cite journal |first=Philip J. |last=Fleming |first2=John J. |last2=Wallace |title=How not to lie with statistics: the correct way to summarize benchmark results |journal=Communications of the ACM |volume=29 |issue=3 |pages=218–221 |year=1986 |doi=10.1145/5666.5673 }}</ref>  This is the case when presenting computer performance with respect to a reference computer, or when computing a single average index from several heterogeneous sources (for example life expectancy, education years and infant mortality).  In this scenario, using the arithmetic or harmonic mean would change the ranking of the results depending on what is used as a reference.  For example, take the following comparison of execution time of computer programs:
 
{| class="wikitable"
|-
! &nbsp; !! Computer A !! Computer B !! Computer C
|-
| '''Program 1''' || 1 || 10 || 20
|-
| '''Program 2''' || 1000 || 100 || 20
|-
| '''Arithmetic mean''' || 500.5 || 55 || '''20'''
|-
| '''Geometric mean''' || 31.622 . . . || 31.622 . . . || '''20'''
|}
 
The arithmetic and geometric means "agree" that computer C is the fastest.  However, by presenting appropriately normalized values ''and'' using the arithmetic mean, we can show either of the other two computers to be the fastest.  Normalizing by A's result gives A as the fastest computer according to the arithmetic mean:
 
{| class="wikitable"
|-
! &nbsp; !! Computer A !! Computer B !! Computer C
|-
| '''Program 1''' || 1 || 10 || 20
|-
| '''Program 2''' || 1 || 0.1 || 0.02
|-
| '''Arithmetic mean''' || '''1''' || 5.05 || 10.01
|-
| '''Geometric mean''' || 1 || 1 || '''0.632 . . .'''
|}
 
while normalizing by B's result gives B as the fastest computer according to the arithmetic mean:
 
{| class="wikitable"
|-
! &nbsp; !! Computer A !! Computer B !! Computer C
|-
| '''Program 1''' || 0.1 || 1 || 2
|-
| '''Program 2''' || 10 || 1 || 0.2
|-
| '''Arithmetic mean''' || 5.05 || '''1''' || 1.1
|-
| '''Geometric mean''' || 1 || 1 || '''0.632'''
|}
 
In all cases, the ranking given by the geometric mean stays the same as the one obtained with unnormalized values.
 
==Applications==
 
===Proportional growth===
{{Further|Compound annual growth rate}}
The geometric mean is more appropriate than the [[arithmetic mean]] for describing proportional growth, both [[exponential growth]] (constant proportional growth) and varying growth; in business the geometric mean of growth rates is known as the [[compound annual growth rate]] (CAGR). The geometric mean of growth over periods yields the equivalent constant growth rate that would yield the same final amount.
 
Suppose an orange tree yields 100 oranges one year and then 180, 210 and 300 the following years, so the growth is 80%, 16.6666% and 42.8571% for each year respectively. Using the [[arithmetic mean]] calculates a (linear) average growth of 46.5079% (80% + 16.6666% + 42.85261% divided by 3). However, if we start with 100 oranges and let it grow 46.5079% each year, the result is 314 oranges, not 300, so the linear average ''over''-states the year-on-year growth.
 
Instead, we can use the geometric mean. Growing with 80% corresponds to multiplying with 1.80, so we take the geometric mean of 1.80, 1.166666 and 1.428571, i.e. <math>\sqrt[3]{1.80 \times 1.166666 \times 1.428571} = 1.442249</math>; thus the "average" growth per year is 44.2249%. If we start with 100 oranges and let the number grow with 44.2249% each year, the result is 300 oranges.
 
===Applications in the social sciences===
 
Although the geometric mean has been relatively rare in computing social statistics, starting from 2010 the United Nations Human Development Index did switch to this mode of calculation, on the grounds that it better reflected the non-substitutable nature of the statistics being compiled and compared:
:''The geometric mean decreases the level of substitutability between dimensions [being compared] and at the same time ensures that a 1 percent decline in say life expectancy at birth has the same impact on the HDI as a 1 percent decline in education or income. Thus, as a basis for comparisons of achievements, this method is also more respectful of the intrinsic differences across the dimensions than a simple average.''<ref>http://hdr.undp.org/en/statistics/faq/</ref>
 
Note that not all values used to compute the HDI are normalized; some of them instead have the form <math>(X - X_\min) / (X_\mathrm{norm} - X_\min)</math>. This makes the choice of the geometric mean less obvious than one would expect from the "Properties" section above.
 
===Aspect ratios===
[[File:Dr. Kerns Powers, SMPTE derivation of 16-9 aspect ratio.svg|thumb|right||Equal area comparison of the aspect ratios used by Kerns Powers to derive the [[SMPTE]] [[16:9]] standard.<ref name="Cinemasource" /> <span style="color:red;">TV 4:3/1.33 in red</span>, <span style="color:orange;">1.66 in orange</span>, <span style="color:blue;">'''16:9/1.7{{overline|7}} in blue'''</span>, <span style="color:#aaaa00;">1.85 in yellow</span>, <span style="color:mauve;">[[Panavision]]/2.2 in mauve</span> and <span style="color:purple;">[[CinemaScope]]/2.35 in purple.</span>]]
The geometric mean has been used in choosing a compromise [[Aspect ratio (image)|aspect ratio]] in film and video: given two aspect ratios, the geometric mean of them provides a compromise between them, distorting or cropping both in some sense equally. Concretely, two equal area rectangles (with the same center and parallel sides) of different aspect ratios intersect in a rectangle whose aspect ratio is the geometric mean, and their hull (smallest rectangle which contains both of them) likewise has aspect ratio their geometric mean.
 
In [[Aspect_ratio_(image)#Why_16:9_was_chosen_by_the_SMPTE|the choice of 16:9]] aspect ratio by the [[SMPTE]], balancing 2.35 and 4:3, the geometric mean is <math>\sqrt{2.35 \times \frac{4}{3}} \approx 1.7701</math>, and thus <math>16:9 = 1.77\overline{7}</math>... was chosen. This was discovered empirically by Kerns Powers, who cut out rectangles with equal areas and shaped them to match each of the popular aspect ratios.  When overlapped with their center points aligned, he found that all of those aspect ratio rectangles fit within an outer rectangle with an aspect ratio of 1.77:1 and all of them also covered a smaller common inner rectangle with the same aspect ratio 1.77:1.<ref name="Cinemasource">{{cite journal |url=http://www.cinemasource.com/articles/aspect_ratios.pdf#page=8 |title=TECHNICAL BULLETIN: Understanding Aspect Ratios |publisher=The CinemaSource Press |year=2001 |accessdate=2009-10-24}}</ref> The value found by Powers is exactly the geometric mean of the extreme aspect ratios, [[4:3]] (1.33:1) and [[CinemaScope]] (2.35:1), which is coincidentally close to <math>16:9</math> (<math>1.77\overline{7}:1</math>). Note that the intermediate ratios have no effect on the result, only the two extreme ratios.
 
Applying the same geometric mean technique to 16:9 and 4:3 approximately yields the [[14:9]] (<math>1.55\overline{5}</math>...) aspect ratio, which is likewise used as a compromise between these ratios.<ref>{{cite patent | title = Method of showing 16:9 pictures on 4:3 displays | country = US | number = 5956091 | gdate = September 21, 1999 }}</ref> In this case 14:9 is exactly the ''[[arithmetic mean]]'' of <math>16:9</math> and <math>4:3 = 12:9</math>, since 14 is the average of 16 and 12, while the precise ''geometric mean'' is <math>\sqrt{\frac{16}{9}\times\frac{4}{3}} \approx 1.5396 \approx 13.8:9,</math> but the two different ''means'', arithmetic and geometric, are approximately equal because both numbers are sufficiently close to each other (a difference of less than 2%).
 
===Anti-reflective coatings===
In optical coatings, where reflection needs to be minimised between two media of refractive indices ''n''<sub>0</sub> and ''n''<sub>2</sub>, the optimum refractive index ''n''<sub>1</sub> of the [[anti-reflective coating]] is given by the geometric mean: <math>n_1 = \sqrt{n_0 n_2}</math>.
 
===Spectral flatness===
In [[signal processing]], [[spectral flatness]], a measure of how flat or spiky a spectrum is, is defined as the ratio of the geometric mean of the power spectrum to its arithmetic mean.
 
===Geometry===
 
In the case of a [[right triangle]], its altitude is the length of a line extending perpendicularly from the hypotenuse to its 90° vertex. Imagining that this line splits the hypotenuse into two segments, the geometric mean of these segment lengths is the length of the altitude.
 
In an [[ellipse]], the [[semi-minor axis]] is the geometric mean of the maximum and minimum distances of the ellipse from a [[Focus (mathematics)|focus]]; and the [[semi-major axis]] of the ellipse is the geometric mean of the distance from the center to either focus and the distance from the center to either [[Directrix (conic section)|directrix]].
 
===Financial===
The geometric mean has from time to time been used to calculate financial indices (the averaging is over the components of the index). For example in the past the [[FT 30]] index used a geometric mean.<ref>{{cite book |title=The Financial System Today |first=Eric E. |last=Rowley |publisher=Manchester University Press |year=1987 |isbn=0719014875 }}</ref> It is also used in the recently introduced "[[RPIJ]]" measure of inflation in the United Kingdom and elsewhere in the European Union.
 
As Rowley states, this has the effect of understating movements in the index compared to using the arithmetic mean. As Rowley explains, there are circumstances where this is undesirable, for example in measuring cost of living changes, where it is undesirable to "damp down" large changes in some of the index components.
 
==See also==
{{Portal|Statistics}}
<div style="-moz-column-count:3; column-count:3;">
*[[Arithmetic mean]]
*[[Arithmetic-geometric mean]]
*[[Average]]
*[[Generalized mean]]
*[[Geometric standard deviation]]
*[[Harmonic mean]]
*[[Heronian mean]]
*[[Hyperbolic coordinates]]
*[[Log-normal distribution]]
*[[Muirhead's inequality]]
*[[Product (mathematics)|Product]]
*[[Pythagorean means]]
*[[Quadratic mean]]
*[[Rate of return]]
*[[Weighted geometric mean]]
</div>
 
==Notes and references==
{{Reflist}}
 
==External links==
*[http://www.sengpielaudio.com/calculator-geommean.htm Calculation of the geometric mean of two numbers in comparison to the arithmetic solution]
*[http://www.cut-the-knot.org/Generalization/means.shtml Arithmetic and geometric means]
*[http://www.math.toronto.edu/mathnet/questionCorner/geomean.html When to use the geometric mean]
*[http://www.buzzardsbay.org/geomean.htm Practical solutions for calculating geometric mean with different kinds of data]
*[http://mathworld.wolfram.com/GeometricMean.html Geometric Mean on MathWorld]
*[http://www.cut-the-knot.org/pythagoras/GeometricMean.shtml Geometric Meaning of the Geometric Mean]
*[http://www.graftacs.com/geomean.php3 Geometric Mean Calculator for larger data sets]
*[http://www.census.gov/population/apportionment/about/how.html Computing [[Congressional apportionment]] using Geometric Mean ]
 
{{Statistics|descriptive}}
 
{{DEFAULTSORT:Geometric Mean}}
[[Category:Means]]

Revision as of 09:41, 26 February 2014

The writer is recognized by the title of Figures Lint. Puerto Rico is exactly where he and his wife live. My working day occupation is a meter reader. Body developing is what my family and I enjoy.

Stop by my weblog - at home std testing