# Tutorial 2 - Kruskal-Wallis Test Analysis - Teradata Warehouse Miner

## Teradata Warehouse Miner User Guide - Volume 3Analytic Functions

Product
Release Number
5.4.5
Published
February 2018
Language
English (United States)
Last Update
2018-05-04
dita:mapPath
yuy1504291362546.ditamap
dita:ditavalPath
ft:empty
dita:id
B035-2302
Product Category
Software

In this example, a Kruskal-Wallis test analysis is performed on the fictitious banking data to analyze account usage.

1. Parameterize a Kruskal-Wallis Test analysis as follows:
• Available Tables — twm_customer
• Column of Interest — income
• Columns — marital_status (4 distinct values -> Kruskal-Wallis test)
• Group By Columns — years_with_bank
• Analysis Parameters
• Threshold Probability — 0.01
• Single Tail — false (default)
2. Run the analysis.
3. Click Results when it completes.
For this example, the Kruskal-Wallis Test analysis generated the following table. The test was computed for each distinct value of the group by variable “years_with_bank”. Results were sorted by years_with_bank. The tests shows customer incomes by marital_status were from the same population for years_with_bank 4, 6, 8 and 9. Those with years_with_bank 0-3, 5 and 7 were from different populations for each marital status. An ‘n’ or ‘p’ means significant and an ‘a’ means accept the null hypothesis.
The SQL is available for viewing but not listed below.
Kruskal-Wallis Test
years_with_bank Z ChiSq DF KruskalWallisPValue KruskalWallisPText KruskalWallisCallP_0.01
0 3.5507 20.3276 3 0.0002   p
1 4.0049 24.5773 3 0.0001 <0.0001 p
2 3.3103 18.2916 3 0.0004   p
3 3.0994 16.6210 3 0.0009   p
4 1.5879 7.5146 3 0.0596   a
5 4.3667 28.3576 3 0.0001 <0.0001 p
6 2.1239 10.2056 3 0.0186   a
7 3.2482 17.7883 3 0.0005   p
8 0.1146 2.6303 3 0.25 >0.25 a
9 -0.1692 2.0436 3 0.25 >0.25 a