How to create Contingency Tables in Alteryx

2021.05.24

この記事は公開されてから1年以上経過しています。情報が古い可能性がありますので、ご注意ください。

(日本語はこちらから)

Introduction:

In statistics, a contingency table is used to classify various outcomes from an event. Based on those outcomes, it's easier to calculate different types of probabilities.

For example let us consider a distribution of 53 people as male or female, single or married. The contingency table to represent this information is as shown below.

How to achieve:

Often the data stored in a database is in a format as shown below.

Using Alteryx, a contingency table can be created from the dataset. Bring a summarize tool on the canvas and connect it with the dataset as shown below. Summarize on the fields which are needed, in this case group by for Gender and Status followed by count for Name field.

Next, append a CrossTab tool, group the data by Gender and change column header to Status and select the values from the drop down menu as Count, the aggregation method used here is summation.

In this way, contingency tables can be created on an ad-hoc basis as per the requirements.

Summary

Thus using Alteryx, it’s very easy to create contingency tables which can be used in statistical data analysis.

Alteryxの導入なら、クラスメソッドにおまかせください

日本初のAlteryxビジネスパートナーであるクラスメソッドが、Alteryxの導入から活用方法までサポートします。14日間の無料トライアルも実施中ですので、お気軽にご相談ください。

alteryx_960x400