Using One Sample - 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ā„¢

TD_ZTest Input: boston2cols

The following example assumes the boston2cols input table exists:

groupName     groupValue
---------     ----------
RM            -0.2276075065
RM            -0.4401326616
RM            -1.1572243415
RM             2.4224510607
RM             0.1294925842
...            ...
NOX           -0.1467014464
NOX           -0.1467014464
NOX            1.1684487614
NOX            0.421782837
NOX            1.1684487614
...            ...

TD_ZTest SQL Call

SELECT * FROM TD_ZTest(
  ON boston2cols AS InputTable
  USING
    SampleNameColumn('groupName')
    SampleValueColumn('groupValue')
    FirstSampleName('NOX')
) AS dt;

TD_ZTest Output

firstsamplecolumn N1  mean1         AlternativeHypothesis z_score        Alpha CriticalValue p_value      Conclusion
----------------- ------------------ --  --  -----         -----        --------------------- -------        ----- ------------- ------- ----------
NOX               360 -0.0027042831 TWO-TAILED            -0.0515652345  0.05  1.9599639845  0.9588751214 Fail to reject Null hypothesis