class TMtxHypothesisTest : public TMtxComponent;
Encapsulates parametric and non-parametric hypothesis testing routines.
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 TMtxHypothesisTest::DataVec1 (and TMtxHypothesisTest::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 TMtxHypothesisTest::Alpha.
- Call the TMtxHypothesisTest::Recalc method to calculate hypothesis test results.
Results:
- TMtxHypothesisTest::Result : The hypothesis result (accept, reject null hypothesis).
- TMtxHypothesisTest::Significance : actual significance level.
- TMtxHypothesisTest::ConfLower,TMtxHypothesisTest::ConfUpper : 100*(1-Alpha) confidence interval limits for mean (median, standard deviation).
Constructors
| Name | Description |
|---|---|
| TMtxHypothesisTest (2) |
Destructors
| Name | Description |
|---|---|
| ~TMtxHypothesisTest |
Properties
| Name | Type | Description |
|---|---|---|
| Alpha | double | Desired significance level. |
| AutoUpdate | bool | If true then changing any of the TMtxHypothesisTest properties will trigger the TMtxHypothesisTest::Recalc method. |
| BlockAssign | bool | Block streaming of specific properties when storing only a "template". |
| ConfLower | double | Returns lower confidence interval limit. |
| ConfUpper | double | Returns upper confidence interval limit. |
| DataVec1 | TVec* | First sample values. |
| DataVec2 | TVec* | Second sample values. |
| Dirty | bool | When any of the TMtxHypothesisTest properties changes, this property is automatically set to true. |
| EditorActive | bool | Returns True, if the component editor is displayed. |
| HypothesisMethod | THypothesisMethod | Defines which hypothesis routine will be used for data testing. |
| HypothesisType | THypothesisType | Defines hypothesis type (left, right and two-tailed). |
| Mean | double | Defines mean/median value for one-sample test. |
| Name | DewString | |
| Reference | TReferenceList* | Stores a list of components that have to be notified, when this component is destroyed. |
| Result | THypothesisResult | Returns hypothesis result. |
| Sigma | double | Defines standard deviation value for single test. |
| Significance | double | Returns calculated significance level. |
| TestStatistics | double | Returns test statistics. |
Methods
| Name | Description |
|---|---|
| AllowStreaming | Returns the negatated value of BlockAssign. |
| Assign | Assign values of all published properties from Source. |
| AssignTemplate | Assign values of "template-like" published properties from Source. |
| EditorClass | |
| LoadFromStream | Load the component from Src stream. |
| LoadTemplateFromFile | Load a template from file. |
| LoadTemplateFromStream | Load a template from stream. |
| Recalc | Triggers hypothesis test recalculation. |
| ReferenceRemoved | |
| Reset | Reset is called after loading the data from stream or file. |
| SaveTemplateToFile | Save template to file. |
| SaveTemplateToStream | Save template to stream. |
| SaveToStream | Save the component to Dst stream. |
Fields
| Name | Type | Description |
|---|---|---|
| Tag | intptr_t |