scipy.stats.relfreq (a, numbins, defaultreallimits, weights)
is a relative frequency histogram using the histogram function.
Parameters:
arr: [array_like] input array.
numbins: Number of bins to use for the histogram. [Default = 10]
defaultreallimits: (lower, upper) range of the histogram.
weights: [array_like] weights for each array element.Results:
- relative frequency binned values
- width of each bin
- lower real limit
- extra points.
Code # 1:
|
Exit:
Array element: [1, 3, 27, 2, 5, 13] cumulative frequency: [0.66666667 0.16666667 0. 0.16666667] Lower Limit: -3.333333333333333 bin size: 8.666666666666666 extra-points: 0
Code # 2:
|
Output:
Array element: [1, 3, 27, 2, 5, 13] cumfreqs: [0.26666667 1. 0. 0.01666667] lowlim: -3.333333333333333 binsize: 8.666666666666666 extrapoints: 0