Previous Up Next

20.1.13  Cumulative frequencies

Given a list of numbers L, the cumulated frequency at x is the fraction of numbers in the list less than x. The cumulated_frequencies command plots the cumulated frequency of the numbers in a list or given by a matrix.

For numbers in a list:

For numbers in a matrix:

Examples

cumulated_frequencies([1,2,1,1,2,1,2,4,3,3])

or:

cumulated_frequencies([[1,4],[2,3],[3,2],[4,1]])
cumulated_frequencies([[1..2,30],[2..4,40],[4..5,30]])

or:

cumulated_frequencies([[1..2,0.3],[2..4,0.4],[4..5,0.3]])
cumulated_frequencies([[1,4,1],[2,3,4],[3,2,1],[4,1,2]])

Here, both the distributions given by [[1,4],[2,3],[3,2],[4,1]] and [[1,1],[2,4],[3,1],[4,2]] are drawn on the same axes.


Previous Up Next