Extremes of Many Random Variables | Vose Software

ModelRisk example · General techniques

Extremes of Many Random Variables

The largest and the smallest of 10,000 independent values, without sampling all 10,000.

  • Complexity: ★★★★★
  • Free Excel workbook (GU-22)
  • Needs ModelRisk: free trial

From the model’s saved run

The largest of 10,000

VoseLargest, simulated, against the exact distribution of a maximum.

SimulatedExact
Mean14.6914.69
5th percentile10.1210.13
Median13.5613.58
Percentile at P (95%)22.8322.86
VoseLargest(object, n, P): the percentile in one call22.86
The largest of 10,000

The business question

10,000 independent values each follow a Pareto distribution with shape 5 and minimum 2: most are close to the minimum (the mean is 2.5), but the tail is long. Sampling all 10,000 in every iteration to find the largest is slow.

ModelRisk's extreme-value functions sample the largest, the smallest, or the top or bottom few directly, at the cost of a single sample, whatever the number of values. The model shows them all and checks them twice: against the exact distribution of a maximum, and against the largest of 1,000 values sampled one by one.

Who it is for
Anyone who needs the extremes of many variables: the largest claim in a portfolio, the highest of many flood levels, the weakest of many components, the slowest of many tasks.
Main outputs
The largest of 10,000: simulated, its percentiles and mean against the exact formula, and its 95th percentile in one call · the six largest and six smallest, in order, and their totals · the smallest and largest together · the largest of 1,000 sampled one by one against VoseLargest.

How the model works

Four sheets after this one, read from left to right. Each one feeds the next.

  1. Inputs sheet

    The Pareto's shape and minimum, the number of values (10,000), and the probability at which to read the largest (95%).

  2. Extremes sheet

    VoseLargest samples the largest of the 10,000 values. With a third argument it returns a percentile of the largest instead. VoseLargestSet and VoseSmallestSet give the six largest and six smallest, VoseExtremeRange the smallest and largest together. Exact percentiles and the exact mean of the largest are beside them.

  3. Brute force sheet

    1,000 cells, each a value from the same Pareto, and their maximum, against VoseLargest of 1,000.

  4. Results sheet

    The largest's distribution, simulated and exact; the sets; the brute-force check.

ModelRisk techniques

  • Pareto object VoseParetoObject
  • Extremes VoseLargest, VoseSmallest
  • Extreme sets VoseExtremeRange
  • Brute-force check
  • Exact maximum, F(x)ⁿ

Find similar models

Product

The results in detail

The 6 largest and 6 smallest

Mean of each rank in the simulation.

RankLargest setSmallest set
114.642.00004
211.742.00008
310.562.00012
49.862.00016
59.362.00020
69.002.00024
Total65.1512.00084

Brute force: the largest of 1,000

1,000 values sampled one by one against VoseLargest, and exact.

The largest of 1,000, two ways
One by oneVoseLargestExact
Mean9.379.269.27
Median8.608.578.57
95th percentile14.7314.3914.42

How to read these results

  • Most of the 10,000 values are near the minimum of 2 (the mean is 2.5), but the largest is typically about 13.6 (median) and exceeds 22.9 one time in 20: the extreme of a heavy-tailed variable is far from the typical value.
  • VoseLargest samples the largest directly at the cost of one sample, whatever n. Sampling the values one by one and taking the maximum gives practically the same distribution (within about 1% here, with 1,000 values) but costs n samples per iteration; VoseLargest also matches the exact formula.
  • With a third argument U, VoseLargest returns a percentile of the largest instead of a sample: VoseLargest(object, 10,000, 0.95) is 22.86, exactly a ÷ (1 − 0.95^(1/n))^(1/θ). VoseSmallest works the same way.
  • The smallest values are pressed against the minimum: the six smallest of 10,000 average 2.00004 to 2.00024. VoseLargestSet, VoseSmallestSet and VoseExtremeRange give several extremes of the same set at once, in order.

See it move. Open the workbook, change an input on the Inputs sheet and run the simulation: every table and chart on this page updates in Excel.

Inputs and assumptions

Every assumption in the model, with its uncertainty and where it comes from. The figures are illustrative.

The distribution 2 inputs

Every value follows the same Pareto.

AssumptionUnitValue
Pareto shape θLarger θ: a thinner tail5.0
Pareto minimum aNo value is below itvalue2.0
How many, and where to read the largest 2 inputs
AssumptionUnitValue
Number of independent valuesvalues10000
Probability for the percentile of the largest95%

Units and conventions

Pareto(θ, a)
Shape θ, minimum a: P(X > x) = (a ÷ x)^θ for x ≥ a; mean θa ÷ (θ − 1).
Rank
1 = the largest (or the smallest) of the set.

Key assumptions and limitations

Independence
The 10,000 values are independent and identically distributed.
Data
The distribution, the 10,000 and the 95% are those of ModelRisk's earlier Pareto Extremes example. The set and range functions follow its Extremes example. Its units ($ billion) are dropped: the values are left unitless.

How to use it

  1. Set the distribution and the number of values on the Inputs sheet (any ModelRisk distribution object works in the extreme functions).
  2. Run a simulation from the ModelRisk ribbon (10,000 samples with a fixed seed are set).
  3. Use VoseLargest or VoseSmallest wherever a model needs the extreme of many identical variables.

ModelRisk functions used

VoseParetoObject
The Pareto distribution as an object, for the extreme functions.
VoseLargest, VoseSmallest
The largest or smallest of n values; with U, its U-th percentile.
VoseLargestSet, VoseSmallestSet
The k largest (descending) or smallest (ascending) of n values.
VoseExtremeRange
The smallest and largest of n values, from the same sample.
VoseSimulate
One value from the object, for the brute-force cells.

Further reading