Creating a contingency table in XLSTAT

Dataset to create a contingency table

A MS Excel spreadsheet with both the data and the results can be downloaded by clicking here. In this tutorial we show how to generate a contingency table.

The dataset contains information on 20 clients: their age, city of residence and gender. We will create a contingency table on the Age and City variables.

Creating a contingency table

After opening XLSTAT, select the XLSTAT / Preparing data / Create a contingency table command, or click on the corresponding button of the "Preparing data" toolbar (see below).

statistical softwarestatistical software

Once you've clicked on the relevant button, the dialog box appears. Select the category variable you wish to use in rows. Select the variable Age by selecting the entire column. Then select the variable to be used in Colum, select the variable City.

The output should be displayed in a new sheet so tick the option Sheet.

The columns B and C contain variable labels so the option Variable labels should be ticked.

data analysis software

now you should proceed to the next tab Options. Here you can decide how the categories of the variable should be treated. Also you can do a Chi-square test. In this case, however, we will only select the optionSort the categories alphabetically.

data analysis software

In the tab Outputs, select the Contingency table as well as the observed and theoritical frequencies.

data analysis software

Select the 3D view of the contingency table in the tab Charts.

data analysis software

The computations begin once you have clicked on the OK button, and the results are displayed on a new sheet.

Results of the creation of a contingency table

The first result is the contingency table.

Notice that there isn't a client in all crossed categories. For example thre is no client in Paris aged 25-34.

data analysis software

The next result is the 3-D plot, which is a good visualization of the data distribution.

data analysis software

Next are the two tables containing the frequencies Age/City.

You can compare the actual distribution of the clients and the theoritical distribution if the distribution was random.

data analysis software

Click here for other tutorials.

About KCS

Kovach Computing Services (KCS) was founded in 1993 by Dr. Warren Kovach. The company specializes in the development and marketing of inexpensive and easy-to-use statistical software for scientists, as well as in data analysis consulting.

Mailing list Join our mailing list

Home | Order | MVSP | Oriana | XLStat
QDA Miner | Accent Composer | Stats Books
Stats Links | Anglesey

Share: FacebookFacebook TwitterTwitter RedditReddit
Del.icio.usDel.icio.us Stumble UponStumble Upon

 

Like us on Facebook

Get in Touch

  • Email:
    sales@kovcomp.com
  • Address:
    85 Nant y Felin
    Pentraeth, Isle of Anglesey
    LL75 8UY
    United Kingdom
  • Phone:
    (UK): 01248-450414
    (Intl.): +44-1248-450414