compute Hodges and Lehmann's location estimator
Data Set Options
Random Variable Options
data set or Matrix data set
algebraic; random variable or distribution
(optional) equation(s) of the form option=value where option is one of correction, ignore, or weights; specify options for computing Hodges and Lehmann's location statistic of a data set
(optional) equation of the form numeric=value; specifies options for computing Hodges and Lehmann's location statistic of a random variable
The HodgesLehmann function computes a robust measure of the location of the specified data set or random variable, as introduced by Hodges and Lehmann in  and independently by Sen in . This statistic is variously called the Hodges-Lehmann-Sen estimator, the Hodges-Lehmann estimator, the Hodges-Lehmann-Sen statistic, or the Hodges-Lehmann statistic.
The Hodges-Lehmann statistic, referred to as HLE in the remainder of this help page, is defined for a data set A1,A2,...,An as:
The Hodges-Lehmann statistic is a reasonably robust statistic: it has a fairly high breakdown point (the proportion of arbitrarily large observations it can handle before giving an arbitrarily large result). The breakdown point of HLE is 1−22 or about 0.29.
The Hodges-Lehmann statistic is a measure of location: if HodgesLehmann⁡X=a, then for all real constants α and β, we have HodgesLehmann⁡α⁢X+β=α⁢a+β.
The first parameter can be a data set, a distribution (see Statistics[Distribution]), a random variable, or an algebraic expression involving random variables (see Statistics[RandomVariable]). For a data set A, HodgesLehmann computes the Hodges-Lehmann statistic as defined above. For a distribution or random variable X, HodgesLehmann computes the asymptotic equivalent - the value that the Hodges-Lehmann statistic converges to for ever larger samples of X.
By default, all computations involving random variables are performed symbolically (see option numeric below).
All computations involving data are performed in floating-point; therefore, all data provided must have type/realcons and all returned solutions are floating-point, even if the problem is specified with exact values.
For more information about computation in the Statistics package, see the Statistics[Computation] help page.
The ds_options argument can contain one or more of the options shown below. More information for some options is available in the Statistics[DescriptiveStatistics] help page.
ignore=truefalse -- This option controls how missing data is handled by the HodgesLehmann command. Missing items are represented by undefined or Float(undefined). So, if ignore=false and A contains missing data, the HodgesLehmann command may return undefined. If ignore=true all missing items in A will be ignored. The default value is false.
weights=Vector -- Data weights. The number of elements in the weights array must be equal to the number of elements in the original data sample. By default all elements in A are assigned weight 1.
The rv_options argument can contain one or more of the options shown below. More information for some options is available in the Statistics[RandomVariables] help page.
numeric=truefalse -- By default, the Hodges-Lehmann statistic is computed using exact arithmetic. To compute the Hodges-Lehmann statistic numerically, specify the numeric or numeric = true option.
Compute the Hodges-Lehmann statistic for a data sample.
s ≔ 1,5,2,2,7,4,1,6
Let's replace two of the values with very large values.
t ≔ copy⁡s:
t1..2 ≔ 10100:
The Hodges-Lehmann statistic stays bounded, because it has a high breakdown point.
Compute the Hodges-Lehmann statistic for an exponential distribution.
The symbolic result below evaluates to the same floating point number if the parameter is 1.
Generate a random sample of size 1000000 from the same distribution and compute the sample's Hodges-Lehmann statistic.
A ≔ Sample⁡'Exponential'⁡1,1000000:
Consider the following Matrix data set.
M ≔ Matrix⁡3,1130,114694,4,1527,127368,3,907,88464,2,878,96484,4,995,128007
We compute the Hodges-Lehmann statistic for each of the columns.
 Stuart, Alan, and Ord, Keith. Kendall's Advanced Theory of Statistics. 6th ed. London: Edward Arnold, 1998. Vol. 1: Distribution Theory.
 Hodges, Joseph L.; Lehmann, Erich L. Estimation of location based on ranks. Annals of Mathematical Statistics 34 (2), 1963, pp.598-611.
 Sen, Pranab K. On the estimation of relative potency in dilution(-direct) assays by distribution-free methods. Biometrics 19(4), 1963, pp.532-552.
The Statistics[HodgesLehmann] command was introduced in Maple 18.
For more information on Maple 18 changes, see Updates in Maple 18.
Download Help Document