Click or drag to resize

PearsonsChiSquareTest Class

Class PearsonsChiSquareTest tests whether the frequency distribution of experimental outcomes are consistant with a particular theoretical distribution.
Inheritance Hierarchy
SystemObject
  CenterSpace.NMath.CorePearsonsChiSquareTest

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
[SerializableAttribute]
public class PearsonsChiSquareTest : ICloneable

The PearsonsChiSquareTest type exposes the following members.

Constructors
 NameDescription
Public methodPearsonsChiSquareTest Default constructor. Constructs a PearsonsChiSquareTest instance with the default degrees of freedom and default alpha.
Public methodPearsonsChiSquareTest(Double) Constructs a PearsonsChiSquareTest from the given value of the test statistic.
Public methodPearsonsChiSquareTest(Int32) Test of independence. Asseses whether paired observations on two variables provided in the form of a contingency table are independent. Use the default alpha to determine accept/reject.
Public methodPearsonsChiSquareTest(Double, Double) Constructs a PearsonsChiSquareTest from the given value of the test statistic.
Public methodPearsonsChiSquareTest(Int32, DoubleVector) Constructs a PearsonsChiSquareTest using empirical data tracking the outcomes of a series of experiment runs along with the expected frequencies of outcomes for any one particular experiment run.
Public methodPearsonsChiSquareTest(Int32, Boolean) Test of independence. Asseses whether paired observations on two variables provided in the form of a contingency table are independent. Use the default alpha to determine accept/reject.
Public methodPearsonsChiSquareTest(Int32, Double) Test of independence. Asseses whether paired observations on two variables provided in the form of a contingency table are independent.
Public methodPearsonsChiSquareTest(Double, Double, Double) Constructs a PearsonsChiSquareTest from the given value of the test statistic.
Public methodPearsonsChiSquareTest(Int32, DoubleVector, Double) Constructs a PearsonsChiSquareTest using empirical data tracking the outcomes of a series of experiment runs along with the expected frequencies of outcomes for any one particular experiment run.
Public methodPearsonsChiSquareTest(Int32, Double, Boolean) Test of independence. Asseses whether paired observations on two variables provided in the form of a contingency table are independent.
Top
Properties
 NameDescription
Public propertyAlpha Gets and sets the alpha level associated with this hypothesis test.
Public propertyChiSquareStatistic Gets the chi-square statistic, or the sum of all chi-square values across all expr outcomes.
Public propertyStatic memberDefaultAlpha Gets and sets the default alpha level associated with the PearsonChiSquareTest. Used to determine whether or not to reject the null hypothesis.
Public propertyStatic memberDefaultDF The default degrees of freedom. If degrees of freedom are not supplied, then assume that each experiment has 1 degree of freedom, or only two possible outcomes.
Public propertyStatic memberDefaultIsYatesCorrected Default behavior for computing the Chi-square statistic is to not use Yates correction for 2 × 2 contingency tables.
Public propertyDegreesOfFreedom Gets the degrees of freedom.
Public propertyDistribution Gets the chi-square distribution for this set of experiment runs based on the degrees of freedom in the experiment.
Public propertyIsYatesCorrected Returns true is the calcuation of the chi-square statistic for 2 × 2 contingency tables uses Yates correction; otherwise, false.
Public propertyN Gets the sample size.
Public propertyP Gets the p-value associated with the test statistic.
Public propertyReject Returns true if the null hypothesis can be rejected, using the current hypothesis type and alpha level; otherwise, false.
Top
Methods
 NameDescription
Public methodcalculateExprRuns Count how many times the experiment has been run by summing all experiment outcomes 8
Public methodClone Creates a deep copy of this OneSampleTTest.
Public methodToString Returns a formatted string representation of the test results.
(Overrides ObjectToString)
Public methodUpdate(Double) Update the test with an externally derived chi-square statistic.
Public methodUpdate(Int32) Update contigency table for the test of independence between two variables.
Public methodUpdate(Double, Double) Update the test with an externally derived chi-square statistic and the degrees of freedom
Public methodUpdate(Int32, DoubleVector) Perform a chi-square test using empirical data tracking the outcomes of a series of experiment runs along with the expected frequencies of outcomes for any one particular experiment run.
Public methodUpdate(Int32, Boolean) Update contigency table for the test of independence between two variables.
Public methodUpdate(Int32, Double) Update contigency table for the test of independence between two variables.
Public methodUpdate(Double, Double, Double) Update the test with an externally derived chi-square statistic, the degrees of freedom and the alpha value
Public methodUpdate(Int32, DoubleVector, Double) Perform a chi-square test using empirical data tracking the outcomes of a series of experiment runs along with the expected frequencies of outcomes for any one particular experiment run.
Public methodUpdate(Int32, Double, Boolean) Update contigency table for the test of independence between two variables.
Top
Remarks
Pearson's chi-square test is the most well-known of chi-square tests which are statistical procedures whose results are evaluated by reference to the chi-square distribution. It tests a null hypothesis stating that the frequency distribution of experimental outcomes are consistant with a particular theoretical distribution. The events outcomes considered must be mutually exclusive and have a total probability of 1.
See Also