histogram

Creates a simplified histogram representation of selected data.

Syntax

histogram(vector, scalar1, 1|2|3, [on|off])

Arguments

vector
The vector of data to analyze.
scalar1
The number of cells in the histogram or the vector of user-defined cells.
1|2|3|4|5
Return mode.
  • 1 = interval data (usually used as the X vector)
  • 2 = frequency data (usually used as the Y vector)
  • 3 = relative frequency data (usually used as the Y vector)
  • 4 = cumulative frequency
  • 5 = cumulative relative frequency
1|2
Interval calculation (optional).
  • 1 = inclusive (default)
  • 2 = exact
0|1
Flag to turn on debug mode and print to the message log (optional).
  • 0 = off (default)
  • 1 = on

Example

{histogram({50,66,70,60,90,90,81,30,99},4,1,2,1)}

Comments

Given a vector of data, a histogram is a plot showing the frequency (or relative frequency) that a given value appears in the vector.

For example: V1 = {1,2,2,3,4,4,4}

The frequency of 1 is 1 (rel. freq. = 1/7 = 14.3%).

The frequency of 2 is 2 (rel. freq. = 2/7 = 28.6%).

The frequency of 3 is 1 (rel. freq. = 1/7 = 14.3%).

The frequency of 4 is 3 (rel. freq. = 3/7 = 42.9%).