probabilities(a,w)

Returns a matrix such that the first column contains the center of each class and the right column contains the corresponding number of values in that class divided by the total number of values. The values are given in array a and the class width is w. Classes are built by taking 0. as a reference for the left point of a class. This function is useful to build histograms.

probabilities(a,w,r)

Returns a matrix such that the first column contains the center of each class and the right column contains the corresponding number of values in that class divided by the total number of values. The values are given in array a and the class width is w. Classes are built by taking r as a reference for the left point of a class. This function is useful to build histograms.


See also frequencies sample distribution 


Example


a = ( 2.2, 1.1, 2.7, 1.6, -1.2 );

probabilities(a, 1)

 -1.5  0.2

 -0.5  0.0

  0.5  0.0

  1.5  0.4

  2.5  0.4