Examples | Chi-Squared Tests | Vantage Analytics Library - Examples - Vantage Analytics Library

Vantage Analytics Library User Guide

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Lake
Product
Vantage Analytics Library
Release Number
2.2.0
Published
June 2025
ft:locale
en-US
ft:lastEdition
2025-07-02
dita:mapPath
ibw1595473364329.ditamap
dita:ditavalPath
iup1603985291876.ditaval
dita:id
zyl1473786378775
Product Category
Teradata Vantage

The Statistical Test metadata tables must be loaded into the database where Analytics Library is installed.

Chi-Squared Test that Returns Result Set

call td_analyze (
  'chisquaretest',
  'statsdatabase = val_user;
   teststyle = chisq;
   database = val_source;
   tablename = customer_analysis;
   firstcolumns = female, single;
   secondcolumns = svacct, ccacct, ckacct;'
);

Chi-Squared Test with Output Table

call td_analyze (
  'chisquaretest',
  'statsdatabase = val_user;
   teststyle = chisq;
   database = val_source;
   tablename = customer_analysis;
   firstcolumns = female, single;
   secondcolumns = svacct, ccacct, ckacct;
   outputdatabase = val_results;
   outputtablename = chisquare_out;'
);

Median Test that Returns Result Set with groupby Parameter

call td_analyze (
  'chisquaretest',
  'statsdatabase = val_user;
   teststyle = median;
   database = val_source;
   tablename = customer;
   columnofinterest = income;
   columns = marital_status;
   groupby = years_with_bank;
   thresholdprobability = 0.01;'
);