# Function Repository Resource:

# ParetoPrinciplePlot

Make Pareto principle adherence plots

Contributed by: Anton Antonov
 ResourceFunction["ParetoPrinciplePlot"][vec] plots the normalized cumulative sum of the reverse-sorted list vec.

## Details and Options

The adherence of the data vec to the Pareto principle can be easily verified with the plots of ResourceFunction["ParetoPrinciplePlot"].
The argument can be a numerical list, a list of numerical lists or a list of numerical lists wrapped with tooltips and callouts.
For a given numerical vector vec, the Pareto principle plot data is computed with the formula: Accumulate[ReverseSort[vec]]/Total[vec].
ResourceFunction["ParetoPrinciplePlot"] accepts all options of ListPlot, with the following additions:
 "ParetoGridLines" Automatic show Pareto-specific grid lines. "Tooltip" True whether automatic Tooltip wrappers should be used
The option "ParetoGridLines" can be used to define Pareto principle–specific grid lines.
The option "Tooltip" can be used to specify the use of automatic Tooltip wrappers.

## Examples

### Basic Examples (2)

Pareto principle plot for a numerical vector:

 In:= Out= Pareto principle plot for a list of numerical vectors:

 In:= Out= ### Scope (3)

Plot a list of numerical vectors with tooltips:

 In:= Out= Numerical vectors with nested Tooltip and Callout specifications can be given; "wrapped" and "plain" vectors can be mixed:

 In:= In:= Out= Plot an association with numerical values:

 In:= Out= ### Options (3)

#### ParetoGridLines

A data vector:

 In:= Pareto principle adherence plots with different Pareto grid lines specifications:

 In:= Out= The option "ParetoGridLines" is overridden by the ListPlot option GridLines:

 In:= Out= #### Tooltip

The option "Tooltip" takes Boolean values:

 In:= In:= Out= ### Applications (7)

#### Words distribution in texts (3)

Get the text of Shakespeare’s play Hamlet:

 In:= Convert the text to lowercase and split it into words:

 In:= Out= Plot the words' tally values:

 In:= Out= In the preceding Pareto principle adherence plot, you can see a clear Pareto principle manifestation: ≈15% of the words correspond to ≈80% of the text.

#### Gross Domestic Product (GDP) of countries (2)

Pareto principle manifestation for countries' GDP, showing that ≈10% of the countries correspond to ≈80% of the total GDP:

 In:= Out= Plot together the curves of GDP changes for different countries in the same time period, demonstrating the rapid growth of China and Poland:

 In:= Out= #### Lake data (2)

Gather data for lakes and make Pareto principle plots for the lakes' surface areas, volumes and fish catch:

 In:= In:= You can see that the lakes' area data manifests an “exaggerated” Pareto principle adherence; ≈5% of the lakes correspond to ≈90% of the total lake area:

 In:= Out= ### Properties and Relations (2)

A numeric vector:

 In:= The Pareto principle plot data is computed using the following formula:

 In:= Show the corresponding plot:

 In:= Out= Compare with the plot made by ParetoPrinciplePlot:

 In:= Out= It is beneficial to use Pareto principle adherence plots together with data summaries and histograms:

 In:= Note that the summary and histograms provide complementary data distribution properties to those given by the Pareto principle adherence plot:

 In:= Out= ### Possible Issues (2)

#### Missing values (2)

ParetoPrinciplePlot does not work on vectors with missing values:

 In:=     Out= Use DeleteMissing to obtain a plot:

 In:= Out= ParetoPrinciplePlot does not work on QuantityArray objects and lists of Quantity objects:

 In:= Out= In:=     Out= Use DeleteMissing and QuantityMagnitude to obtain a plot:

 In:= Out= ### Neat Examples (1)

Pareto principle adherence plots for word tallies for different translations of the United Nations’ "Universal Declaration of Human Rights" official document:

 In:= Out= Anton Antonov

## Version History

• 1.0.1 – 28 June 2021