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 (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.WebControl<CRLF>...<CRLF><CRLF> |
C# |
Copy Code |
using Dundas.Charting.WebControl;<CRLF>...<CRLF><CRLF>// Perform the Z test<CRLF>ZTestResult result = Chart1.DataManipulator.Statistics.ZTest(0.2,2.5,4.5,0.05,"Series1","Series2"); |
Remarks
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