# Find the Hill Estimator of "alpha"

I am trying to get the Hill estimator of "alpha" and the Hill-plot graph from a standard Cauchy distribution. So, how to get it? Thanks!

Hill estimator can be outlined as follows.

1. Generate a set X (for example, generate 100 variates from the Cauchy distribution)
2. Order the elements of the set X in a decreasing fashion: Xi ≥ Xj, for i < j
3. Construct the sets of Hk, for k>=2 (k=2,3,...,100): Hk=Σ{ln(Xj ) − ln(Xk)}/k , where j=1,2,...,k
4. The set αk is defined by αk= 1/Hk

Since all elements in set αk should be real number, my coding below could not get the correct set of αk. Does someone know how to get the set of αk? Thanks!

X = RandomVariate[CauchyDistribution[0, 1], 100]
X = Sort[X, Greater]
t = {};
For[
i = 1, i <= 99, i++;
a = 1/Mean[Log[X[[1 ;; i]]] - Log[X[[i]]]];
T = AppendTo[t, a]
]

• In step3, what is ln(Xj ) ? Dec 19, 2020 at 15:09
• @wuyudi, The elements of set X are in a decreasing order, which means the generated variates X1 >= X2 >= X3 >=...>= X100. Thus, Xj >=Xk. For example, if k=10, Xj= X1, X2, ...X10. So, I should get a2, a3, ... a100. Dec 19, 2020 at 18:13
• With a random sample from a CauchyDistribution[0,1], you're going to get complex numbers after taking the log about half of the time. Is that what you want?
– JimB
Dec 20, 2020 at 2:00
• @JimB, all ak should be real number. Could you find how to get all ak real number? Dec 20, 2020 at 2:04
• The log of a negative number is complex and if you take the log of the absolute value, then you're not using the definition of the Hill estimator that you give. Other than ignoring complex numbers (which you can do at your peril), I don't know if you can get there from here. In my answer below, the values become complex with $k>56$.
– JimB
Dec 20, 2020 at 2:08

You should avoid uppercase letters for variables and For loops:
n = 100