Statistics
HodgesLehmann
compute Hodges and Lehmann's location estimator
Calling Sequence
Parameters
Description
Computation
Data Set Options
Random Variable Options
Examples
References
Compatibility
HodgesLehmann(A, ds_options)
HodgesLehmann(X, rv_options)
A
-
data set or Matrix data set
X
algebraic; random variable or distribution
ds_options
(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
rv_options
(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:
HLE=Median⁡seq⁡seq⁡Ai+Aj,i=1..n,j=1..n2
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.
with⁡Statistics:
Compute the Hodges-Lehmann statistic for a data sample.
s≔1,5,2,2,7,4,1,6
s≔15227416
HodgesLehmann⁡s
3.50000000000000
Let's replace two of the values with very large values.
t≔copy⁡s:
t1..2≔10100:
t
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000227416
HodgesLehmann⁡t
5.75000000000000
The Hodges-Lehmann statistic stays bounded, because it has a high breakdown point.
Compute the Hodges-Lehmann statistic for an exponential distribution.
HodgesLehmann⁡Exponential⁡1,numeric
0.839173495008330
The symbolic result below evaluates to the same floating point number if the parameter is 1.
HodgesLehmann⁡Exponential⁡b
−LambertW⁡−1,−ⅇ−12+1⁢b2
evalf⁡eval⁡,b=1
0.8391734950
Generate a random sample of size 1000000 from the same distribution and compute the sample's Hodges-Lehmann statistic.
A≔Sample⁡Exponential⁡1,1000000:
HodgesLehmann⁡A
0.840272671959114
Consider the following Matrix data set.
M≔Matrix⁡3,1130,114694,4,1527,127368,3,907,88464,2,878,96484,4,995,128007
M≔31130114694415271273683907884642878964844995128007
We compute the Hodges-Lehmann statistic for each of the columns.
HodgesLehmann⁡M
3.1018.50000000000111926.
[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.
The Statistics[HodgesLehmann] command was introduced in Maple 18.
For more information on Maple 18 changes, see Updates in Maple 18.
See Also
Statistics[Computation]
Statistics[DescriptiveStatistics]
Statistics[Distributions]
Statistics[Median]
Statistics[MedianDeviation]
Statistics[RandomVariables]
Download Help Document