Field-Map Scripting

4.1.3.2.9 VarianceOfMean

VarianceOfMean function


Prototype:

function VarianceOfMean (TableOrLayer :TObjectWrapper; const AttributeName :string; const NullAsZero :boolean; const NSample :integer; const NPopulation :extended) : extended;

Description:

Calculates variance of mean of a specific attribute

Syntax:

variable := VarianceOfMean (tab, AttributeName, NullAsZero, NSample, NPopulation);


Part

Description


variable

A variable declared as type of extended


tab

Table containing source variables


AttributeName

Attribute of source table containing data to enter calculations


NullAsZero

Boolean expression defining whether to exclude null (false) entries or replace nulls with zeros (true)


NSample

Number of observations in a sample


NPopulation

Number of observations in a population




Return value:

Variance of mean



Example:


Task:

Calculate variance of mean of DBH.


Data stored in the database.



Script:

var

 tab : TTableWrapper;

 attributeName: string;

 nullAsZero: boolean;

 v: extended;


begin

 tab:= Trees.table;

 attributeName:= 'DBH_mm';

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


 v:= VarianceOfMean(tab, attributeName, nullAsZero, Trees.RecordCount, 20);


 ShowMessage(FloatToStr(v));

end.


Output in Field-Map Data Collector:

variance of mean 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