IStatistics.ZTest

Syntax

ZTest(Data: Array; Value: Double; Sigma: Double): Double;

Parameters

Data. Array of data to which the Value is compared.

Value. Checked value;

Sigma. Known standard deviation of the general population.

Description

The ZTest method returns the bilateral P-value of the z-test.

Comments

A z-test is used to calculate a standard estimate for Value based on a data array and to return two-sided probability for normal distribution. This function can be used to estimate probability than a specific observation is taken from a specific general population.

Example

Sub Main;

Var

st: Statistics;

d0: Double;

y: Array Of Double;

Begin

y := New Double[10];

y[00] := 6;

y[01] := 17;

y[02] := 9;

y[03] := 15;

y[04] := 21;

y[05] := 24;

y[06] := 20;

y[07] := 21;

y[08] := 14;

y[09] := 25;

st := New Statistics.Create;

d0 := st.ZTest(y,15,4);

Debug.WriteLine("Z-test: " + d0.ToString);

End Sub Main;

Executing this example shows the P-value of the z-test in the console window:

Module execution started

Z-test: 0.040995160500191474

Module execution finished

See also:

IStatistics | IStatistics.NormsDist