NMath Reference Guide

## Pearsons |

Class PearsonsChiSquareTest tests whether the frequency distribution of experimental outcomes are
consistant with a particular theoretical distribution.

Inheritance Hierarchy

Syntax

The PearsonsChiSquareTest type exposes the following members.

Constructors

Name | Description | |
---|---|---|

PearsonsChiSquareTest | Default constructor. Constructs a PearsonsChiSquareTest instance with the default degrees of freedom and default alpha. | |

PearsonsChiSquareTest(Double) | Constructs a PearsonsChiSquareTest from the given value of the test statistic. | |

PearsonsChiSquareTest(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. | |

PearsonsChiSquareTest(Double, Double) | Constructs a PearsonsChiSquareTest from the given value of the test statistic. | |

PearsonsChiSquareTest(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. | |

PearsonsChiSquareTest(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. | |

PearsonsChiSquareTest(Int32, Double) | Test of independence. Asseses whether paired observations on two variables provided in the form of a contingency table are independent. | |

PearsonsChiSquareTest(Double, Double, Double) | Constructs a PearsonsChiSquareTest from the given value of the test statistic. | |

PearsonsChiSquareTest(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. | |

PearsonsChiSquareTest(Int32, Double, Boolean) | Test of independence. Asseses whether paired observations on two variables provided in the form of a contingency table are independent. |

Properties

Name | Description | |
---|---|---|

Alpha | Gets and sets the alpha level associated with this hypothesis test. | |

ChiSquareStatistic | Gets the chi-square statistic, or the sum of all chi-square values across all expr outcomes. | |

DefaultAlpha | Gets and sets the default alpha level associated with the PearsonChiSquareTest. Used to determine whether or not to reject the null hypothesis. | |

DefaultDF | 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. | |

DefaultIsYatesCorrected | Default behavior for computing the Chi-square statistic is to not use Yates correction for 2 × 2 contingency tables. | |

DegreesOfFreedom | Gets the degrees of freedom. | |

Distribution | Gets the chi-square distribution for this set of experiment runs based on the degrees of freedom in the experiment. | |

IsYatesCorrected | Returns true is the calcuation of the chi-square statistic for 2 × 2 contingency tables uses Yates correction; otherwise, false. | |

N | Gets the sample size. | |

P | Gets the p-value associated with the test statistic. | |

Reject | Returns true if the null hypothesis can be rejected, using the current hypothesis type and alpha level; otherwise, false. |

Methods

Name | Description | |
---|---|---|

calculateExprRuns | Count how many times the experiment has been run by summing all experiment outcomes 8 | |

Clone | Creates a deep copy of this OneSampleTTest. | |

ToString |
Returns a formatted string representation of the test results.
(Overrides ObjectToString) | |

Update(Double) | Update the test with an externally derived chi-square statistic. | |

Update(Int32) | Update contigency table for the test of independence between two variables. | |

Update(Double, Double) | Update the test with an externally derived chi-square statistic and the degrees of freedom | |

Update(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. | |

Update(Int32, Boolean) | Update contigency table for the test of independence between two variables. | |

Update(Int32, Double) | Update contigency table for the test of independence between two variables. | |

Update(Double, Double, Double) | Update the test with an externally derived chi-square statistic, the degrees of freedom and the alpha value | |

Update(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. | |

Update(Int32, Double, Boolean) | Update contigency table for the test of independence between two variables. |

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