# Chi2-test 函數

通常用於量化變數的研究中。這項檢定可以比較在包含期望頻率的單向頻率表格中觀察到的頻率，或者研究偶然性表格中兩個變數間的連結。Chi-squared test functions are used to determine whether there is a statistically significant difference between the expected frequencies and the observed frequencies in one or more groups. Often a histogram is used, and the different bins are compared to an expected distribution.

使用每個函數中的下拉式功能表，以查看每個函數的簡要描述及語法。按一下語法描述中的函數名稱，以取得進一步詳細資料。

如果該函數在資料載入指令碼中使用，則值會在由 group by 子句所定義的若干記錄上反覆運算。

如果函數在圖表運算式中使用，則值會在圖表維度上反覆運算。

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/StatisticalTestFunctions/chi2-tests/chi2_tests.htm)

#### Chi2Test\_chi2

Chi2Test\_chi2() 會針對一或兩組值，傳回彙總 chi2 檢定值。

[**chi2test_chi2**](https://help.qlik.com/zh-TW/sense/May2026/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/StatisticalTestFunctions/chi2-tests/chi2test_chi2.htm)(col, row, actual\_value[, expected\_value])

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/StatisticalTestFunctions/chi2-tests/chi2_tests.htm)

#### Chi2Test\_df

Chi2Test\_df() 會針對一或兩組值，傳回彙總 chi2 檢定 df 值 (自由度)。

[**chi2test_df**](https://help.qlik.com/zh-TW/sense/May2026/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/StatisticalTestFunctions/chi2-tests/chi2test_df.htm)(col, row, actual\_value[, expected\_value])

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/StatisticalTestFunctions/chi2-tests/chi2_tests.htm)

#### Chi2Test\_p

Chi2Test\_p() 會針對一或兩組值，傳回彙總 chi2 檢定 p 值 (顯著)。

[**chi2test_p**](https://help.qlik.com/zh-TW/sense/May2026/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/StatisticalTestFunctions/chi2-tests/chi2test_p.htm)(col, row, actual\_value[, expected\_value])

## 瞭解更多資訊

* [T 檢定函數](https://help.qlik.com/zh-TW/sense/May2026/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/StatisticalTestFunctions/ttest/t_tests.htm)
* [Z 檢定函數](https://help.qlik.com/zh-TW/sense/May2026/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/StatisticalTestFunctions/ztest/z_tests.htm)