Show Navigation | Hide Navigation
You are here:
Geoprocessing tool reference > Analysis toolbox > Statistics toolset > Tools

Summary Statistics (Analysis)

Release 9.3
Last modified January 11, 2011
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Tools"


Related Topics

NOTE: This topic was updated for 9.3.1.


This calculates summary statistics for field(s) in a table.


Usage tips

Command line syntax
An overview of the Command Line window
Statistics_analysis <in_table> <out_table> <statistics_fields {Statistic Type};statistics_fields {Statistic Type}...> {case_field}

Parameter Explanation Data Type
<in_table>

The input table containing the field(s) that will be used to calculate statistics. The input can be an INFO table, a dBASE table, an OLE DB table, a VPF table, or a feature class.

Table View | Raster Layer
<out_table>

The output dBASE or geodatabase table that will store the calculated statistics.

Table
<statistics_fields {Statistic Type};statistics_fields {Statistic Type}...>

The numeric field containing attribute values used to calculate the specified statistic. Multiple statistic and field combinations may be specified. Null values are excluded from all statistical calculations.

The Add Field button, which is used only in ModelBuilder, allows you to add expected field(s) so you can complete the dialog box and continue to build your model.

Available statistic types are

  • SUM — Adds the total value for the specified field.
  • MEAN — Calculates the average for the specified field.
  • MIN — Finds the smallest value for all records of the specified field.
  • MAX — Finds the largest value for all records of the specified field.
  • RANGE — Finds the range of values (MAX – MIN) for the specified field.
  • STD — Finds the standard deviation on values in the specified field.
  • FIRST — Finds the first record in the Input Table and uses its specified field value.
  • LAST — Finds the last record in the Input Table and uses its specified field value.
  • COUNT — Finds the number of values included in statistical calculations. This counts each value except null values. To determine the number of null values in a field, use the COUNT statistic on the field in question, and a COUNT statistic on a different field that does not contain nulls (for example, the OID if present), then subtract the two values.

(Field String; Field String;...)
{case_field}

The fields in the Input Table used to calculate statistics separately for each unique attribute value (or combination of attributes values when multiple fields are specified).

Field
Data types for geoprocessing tool parameters


Command line example

workspace d:\project93\data\Montgomery.mdb
Statistics customers customer_stat "SALES min; SALES max" TYPE 

Scripting syntax
About getting started with writing geoprocessing scripts
Statistics_analysis (in_table, out_table, statistics_fields, case_field)

Parameter Explanation Data Type
in_table (Required)

The input table containing the field(s) that will be used to calculate statistics. The input can be an INFO table, a dBASE table, an OLE DB table, a VPF table, or a feature class.

Table View | Raster Layer
out_table (Required)

The output dBASE or geodatabase table that will store the calculated statistics.

Table
statistics_fields (Required)

The numeric field containing attribute values used to calculate the specified statistic. Multiple statistic and field combinations may be specified. Null values are excluded from all statistical calculations.

The Add Field button, which is used only in ModelBuilder, allows you to add expected field(s) so you can complete the dialog box and continue to build your model.

Available statistic types are

  • SUM — Adds the total value for the specified field.
  • MEAN — Calculates the average for the specified field.
  • MIN — Finds the smallest value for all records of the specified field.
  • MAX — Finds the largest value for all records of the specified field.
  • RANGE — Finds the range of values (MAX – MIN) for the specified field.
  • STD — Finds the standard deviation on values in the specified field.
  • FIRST — Finds the first record in the Input Table and uses its specified field value.
  • LAST — Finds the last record in the Input Table and uses its specified field value.
  • COUNT — Finds the number of values included in statistical calculations. This counts each value except null values. To determine the number of null values in a field, use the COUNT statistic on the field in question, and a COUNT statistic on a different field that does not contain nulls (for example, the OID if present), then subtract the two values.

(Field String; Field String;...)
case_field (Optional)

The fields in the Input Table used to calculate statistics separately for each unique attribute value (or combination of attributes values when multiple fields are specified).

Field

Data types for geoprocessing tool parameters


Script example

# Purpose: Determine the area by vegetation type within 100 meters of all stream crossings

# Create the Geoprocessor object
import arcgisscripting
gp = arcgisscripting.create()

try:
    # Set the workspace (to avoid having to type in the full path to the data every time)
    gp.Workspace = "c:/projects/RedRiverBasin/data.mdb"

    # Process: Find all stream crossings (points)
    gp.Intersect("roads ; streams ", "stream_crossings", "#", 1.5, "point")

    # Process: Buffer all stream crossings by 100 meters
    gp.Buffer("stream_crossings","stream_crossings_100m", "100 meters")

    # Process: Clip the vegetation feature class to stream_crossing_100m
    gp.Clip("vegetation", "stream_crossings_100m", "veg_within_100m_of_crossings")

    # Process: Summarize how much (area) of each type of vegetation is found within 100 meter of the stream crossings
    gp.Statistics("veg_within_100m_of_crossings", "veg_within_100m_of_crossings_stats","shape_area sum","veg_type")

except:
    # If an error occurred while running a tool, print the messages.
    print gp.GetMessages()

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.