compute Hodges and Lehmann's location estimator - Maple Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : Statistics : Statistics Package : Quantities : Statistics/HodgesLehmann

Statistics[HodgesLehmann] - compute Hodges and Lehmann's location estimator

Calling Sequence

HodgesLehmann(A, ds_options)

HodgesLehmann(X, rv_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 [2] and independently by Sen in [3]. 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 1122 or about 0.29.


The Hodges-Lehmann statistic is a measure of location: if HodgesLehmannX=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.

Data Set Options


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.

Random Variable Options


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.







Let's replace two of the values with very large values.









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.





Consider the following Matrix data set.




We compute the Hodges-Lehmann statistic for each of the columns.




See Also

Statistics, Statistics[Computation], Statistics[DescriptiveStatistics], Statistics[Distributions], Statistics[Median], Statistics[MedianDeviation], Statistics[RandomVariables]



[1] Stuart, Alan, and Ord, Keith. Kendall's Advanced Theory of Statistics. 6th ed. London: Edward Arnold, 1998. Vol. 1: Distribution Theory.


[2] Hodges, Joseph L.; Lehmann, Erich L. Estimation of location based on ranks. Annals of Mathematical Statistics 34 (2), 1963, pp.598-611.


[3] Sen, Pranab K. On the estimation of relative potency in dilution(-direct) assays by distribution-free methods. Biometrics 19(4), 1963, pp.532-552.

Download Help Document

Was this information helpful?

Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam