Subscribe Bookmark RSS Feed

Creating a 2X2 table from continuous data


Community Member


Aug 8, 2013

Dear community,

I have a 2 columns of continuous data. I would like to make a 2X2 table out that continuous data. I am trying to use this for sensitivity and specificity. I have a gold standar test and a new test. I want to set cutoff and get a table like this


| AB | Ab |


| aB | ab |


ie AB would the the number of values that are above both cutoffs. ab is is number of values below both cutoffs. Ab and aB is where capitalized values are above cutoff and lower case value is below the cutoff level. ANy help would be appreciated.



Community Manager


Jun 23, 2011

Hi there,

You'll need to create two new columns as indicators of whether Column A is above or below the threshold and Column B is above or below the threshold.

Let's use the Big Class data from the Sample Data library as an example (Help->Sample Data and then in the Examples for Teaching section).

If we are interested in the 2x2 table for the number of students above and below a height of 62 and a weight of 120, we first need to create indicator columns for those conditions in each row.

For the height indicator you add a new column with a formula like this:


This will give you a column of capital Hs where height is above 62 and lowercase h where it's below.

Create a similar column for weight.

Then use these two columns in Fit Y by X to get a report like this.


The Contingency Table is the table you're looking for. The Mosaic Plot is the graphical representation of it.

Let us know if this isn't what you're looking for, or if you need more assistance.