Server User Guides > Survey Tabulation > Working with variables > Adding summary statistics to a numeric variable
 
Adding summary statistics to a numeric variable
Sometimes you might want to show a summary statistic of the values in a numeric variable rather than grouping the values into bands. For example, you might want to show the base, minimum, maximum, and mean values, or the standard deviation. For example, the visits variable in the Museum sample data set is a numeric variable that stores the number of times respondents have visited the museum before. You can show a summary of the values in the variable, as shown in the following table:
Table showing visits by gender, with summary statistics mean, min, max and standard deviation
This graphic is described in the surrounding text.
In practice you might want to mix both approaches: for example, show bands and the mean value. You would typically create your bands first, as shown in Banding a numeric variable, then switch to the Edit tab and insert the statistics as described below. If you want to be able to use different approaches in different tables (for example, show bands in some tables and a summary in others) you would typically create a copy of the variable and set up the bands in one variable and the summary in the other. See Copying a variable for more information.
These instructions describe how to create the summary statistics so that they appear in all tables. If you want the statistics to appear in a specific table, use Edit Axis dialog.
To add summary statistics to a numeric variable
1 Select the Define tab.
2 In the Variable List, select the numeric variable, and then click Variables > Edit.
The Edit Variable dialog opens: see Edit Variable dialog.
3 From the menu at the top of the Edit tab, choose Insert.
The Insert Item dialog opens: see Insert Item dialog.
4 Select the summary statistics you want to use. For example, select Minimum, Maximum, Mean, and Standard Deviation.
5 Click Add.
6 Use the Move Up and Move Down buttons to move the statistics into the required order.
7 Click OK.
This inserts the statistics into the list on the Edit tab.
8 Select the first statistic you inserted and from the menu at the top of the tab, choose Properties. The Element Properties dialog opens: see Element Properties dialog.
9 Select the numeric variable in the Calculate list.
10 Click OK.
Repeat these three steps for the other summary items you inserted.
11 Click OK.
The changes will be applied to any existing tables that include the variable next time you populate them, provided you have not used the Edit Axis dialog (see Edit Axis dialog) to specify how the variable is to appear in any of those tables.
See also
Working with variables