How Cell Statistics works

For the Cell statistics tool, the value of each location on the output raster is calculated as a function of the cell values from all of the inputs at that location. Some details and examples of each statistic are provided below.

Mean

  • Determines the average value of the inputs on a cell-by-cell basis.
  • The output for Mean is always floating point.
  • Example:
    Cell Statistics—Mean example

Majority

  • Determines the value that occurs most frequently in the inputs on a cell-by-cell basis.
  • If all the inputs are integer, the output is integer. If any of the inputs are floating point, the output is floating point.
  • When there is more than one majority value for a cell location, the output for that location is NoData.
  • If all input values for a cell location are the same, the output majority value for that location is the same as the input.
  • A reasonable application should consist of at least three inputs. If only a single input is specified, the output will be a duplicate of the input.
  • If there are only two inputs, any location where the values are different will be written as NoData. Since there are only two different values from which to choose, there is no majority value. If the values are the same, that value will be written to the output raster.
Cell Statistics—Majority example

Maximum

  • Determines the largest value of the inputs on a cell-by-cell basis.
  • If all the inputs are integer, the output is integer. If any of the inputs are floating point, the output is floating point.
Cell Statistics—Maximum example

Median

  • Determines the median value of the inputs on a cell-by-cell basis.
  • If the number of inputs is odd, the median value is calculated by ranking the values and selecting the middle value. If the number of inputs is even, the values will be ranked, and the middle two values will be averaged. This value will be truncated to an integer if all the input grids are of integer type.
  • If all the inputs are integer, the output is integer. If any of the inputs are floating point, the output is floating point.
Cell Statistics—Median example

Minimum

  • Determines the smallest value of the inputs on a cell-by-cell basis.
  • If all the inputs are integer, the output is integer. If any of the inputs are floating point, the output is floating point.
Cell Statistics—Minimum example

Minority

  • Determines the value that occurs least frequently in the inputs on a cell-by-cell basis.
  • When there is more than one minority value for a cell location, the output for that location is NoData.
  • If all input values for a cell location are the same, the output minority value for that location is the same as the input.
  • A reasonable application should consist of at least three inputs. If only a single input is specified, the output will be a duplicate of the input.
  • If there are only two inputs, any location where the values are different will be written as NoData. Since there are only two different values from which to choose, there is no minority value. If the values are the same, that value will be written to the output raster.
  • If all the inputs are integer, the output is integer. If any of the inputs are floating point, the output is floating point.
Cell Statistics—Minority example

Percentile

  • Determines the percentile of the values in the inputs on a cell-by-cell basis.
  • This statistics type value is computed using method Q1 from Hyndman and Fan (1996) [1]. When two sorted values are equally close to the target median value, the smaller of the two values is chosen.
  • To calculate the percentile, all the cells are ranked using the following formula: R = P/100 x (n - 1) +1, where P is the desired percentile, and n is the number of cells.

Range

  • Determines the range of values in the inputs on a cell-by-cell basis.
  • If all the inputs are integer, the output is integer. If any of the inputs are floating point, the output is floating point.
Cell Statistics—Range example

Std

  • Determines the standard deviation of the values in the inputs on a cell-by-cell basis.
  • The output for Std is always floating point.
  • Note that the standard deviation is calculated on the entire population (the N method); it is not estimated based on a sample (the N-1 method).
Cell Statistics—Standard Deviation example

Sum

  • Determines the sum of the values in the inputs on a cell-by-cell basis.
  • If all the inputs are integer, the output is integer. If any of the inputs are floating point, the output is floating point.
Cell Statistics—Sum example

Variety

  • Determines the number of unique values in the inputs on a cell-by-cell basis.
  • The output raster is always of integer type.
Cell Statistics—Variety example

References

Hyndman, Rob J., and Fan, Yanan. 1996. "Sample Quantiles in Statistical Packages." The American Statistician, Vol. 50, No. 4 (Nov., 1996), pp. 361-365.

Related topics