You are here: Symbol Reference > Dew Namespace > Dew.Stats Namespace > Classes > TMtxHypothesisTest Class
Dew Stats for .NET
ContentsIndexHome
PreviousUpNext
TMtxHypothesisTest Class

Encapsulates parametric and non-parametric hypothesis testing routines.

Dew_Stats_TMtxHypothesisTest
Syntax
C#
Visual Basic
public class TMtxHypothesisTest : TMtxComponent;

StatTools.cs

Encapsulates parametric and non-parametric hypothesis testing routines. Many problems in engineering require that we decide whether to accept or reject a statement about some parameter. The statement is called a hypothesis and the decision-making procedure about the hypothesis is called hypothesis testing. 

The following hypothesis tests are supported:

  • one or two sample Sign test,
  • one or two sample Wilcoxon Signed-Rank test,
  • one or two sample (on pooled or paired data) T test,
  • one sample Z test,
  • one sample ChiSquared test,
  • two sample F test.

 

How to use TMtxHypothesisTest component?

  • Drop a TMtxHypothesisTest component on the form.
  • Define the hypothesis test you want to perform (Sign, Wilcoxon, Z, T, ChiSquared, F).
  • Define hypothesis type (the null hypothesis type) : two, left or right tailed.
  • Depending on hypothesis method define one or two sample datasets. You can do this by clicking on DataVec1 (and DataVec2) properties.
  • Depending on hypothesis method you'll also have to define test mean (and in Z, F Test case sigma) property.
  • Define the desired significance level Alpha.
  • Call the Recalc method to calculate hypothesis test results.

 

Results:

  • Result : The hypothesis result (accept, reject null hypothesis).
  • Significance : actual significance level.
  • ConfLower,ConfUpper : 100*(1-Alpha) confidence interval limits for mean (median, standard deviation).

How to setup and run two sample t-test.

using Dew.Stats.Units; using Dew.Stats; using Dew.Math; namespace Dew.Examples { private void Example(TMtxHypothesis hyp) { hyp.Alpha = 0.03; // desired significance level at 3% hyp.HypothesisType = THypothesisType.htTwoTailed; // two tailed => Ha= means are not equal hyp.DataVec1.SetIt(false, new double[] { 1.0, 2.0, 3.0, 4.0 }); // first dataset hyp.DataVec2.SetIt(false, new double[] { 1.5, 3.1, 4.2, 4.3 }); // second dataset hyp.HypothesisMethod = THypothesisMethod.hmTTest2Pooled; // comparing means of two datasets hyp.Recalc(); //Results ==> Significance = 0.43036618314 , Result = hrNotReject } }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!