TD_ChiSq Function | chisq | Teradata Vantage - TD_ChiSq - Analytics Database

Database Analytic Functions

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-04-06
dita:mapPath
gjn1627595495337.ditamap
dita:ditavalPath
ayr1485454803741.ditaval
dita:id
jmh1512506877710
Product Category
Teradata Vantage™

Analytics Database provides built-in support for performing chi-square tests, which you can use to analyze relationships between categorical variables.

TD_ChiSq performs Pearson's chi-squared (χ2) test for independence, which determines if there is a statistically significant difference between the expected and observed frequencies in one or more categories of a contingency table (also called a cross tabulation). This function takes two or more columns as input and returns a result set that contains the chi-square statistic, the degrees of freedom, and the p-value for the test.

The supported test types follow:
  • One-tailed, upper-tailed
  • One-sample
  • Unpaired

Why Use Chi-Square Test?

The chi-square test is a statistical method used in analytics to determine whether there is a significant relationship between two categorical variables.

In analytics, you can work with data that is organized into categories or groups, such as the gender of individuals, educational qualifications, or income levels. The chi-square test allows you to determine whether there is a significant relationship between two such categorical variables.
  • For example, imagine you want to determine whether there is a relationship between the level of education and the employment status of a group of individuals. You can use the chi-square test to analyze the data and determine whether there is a significant association between the two variables.
  • The chi-square test compares the observed frequencies of each category with the expected frequencies. If there is a significant difference between the observed and expected frequencies, you can conclude that there is a relationship between the two variables.

Overall, the chi-square test is a tool for analyzing categorical data and identifying relationships between variables. Used in fields like marketing, social sciences, healthcare, and finance, and so on.