1%{ @file fj_xmax_pareto.m
2 % @brief Expected maximum
for Pareto distribution
4 % @author LINE Development Team
8 % @brief Expected maximum
for Pareto distribution
11 % Computes the expected value of the maximum of K i.i.d. Pareto random
12 % variables
using order statistics formulas.
14 % Pareto distribution CDF:
15 % F(x) = 1 - α(x + γ)^{-β}, x >= 0, β > 2
17 % For the standardized Pareto with mean 1:
19 % Mean = 1, Second moment M = 2 + 2/(β - 2)
21 % The j-th moment of the i-th order statistic
is:
22 % m_{i,j} = Γ(K+1) * Γ(K - j + 1 - i/α) / [Γ(K + 1 - i/α) * Γ(K - j + 1)] * k^i
24 % For the maximum (i = K), the expected value can be computed numerically
25 % or approximated using the characteristic maximum method.
29 % Xmax = fj_xmax_pareto(K, beta) % Standard Pareto (mean=1)
30 % Xmax = fj_xmax_pareto(K, beta, k) % Pareto with scale k
31 % [Xmax, MK] = fj_xmax_pareto(K, beta, k) % Also return characteristic max
36 % <tr><th>Name<th>Description
37 % <tr><td>K<td>Number of random variables (positive integer)
38 % <tr><td>beta<td>Shape parameter (beta > 2 required for finite moments)
39 % <tr><td>k<td>Optional: scale parameter (default: beta - 1 for mean = 1)
44 % <tr><th>Name<th>Description
45 % <tr><td>Xmax<td>Expected maximum E[Y_K]
46 % <tr><td>MK<td>Characteristic maximum M_K
50 % A. Thomasian,
"Analysis of Fork/Join and Related Queueing Systems",
51 % ACM Computing Surveys, Vol. 47, No. 2, Article 17, July 2014.
52 % Page 17:24 and 17:26.
54 % N.L. Johnson, S. Kotz, N. Balakrishnan,
"Continuous Univariate
55 % Distributions", Vol. 1, Wiley, 1995.
57function [Xmax, MK] = fj_xmax_pareto(K, beta, k)
60 line_error(mfilename,
'K must be a positive integer. Got K=%d.', K);
64 line_error(mfilename,
'Shape parameter beta must be > 2 for finite moments. Got beta=%.4f.', beta);
67% Default scale parameter
for mean = 1
68if nargin < 3 || isempty(k)
73 line_error(mfilename,
'Scale parameter k must be positive.');
76% Pareto survival function: S(x) = (k / (k + x))^beta
for x >= 0
77S_pareto = @(x) (k ./ (k + max(x, 0))).^beta;
79% Find m_K such that S(m_K) = 1/K
80% (k / (k + m_K))^beta = 1/K
81% k + m_K = k * K^(1/beta)
82% m_K = k * (K^(1/beta) - 1)
83mK = k * (K^(1/beta) - 1);
85% Compute expected maximum
using numerical integration
86% E[Y_K] = integral_0^inf [1 - F(x)^K] dx = integral_0^inf [1 - (1-S(x))^K] dx
87% This can be split into:
88% E[Y_K] = integral_0^inf
P(max > x) dx = integral_0^inf [1 - (1-S(x))^K] dx
90% For Pareto, we can use the order statistic formula
91% E[Y_(K)] for the K-th order statistic (maximum)
92Xmax = compute_pareto_max_expectation(K, beta, k);
94% Characteristic maximum
96 % M_K = m_K + K * integral_{m_K}^{inf} S(x) dx
97 % For Pareto: integral_{m_K}^{inf} (k/(k+x))^beta dx
98 % = k^beta * integral_{m_K}^{inf} (k+x)^{-beta} dx
99 % = k^beta * [(k+x)^{1-beta} / (1-beta)]_{m_K}^{inf}
100 % = k^beta * (k+m_K)^{1-beta} / (beta-1)
103 tail_integral = k^beta * (k + mK)^(1 - beta) / (beta - 1);
104 MK = mK + K * tail_integral;
106 % For beta <= 1, the integral diverges
113function Xmax = compute_pareto_max_expectation(K, beta, k)
114% Compute E[max(X_1, ..., X_K)]
for Pareto distribution
115% Using numerical integration: E[Y_K] = integral_0^inf [1 - F(x)^K] dx
117% CDF: F(x) = 1 - (k/(k+x))^beta
118F_pareto = @(x) 1 - (k ./ (k + max(x, 0))).^beta;
120% Integrand: 1 - F(x)^K = 1 - [1 - (k/(k+x))^beta]^K
121integrand = @(x) 1 - F_pareto(x).^K;
123% Need to integrate from 0 to infinity
124% For numerical stability, split the integral and use appropriate bounds
125% The tail decays as (k/(k+x))^beta ~ k^beta / x^beta
for large x
127% Find a reasonable upper limit where integrand
is negligible
128upper_limit = k * K^(2/beta) * 10; % Conservative estimate
130Xmax = integral(integrand, 0, upper_limit,
'RelTol', 1e-8,
'AbsTol', 1e-10);