# CHISQ.TEST Function

> Run a chi-squared test for independence on observed and expected values with CHISQ.TEST in TX Sheet Control: equal-sized ranges, #N/A and #DIV/0! errors.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Function
- **Path:** TX Sheet Control > API Reference > Formula Functions > CHISQ.TEST Function
- **232 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/chisq-test/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/chisq-test/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/chisq-test/llms-full.txt

---

Return the result of a chi-squared test for independence: the probability that the differences between observed and expected values are due to chance. `actual_range` holds the observed values and `expected_range` the expected values, with the same number of rows and columns; ranges of different sizes return `#N/A`, and an expected value of 0 returns `#DIV/0!`.

### Syntax

```text
CHISQ.TEST(actual_range, expected_range)
```

Category: Statistics. Minimum arguments: 2. Maximum arguments: 2.

Available for supported offline calculation.

### Examples

```text
=CHISQ.TEST({10,20;20,10},{15,15;15,15})
```

The formula returns 0.0098232745: with less than 1%, the observed values are unlikely to match the expected ones by chance.

Cell and range examples require appropriate input values in the referenced cells. Handle invalid arguments, formula errors and array and spill constraints.

### See Also

- [Formulas](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/formulas/llms-full.txt)
- [Custom Functions and Formula Data](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/custom-functions/llms-full.txt)

---

## Nearby

- **Previous:** [CHISQ.INV.RT Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/chisq-inv-rt/llms-full.txt)
- **Next:** [CHITEST Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/chitest/llms-full.txt)
