Dundas Chart for Windows Forms
ZTest Method
See Also  Example Send comments on this topic.
DundasWinChart Assembly > Dundas.Charting.WinControl Namespace > Statistics Class : ZTest Method


hypothesizedMeanDifference
The hypothesized difference between the means of the data groups.
Hypothesized Mean Difference
varianceFirstGroup
The variance within the first group of data.
Variance First Group
varianceSecondGroup
The variance within the second group of data.
Variance Second Group
probability
The alpha value (probability that the hypothesis is rejected).
Probability
firstInputSeriesName
The name of the series that stores the first group of data. Data must be stored in the first Y-values of the series' data points.
First Input Series Name
secondInputSeriesName
The name of the series that stores the second group of data. Data must be stored in the first Y-values of the series' data points.
Second Input Series Name

Enterprise Edition Only Feature. This method performs a Z test for two series of data.


The z-test generates a standard score for x with respect to the data set, array, and returns the two-tailed probability for the normal distribution. You can use this function to assess the likelihood that a particular observation is drawn from a particular population.

Syntax

Visual Basic (Declaration)  
Public Function ZTest( _
   ByVal hypothesizedMeanDifference As Double, _
   ByVal varianceFirstGroup As Double, _
   ByVal varianceSecondGroup As Double, _
   ByVal probability As Double, _
   ByVal firstInputSeriesName As String, _
   ByVal secondInputSeriesName As String _
) As ZTestResult
Visual Basic (Usage) Copy Code
Dim instance As Statistics
Dim hypothesizedMeanDifference As Double
Dim varianceFirstGroup As Double
Dim varianceSecondGroup As Double
Dim probability As Double
Dim firstInputSeriesName As String
Dim secondInputSeriesName As String
Dim value As ZTestResult
 
value = instance.ZTest(hypothesizedMeanDifference, varianceFirstGroup, varianceSecondGroup, probability, firstInputSeriesName, secondInputSeriesName)

Parameters

hypothesizedMeanDifference
The hypothesized difference between the means of the data groups.
Hypothesized Mean Difference
varianceFirstGroup
The variance within the first group of data.
Variance First Group
varianceSecondGroup
The variance within the second group of data.
Variance Second Group
probability
The alpha value (probability that the hypothesis is rejected).
Probability
firstInputSeriesName
The name of the series that stores the first group of data. Data must be stored in the first Y-values of the series' data points.
First Input Series Name
secondInputSeriesName
The name of the series that stores the second group of data. Data must be stored in the first Y-values of the series' data points.
Second Input Series Name

Return Value

Returns Result class from T Test

Example

The following sample performs a Z Test, using Series1 and Series2 for the input series.
Visual Basic Copy Code
Imports Dundas.Charting.WinControl
...

' Perform the Z test
Dim result As ZTestResult = Chart1.DataManipulator.Statistics.ZTest(0.2,2.5,4.5,0.05,"Series1","Series2")
C# Copy Code
using Dundas.Charting.WinControl;
...

// Perform the Z test
ZTestResult result = Chart1.DataManipulator.Statistics.ZTest(0.2,2.5,4.5,0.05,"Series1","Series2");

Remarks

This method performs a Z test for two groups of data, and returns the results using a ZTestResult object.

Two and only two groups of data must be specified. If either input series does not exist in the series collection at the time of the method call than an exception will be thrown.

The following is a brief description of the ZTestResult class members:

Member Description
FirstSeriesMean  The mean of the first data group.
SecondSeriesMean  The mean of the second data group.
FirstSeriesVariance  The variance of the first data group.
SecondSeriesVariance  The variance of the second data group. 
ZValue  The Z value.
ProbabilityZOneTail  Probability Z value (one tail).
ZCriticalValueOneTail  Z critical value (one tail).
ProbabilityZTwoTail   Probability Z value (two tail).
ZCriticalValueTwoTail  Z critical value (two tail).

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2009 All Rights Reserved.