Field-Map Scripting

4.1.3.2.15 ConfidenceIntervalOfTotal

ConfidenceIntervalOfTotal function


Prototype:

function ConfidenceIntervalOfTotal (const NSample :integer; const VarianceOfTotal :extended; const Alpha :integer {5} ) : extended;

Description:

Calculates the width of alpha-confidence interval of variable with specified number of observations and variance

Syntax:

variable := ConfidenceIntervalOfTotal (NSample, VarianceOfTotal, Alpha);


Part

Description


variable

A variable declared as type of extended


NSample

Number of observations in sample


VarianceOfTotal

Sample variance of total


Alpha

Confidence level




Return value:

Width of confidence interval

Note:

Calculations are based on the presumption of unknown population standard deviation, i.e. quantiles of Students distribution are used.



Example:

var
  tab : TTableWrapper;
  attributeName: string;
  nullAsZero: boolean;
  v, vt, c: extended;

begin
  tab:= Trees.table;
  attributeName:= 'DBH_mm';
  nullAsZero:= false;                  

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

  vt:= VarianceOfTotal(v, 4);

  c:= ConfidenceIntervalOfTotal(Trees.RecordCount, vt, 5);

  ShowMessage(FloatToStr(c));
end.


See also:

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


Example