In: Math
Produce a Pareto diagram that shows total spending in a
descending order and at the same time the cumulative percentage
curve.
Based on the above, can you estimate which part of visitors
accounts for 75% of total revenues in the island.
The data used are:
| NATIONALITY | TOT_SPEND | 
| GERMAN | 1988 | 
| GERMAN | 1988 | 
| GERMAN | 1834 | 
| GERMAN | 1823 | 
| GERMAN | 1741 | 
| GERMAN | 1708 | 
| GERMAN | 1707 | 
| GERMAN | 1701 | 
| FRENCH | 1598 | 
| GERMAN | 1531 | 
| FRENCH | 1494 | 
| GERMAN | 1437 | 
| GERMAN | 1420 | 
| ITALIAN | 1416 | 
| GERMAN | 1414 | 
| GERMAN | 1391 | 
| GERMAN | 1358 | 
| ITALIAN | 1350 | 
| GERMAN | 1298 | 
| GERMAN | 1296 | 
| GERMAN | 1295 | 
| GERMAN | 1295 | 
| FRENCH | 1280 | 
| FRENCH | 1245 | 
| BRITISH | 1217 | 
| FRENCH | 1204 | 
| GERMAN | 1184 | 
| ITALIAN | 1166 | 
| FRENCH | 1140 | 
| GERMAN | 1112 | 
| GERMAN | 1095 | 
| ITALIAN | 1088 | 
| ITALIAN | 1079 | 
| FRENCH | 1057 | 
| BRITISH | 1046 | 
| FRENCH | 1041 | 
| GERMAN | 1026 | 
| GERMAN | 1013 | 
| GERMAN | 1011 | 
Step 1 : put the values in the descending order (highest first, lowest last)
Step 2: calculate the cumulative sales on the sorted values
cumulative revenue (i) = cumulative revenue (i-1) + sales (i)
where sales (i) is the sales in the ith row in the sorted data
cumulative revenue (1) = sales (1)
Step 3 : % cumulative revenue (i) = cumulative revenue/total revenue
| NATIONALITY | TOT_SPEND | Cumulative revneue | Cumulative revneue | 
| GERMAN | 1988 | 1988 | 4% | 
| GERMAN | 1988 | 3976 | 7% | 
| GERMAN | 1834 | 5810 | 11% | 
| GERMAN | 1823 | 7633 | 14% | 
| GERMAN | 1741 | 9374 | 18% | 
| GERMAN | 1708 | 11082 | 21% | 
| GERMAN | 1707 | 12789 | 24% | 
| GERMAN | 1701 | 14490 | 27% | 
| FRENCH | 1598 | 16088 | 30% | 
| GERMAN | 1531 | 17619 | 33% | 
| FRENCH | 1494 | 19113 | 36% | 
| GERMAN | 1437 | 20550 | 39% | 
| GERMAN | 1420 | 21970 | 41% | 
| ITALIAN | 1416 | 23386 | 44% | 
| GERMAN | 1414 | 24800 | 47% | 
| GERMAN | 1391 | 26191 | 49% | 
| GERMAN | 1358 | 27549 | 52% | 
| ITALIAN | 1350 | 28899 | 54% | 
| GERMAN | 1298 | 30197 | 57% | 
| GERMAN | 1296 | 31493 | 59% | 
| GERMAN | 1295 | 32788 | 62% | 
| GERMAN | 1295 | 34083 | 64% | 
| FRENCH | 1280 | 35363 | 67% | 
| FRENCH | 1245 | 36608 | 69% | 
| BRITISH | 1217 | 37825 | 71% | 
| FRENCH | 1204 | 39029 | 74% | 
| GERMAN | 1184 | 40213 | 76% | 
| ITALIAN | 1166 | 41379 | 78% | 
| FRENCH | 1140 | 42519 | 80% | 
| GERMAN | 1112 | 43631 | 82% | 
| GERMAN | 1095 | 44726 | 84% | 
| ITALIAN | 1088 | 45814 | 86% | 
| ITALIAN | 1079 | 46893 | 88% | 
| FRENCH | 1057 | 47950 | 90% | 
| BRITISH | 1046 | 48996 | 92% | 
| FRENCH | 1041 | 50037 | 94% | 
| GERMAN | 1026 | 51063 | 96% | 
| GERMAN | 1013 | 52076 | 98% | 
| GERMAN | 1011 | 53087 | 100% | 

In the graph the part in the left of the red line corresponds to the 75% of the revenue
In the table pasted above the chart, the part above from the point where 76% in the cumulative percentage appears corresponds to it.
76% of the revenue stands at = 40213