Field-Map Scripting

4.1.3.2.7 StandardError

StandardError function


Prototype:

function StandardError (const StandardDeviation :extended; const NSample :integer) : extended;

Description:

Calculates standard error of variable with specified number of observations and standard deviation

Syntax:

variable := StandardError (StandardDeviation, NSample);


Part

Description


variable

A variable declared as type of extended


StandardDeviation

Sample standard deviation


NSample

Number of observations in sample







Return value:

Standard error

Definition:

Standard deviation / (Number of observations ^ 0.5)



Example:


Task:

Calculate standard error of DBH.


Data stored in the database.



Script:

var

 tab : TTableWrapper;

 attributeName: string;

 nullAsZero: boolean;

 x,e: extended;


begin

 tab:= Trees.table;

 attributeName:= 'DBH_mm';

 nullAsZero:= false;                    // dont want calculate with a null value


 x:= StandardDeviation(tab, attributeName, nullAsZero);


 e:= StandardError(x, Trees.RecordCount);             // Trees.RecordCount returns number of records

//e:= StandardError(StandardDeviation(tab, attributeName, nullAsZero), Trees.RecordCount);     //this is same as previous line


 ShowMessage(FloatToStr(e));

end.


Output in Field-Map Data Collector:

standard error of DBH


See also:

Mean; QuadraticMean; WeightedMean; Median; SampleVariance; StandardDeviation; StandardError; MeanError;VarianceOfMean; WeightedSampleVariance; WeightedStandardDeviation; WeightedVarianceOfMean;ConfidenceIntervalOfMean; VarianceOfTotal; ConfidenceIntervalOfTotal; StratifiedConfidenceIntervalOfTotal; SampleSize;ShowDistributionChart; ParameterizeRegressionModel; CalculateModelValue


Example