TD_ChiSq Function | chisq | Teradata Vantage - TD_ChiSq - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

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.