sciPy stats.cumfreq() function | Python Last Updated : 15 Jan, 2022 Comments Improve Suggest changes Like Article Like Report scipy.stats.cumfreq(a, numbins, defaultreallimits, weights) works using the histogram function and calculates the cumulative frequency histogram. It includes cumulative frequency binned values, width of each bin, lower real limit, extra points. Parameters : arr : [array_like] input array. numbins : [int] number of bins to use for the histogram. [Default = 10] defaultlimits : (lower, upper) range of the histogram. weights : [array_like] weights for each array element. Results : - cumulative frequency binned values - width of each bin - lower real limit - extra points. Code #1: Python3 # cumulative frequency from scipy import stats import numpy as np arr1 = [1, 3, 27, 2, 5, 13] print ("Array element : ", arr1, "\n") a, b, c, d = stats.cumfreq(arr1, numbins = 4) print ("cumulative frequency : ", a) print ("Lower Limit : ", b) print ("bin size : ", c) print ("extra-points : ", d) Output: Array element : [1, 3, 27, 2, 5, 13] cumulative frequency : [ 4. 5. 5. 6.] Lower Limit : -3.33333333333 bin size : 8.66666666667 extra-points : 0 Code #2: Python3 # cumulative frequency from scipy import stats import numpy as np arr1 = [1, 3, 27, 2, 5, 13] print ("Array element : ", arr1, "\n") a, b, c, d = stats.cumfreq(arr1, numbins = 4, weights = [.1, .2, .1, .3, 1, 6]) print ("cumfreqs : ", a) print ("lowlim : ", b) print ("binsize : ", c) print ("extrapoints : ", d) Output: Array element : [1, 3, 27, 2, 5, 13] cumfreqs : [ 1.6 7.6 7.6 7.7] lowlim : -3.33333333333 binsize : 8.66666666667 extrapoints : 0 Comment More infoAdvertise with us Next Article sciPy stats.cumfreq() function | Python V vishal3096 Follow Improve Article Tags : Python Python-scipy Python scipy-stats-functions Practice Tags : python Similar Reads sciPy stats.describe() function | Python scipy.stats.describe(array, axis=0) computes the descriptive statistics of the passed array elements along the specified axis of the array. Parameters : array: Input array or object having the elements to calculate the statistics. axis: Axis along which the statistics is to be computed. By default a 2 min read sciPy stats.sem() function | Python scipy.stats.sem(arr, axis=0, ddof=0) function is used to compute the standard error of the mean of the input data. Parameters : arr : [array_like]Input array or object having the elements to calculate the standard error. axis : Axis along which the mean is to be computed. By default axis = 0. ddof : 1 min read sciPy stats.tmax() function | Python scipy.stats.tmax(array, lowerlimit=None, axis=0, inclusive=True) function calculates the trimmed maximum of the array elements along with ignoring the values lying outside the specified limits, along the specified axis. Parameters : array: Input array or object having the elements to calculate the t 2 min read sciPy stats.relfreq() function | Python 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. weigh 2 min read sciPy stats.itemfreq() function | Python scipy.stats.itemfreq(arr, axis = None) function helps us to calculate the item frequencies. Parameters : arr : [array_like] input array. Results : 2D array with item frequency. Code #1: Use of variation() Python3 # cumulative frequency from scipy import stats import numpy as np arr = [14, 31, 27, 27 1 min read Like