================ Chi-Squared Test ================ :doc:`/WorkProcessClassifiers/GlobalAlgorithm/index` - :doc:`/WorkProcessClassifiers/MultiDimensionalAlgorithm/index` *Chi-Squared Test* algorithm is used to analyze a correlation relationship between two attributes. The :math:`\chi^2`\ -value for attributes :math:`A` and :math:`B` is computed as: .. math:: \chi^2 = \sum_{i=1}^{N} \sum_{j=1}^{M} \frac{(o_{ij} - e_{ij})^2}{e_{ij}} \, \text{,} where :math:`o_{ij}` is the observed frequency of the joint event of pair :math:`(A_i, B_j)` and :math:`e_{ij}` is the corresponding expected frequency. .. rubric:: Input Parameters +--------------------------------+--------------------------------------------------------------------+----------------------------------------+-------------+---------+ | Parameter | Type | Constraint | Description | Remarks | +================================+====================================================================+========================================+=============+=========+ | :math:`A` | :math:`A = \{a_i\}, i = 1, 2, \ldots, N` | :math:`N \in \mathbb{N}` | | | +--------------------------------+--------------------------------------------------------------------+----------------------------------------+-------------+---------+ | :math:`B` | :math:`B = \{b_i\}, i = 1, 2, \ldots, M` | :math:`M \in \mathbb{N}` | | | +--------------------------------+--------------------------------------------------------------------+----------------------------------------+-------------+---------+ | :math:`(e_{ij})` | :math:`(e_{ij}) \in \mathbb N^{N \times M}` | | | | +--------------------------------+--------------------------------------------------------------------+----------------------------------------+-------------+---------+ .. rubric:: Output Parameters +----------------------------+------------------------------------------------+------------+-------------+---------+ | Parameter | Type | Constraint | Description | Remarks | +============================+================================================+============+=============+=========+ | :math:`\chi^2` | :math:`\chi^2 \in \mathbb R` | | | | +----------------------------+------------------------------------------------+------------+-------------+---------+ .. rubric:: Tool Support * :doc:`/Tools/MatlabTool/index` For details refer to the online documentation of the function `'chi2gof' `__. .. rubric:: Single Steps using the Algorithm * :doc:`/DataPreprocessing/DataDiscretization/DataDiscretizationWithChiSquaredTest/index` * :doc:`/DataPreprocessing/DataCleaning/OutlierDetection/OutlierDetectionWithChiSquaredTest/index` * :doc:`/DataPreprocessing/DataIntegration/RedundancyDetection/RedundancyDetectionWithChiSquaredTest/index` .. rubric:: References - P.E.\ Greenwood, M.S. Nikulin, A guide to chi-squared testing, Wiley, New York, 1996.