Documentation/Calc Functions/CHISQ.TEST

Function name:
CHISQ.TEST

Category:
Statistical Analysis

Summary:
Returns the probability of a deviance from a random distribution of two test series based on the chi-square test for independence. CHISQ.TEST returns the chi-square distribution of the data.

Syntax:
CHISQ.TEST(DataB; DataE)

Returns:
Returns a real number which is the chi-square distribution of the data. It is a probability and hence it ranges from 0 to 1, i.e. [0,1].

Arguments:
DataB is a range of references to the cells containing the array of the observations.

DataE is a range of references to the cells containing the range of the expected values.


 * If DataB and DataE have different number of data points then the function returns an error value.
 * If any of the cell whose reference is passed contains a non-numeric value then the function returns an error value.

Additional details:
The probability determined by CHISQ.TEST can also be determined with CHISQ.DIST, in which case the chi-square of the random sample must be passed as a parameter instead of the data row.


 * The χ2 test first calculates a χ2 statistic using the formula:

where:

Aij = element of actual data which is DataB in our case

Eij = element of expected values which is DataE in our case

r = number or rows

c = number of columns

Then CHIDIST is called with chi-square value and a degree of freedom (df). If r>1 and c>1: df = (r-1)(c-1) else df = r*c-1 and CHISQ.TEST = CHISQ.DIST(χ2;df;TRUE).


 * For more details on CHISQ.TEST, visit Wikipedia

Related LibreOffice functions:
[[Special:MyLanguage/Documentation/Calc_Functions/CHIDIST CHIDIST]

[[Special:MyLanguage/Documentation/Calc_Functions/CHIINV CHIINV]

[[Special:MyLanguage/Documentation/Calc_Functions/CHISQ.DIST CHISQ.DIST]

[[Special:MyLanguage/Documentation/Calc_Functions/CHISQ.DIST.RT CHISQ.DIST.RT]

[[Special:MyLanguage/Documentation/Calc_Functions/CHISQ.INV CHISQ.INV]

[[Special:MyLanguage/Documentation/Calc_Functions/CHISQ.INV.RT CHISQ.INV.RT]

[[Special:MyLanguage/Documentation/Calc_Functions/CHISQDIST CHISQDIST]

[[Special:MyLanguage/Documentation/Calc_Functions/CHISQINV CHISQINV]

[[Special:MyLanguage/Documentation/Calc_Functions/CHITEST CHITEST]

ODF standard:
None

Equivalent Excel functions:
CHISQ.TEST