Generating statistics

Concept Information

STATISTICS command

You can generate detailed statistics on numeric and datetime fields in a table. Statistics provide an overview of a table, and can highlight abnormalities in the data, which can guide your subsequent analysis.

When you generate statistics, in addition to the standard output options, Analytics automatically creates a number of system variables that contain the output results. For more information, see System variables created by Analytics commands.

The results of generating statistics are described in the table below.

Note

All the statistics are generated for numeric fields. Only a subset of the statistics are generated for datetime fields.

Several of the datetime statistics are displayed as serial datetime values. You can use a conversion function to convert a serial datetime value to a human-readable regular datetime value. For more information, see Serial datetimes.

Statistic name Numeric field Datetime field
Range The difference between the highest and lowest values The number of days between the most recent and oldest dates
Positive
  • The number of positive values

  • The total of all positive values

  • The average positive value

  • The number of datetime values

  • The total of all serial datetime values

    Not meaningful for dates, or time values that represent points in time. Meaningful for time values that represent amounts of time.

    For more information, see An amount of time versus a point in time.

  • The average datetime value

Negative
  • The number of negative values

  • The total of all negative values

  • The average negative value

Not applicable, not generated
Zeros The number of zero values The number of blank dates
Totals
  • The total number of positive, negative, and zero values

  • The total of all positive, negative, and zero values

  • The average of all positive, negative, and zero values

Not applicable, not generated
Abs Value The total of all values while disregarding the sign of the numbers Not applicable, not generated
Std Dev (optional) The standard deviation from the mean value

The standard deviation from the average datetime value

Not displayed when outputting statistics to screen, but captured in the STDDEVn system-generated output variable.

Median (optional) The median value
  • Odd-numbered sets of values: the middle value

  • Even-numbered sets of values: the average of the two values at the middle

The median date
  • Odd-numbered sets of dates: the middle date

  • Even-numbered sets of dates: the average of the two dates at the middle

Q25 (optional) The first quartile value (lower quartile value)
  • The result is an interpolated value based on an Analytics algorithm

  • Produces the same result as the QUARTILE and QUARTILE.INC functions in Microsoft Excel

The first quartile date (lower quartile date)
  • The result is an interpolated value based on an Analytics algorithm

  • Offset by 1 day from the result of the QUARTILE and QUARTILE.INC functions in Microsoft Excel

    For more information, see Serial datetimes.

Q75 (optional) The third quartile value (upper quartile value)
  • The result is an interpolated value based on an Analytics algorithm

  • Produces the same result as the QUARTILE and QUARTILE.INC functions in Microsoft Excel

The third quartile date (upper quartile date)
  • The result is an interpolated value based on an Analytics algorithm

  • Offset by 1 day from the result of the QUARTILE and QUARTILE.INC functions in Microsoft Excel

    For more information, see Serial datetimes.

Mode (optional) The most frequently occurring value
  • Displays “N/A” if no value occurs more than once

  • In the event of a tie, displays the lowest value

The most frequently occurring date
  • Displays “N/A” if no date occurs more than once

  • In the event of a tie, displays the oldest date

Highest

The five highest values

You can change the number of high values with the # of High/Low setting on the More tab in the Statistics dialog box.

The five most recent dates

You can change the number of recent dates with the # of High/Low setting on the More tab in the Statistics dialog box.

Lowest

The five lowest values

You can change the number of low values with the # of High/Low setting on the More tab in the Statistics dialog box.

The five oldest dates

You can change the number of oldest dates with the # of High/Low setting on the More tab in the Statistics dialog box.

Steps

You can generate descriptive statistics on numeric and datetime fields in a table.