DiscFreqs-Algorithm
The data consists of a sample of n observations of a discrete variable, denoted by, fori=1,...,n. Then sort the data ascending, the ordered data is denoted by, fori=1,...,n. The corresponding count of the value is denoted by, , which is the frequency of the ith value. The relative frequency and cumulative frequency of are calculated as follows:
and , for k=1,...,n.