\(\text{Histogram}\)

You can use to the histogram function to calculate a histogram from a a collection of data values. The function also Calculates the histogram of scalar values in the supplied list.

You can use the histogram backslash command to insert this function.

The following variants of this function are available:

  • \(\text{tuple } \text{Histogram} \left ( \text{<lower bound>}, \text{<upper bound>}, \text{<number buckets>}, \ldots \right )\)

\(\text{<lower bounds>}\) and \(\text{<upper bounds>}\) should be scalar values indicating range of values to generate a histogram over. The \(\text{<lower bounds>}\) value must be below the \(\text{<upper bounds>}\) value. The \(\text{<lower bounds>}\) value represents the lowest value accepted in the lowest bucket. The \(\text{<upper bounds>}\) value represents the highest value accepted in the highest bucket. The \(\text{<number buckets>}\) parameter must be a positive integer value holding the number of histogram buckets to be used.

You can place any number of values after the \(\text{<number buckets>}\) parameter. The additional parameter can be any type, including iterable types. You can also recursively include sets and tuples containing other iterable types.

The returned value is a tuple containing:

  • An integer column matrix holding the counts for each bucket.

  • A real column matrix containing the bucket counts scaled such that the sum of returned values will be 1.

  • A real column matrix holding the bucket center positions.

  • An integer value holding a count of values that fell below the lower bound.

  • An integer value holding a count of values the fell above the upper bound.

  • Histogram lower bounds.

  • Histogram upper bounds.

  • The bucket widths.

Figure 152 shows the basic use of the \(\text{Histogram}\) function.

../_images/histogram_example.png

Figure 152 Example Use Of The Histogram Function