Difference between revisions of "LIST STAT GEOMETRIC MEAN"

From Second Life Wiki
Jump to navigation Jump to search
m
m (<lsl> tag to <source>)
 
(One intermediate revision by one other user not shown)
Line 4: Line 4:
|value=9
|value=9
|desc=Returns the geometric mean of a list of numbers.
|desc=Returns the geometric mean of a list of numbers.
<lsl>
<source lang="lsl2">
float geometric_mean = llListStatistics( LIST_STAT_GEOMETRIC_MEAN, numList );
float geometric_mean = llListStatistics( LIST_STAT_GEOMETRIC_MEAN, numList );
</lsl>
</source>
For two numbers, ''a'' and ''b'', the geometric mean is llSqrt(a*b). For a list of ''n'' numbers, the geometric mean is the n-th root of their product. It indicates the central tendency or typical value to expect. It only works for positive numbers.
For two numbers, ''a'' and ''b'', the geometric mean is [[llSqrt]](a*b). For a list of ''n'' numbers, the geometric mean is the n-th root of their product. It indicates the central tendency or typical value to expect. It only works for positive numbers.


In comparison, the arithmetic mean (known as the average) is the sum of the numbers divided by how many numbers there are.
In comparison, the arithmetic mean (known as the average) is the sum of the numbers divided by how many numbers there are.

Latest revision as of 16:02, 23 January 2015

Description

Constant: integer LIST_STAT_GEOMETRIC_MEAN = 9;

The integer constant LIST_STAT_GEOMETRIC_MEAN has the value 9

Returns the geometric mean of a list of numbers.

float geometric_mean = llListStatistics( LIST_STAT_GEOMETRIC_MEAN, numList );

For two numbers, a and b, the geometric mean is llSqrt(a*b). For a list of n numbers, the geometric mean is the n-th root of their product. It indicates the central tendency or typical value to expect. It only works for positive numbers.

In comparison, the arithmetic mean (known as the average) is the sum of the numbers divided by how many numbers there are.

Related Articles

Functions

•  llListStatistics

Deep Notes

Search JIRA for related Issues

Signature

integer LIST_STAT_GEOMETRIC_MEAN = 9;