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

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.