Difference between revisions of "LIST STAT STD DEV"

From Second Life Wiki
Jump to: navigation, search
(New page: {{LSL Constant |name=LIST_STAT_STD_DEV |type=integer |value=5 |desc= |pa= |text= |pb= |examples |constants= <!--{{LSL ConstRow|CHANGED_SHAPE}}--> |functions= {{LSL DefineRow||[[llListStati...)
 
m
Line 3: Line 3:
 
|type=integer
 
|type=integer
 
|value=5
 
|value=5
|desc=
+
|desc=Calculates the ''sample'' standard deviation of a list of numbers. Standard deviation is a measure of how spread out the values are, and is defined as the square root of the average of the squares of the numbers:
 +
<lsl>
 +
integer n = llListStatistics( LIST_STAT_NUM_COUNT, numList );
 +
1/n * llSqrt( llListStatistics( LIST_STAT_SUM_SQUARES , numList ) );
 +
</lsl>
 +
The sample standard deviation is used when the list doesn't include the ''entire'' set of numbers. The true standard deviation is therefore estimated by using the sample standard deviation, which is defined by,
 +
<lsl>
 +
integer n = llListStatistics( LIST_STAT_NUM_COUNT, numList );
 +
1/(n-1) * llSqrt( llListStatistics( LIST_STAT_SUM_SQUARES , numList ) );
 +
</lsl>
 
|pa=
 
|pa=
 
|text=
 
|text=

Revision as of 12:43, 10 April 2008

Description

Constant: integer LIST_STAT_STD_DEV = 5;

The integer constant LIST_STAT_STD_DEV has the value 5

Calculates the sample standard deviation of a list of numbers. Standard deviation is a measure of how spread out the values are, and is defined as the square root of the average of the squares of the numbers: <lsl> integer n = llListStatistics( LIST_STAT_NUM_COUNT, numList ); 1/n * llSqrt( llListStatistics( LIST_STAT_SUM_SQUARES , numList ) ); </lsl> The sample standard deviation is used when the list doesn't include the entire set of numbers. The true standard deviation is therefore estimated by using the sample standard deviation, which is defined by, <lsl> integer n = llListStatistics( LIST_STAT_NUM_COUNT, numList ); 1/(n-1) * llSqrt( llListStatistics( LIST_STAT_SUM_SQUARES , numList ) ); </lsl>

Related Articles

Functions

•  llListStatistics

Deep Notes

Search JIRA for related Issues

Signature

integer LIST_STAT_STD_DEV = 5;