Tests whether the row and column categorical variables of a contingency table are independent.
Contingency table of counts or frequencies.
Probability that this node incorrectly rejects a true null hypothesis.
Default: 0.05
Error conditions that occur before this node runs.
The node responds to this input according to standard error behavior.
Standard Error Behavior
Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.
Default: No error
A Boolean that indicates whether this node rejects the null hypothesis.
True | p value is less than or equal to significance level. This node rejects the null hypothesis and accepts the alternative hypothesis. |
False | p value is greater than significance level. This node accepts the null hypothesis and rejects the alternative hypothesis. |
Smallest significance level that leads to rejection of the null hypothesis based on the sample sets.
Sample statistics of the contingency table test.
Degree of freedom of the chi-squared distribution that the test statistic follows.
Sample test statistic used in the contingency table test.
Chi-squared value that corresponds to significance level.
Algorithm for Calculating chi-squared critical value
chi-squared critical value satisfies the following equation:
Prob{Xn > chi-squared critical value} = significance level
where Xn represents a chi-squared distributed variate with n degrees of freedom.
Error information.
The node produces this output according to standard error behavior.
Standard Error Behavior
Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.
This node uses the Pearson's chi-squared test of homogeneity and test of independence to test your hypothesis.
For the chi-squared test of homogeneity, you take a random sample of a fixed size from each category in one categorization scheme. For each sample, categorize the objects of experimentation according to the second scheme and tally them. This node tests the hypothesis to determine whether the populations from which each sample is taken are identically distributed with respect to the second categorization scheme.
For the chi-squared test of independence, you take only one sample from the total population, categorize each object, and tally each object in two categorization schemes. This node tests the hypothesis that the categorization schemes are independent.
For both tests, this node tests the hypothesis with the same algorithm. Let y(p, q) be the number of occurrences in the (pq)th cell of the contingency table for p = 0, 1, ..., (s - 1) and q = 0, 1, ..., (k - 1).
And let
where
This node uses sample chi-squared value to calculate p value according to the following equation:
p value = Prob{X ≥ x}
where X is a random variable from the chi-squared distribution. If the hypothesis is true, x came from a chi-squared distribution with (s - 1) and (k - 1) degrees of freedom.
Where This Node Can Run:
Desktop OS: Windows
FPGA: Not supported
Web Server: Not supported in VIs that run in a web application