## 3 \(l^{p}\) Averaging  
It is meaningful to calculate an \(l^{p}\) average of a discrete set of data, that is, the point at which \(B(a)\) achieves its global minimum, only for data from a distribution that satisfies Conditions (3) and for which the \(L^{p}\) average exists, that is, for which \(0<p<\beta-1\). We propose the following algorithm. _Algorithm 1_: Algorithm for \(l^{p}\) Averaging  
STEP 1. Sort the data \(x_{i}\), \(i=1\), \(2\), \(\ldots\), \(I\), from smallest to largest. (To avoid proliferation of notation, use the same notation \(x_{i}\), \(i=1\), \(2\), \(\ldots\), \(I\), for the data after sorting as before. )STEP 2. Choose an integer \(q\) that represents the number of neighbors of a given point in the sorted data set in each direction (lower and higher index) that will be included in a local set of indices to be used in the \"window\" in Step 4. (The \"window size\" is thus \(2q+1\)) STEP 3. Choose a point \(x_{j}\) from which to start. (The median of the data, that is, the \(l^{1}\) average, is generally a good choice for the initial \(x_{j}\).) STEP 4. For each \(k,j-q\leq k\leq j+q\), calculate \(B(x_{k})\). STEP 5. If the \(x_{k}\) that yields the minimum of the \(B(x_{k})\) calculated in Step 4 is \(x_{j}\), stop. In this case, \(x_{j}\) is the computed \(l^{p}\) average of the data. Otherwise, let \(x_{k}\) be a new \(x_{j}\) and return to Step 4. STEP 6. If convergence has not occurred within a predetermined number of iterations, stop and return an error message. _Remark 1._ Algorithm 1 considers the values of \(B(a)\) only at the data points \(x_{i}\) and not between data points. For \(a\) strictly between two consecutive data points \(x_{i}\) and \(x_{i+1}\), \(B(a)\) is concave and is above the line connecting (\(x_{i}\),\(B(x_{i})\)) and (\(x_{i+1}\),\(B(x_{i+1})\)), so a minimum cannot occur there. It is sufficient, therefore, to consider only the values of \(B\) at the points \(x_{i}\) when searching for a minimum. A graph of the points (\(x_{i}\),\(B(x_{i})\)), \(i=1\), \(2\), \(\cdot\)., \(I\), approximates the graph of the continuum \(L^{p}\) functional \(A(a)\), which, for symmetric distributions, has only one local minimum, namely, its global minimum. The graph of the points (\(x_{i}\),\(B(x_{i})\)) may have some relatively shallow local minima produced by the irregular spacing of the \(x_{i}\) (cf. Figures 4 below) and/or the asymmetry of the distribution. The window structure of Algorithm 1 is designed to allow the algorithm to \"jump over\" these local minima on its way to the global minimum. _Remark 2._ The cost of Algorithm 1 is polynomial, namely, the cost \(O(I\) log \(I)\) of the sorting operation of Step 1 plus the cost of the iterations of Step 4, namely, \(O(I^{2})\) (= the number of iterations, which cannot exceed \(O(I)\), times the cost \(O(I)\) of calculating each iteration). Analogous algorithms for higher-dimensional averages are expected to retain this polynomial-time nature. In computational experiments, we used samples of size \(I=2000\) from the symmetric heavy-tailed Distribution 2 with various \(\alpha\), \(1<\alpha\leq 3\), and window sizes \(2q+1=7\), \(9\), \(11\), \(\cdot\).., \(25\). For comparison with Figures 2, we present in Figures 4 the graphs of the points (\(x_{i}\), \(B(x_{i})\)) for the sample from Distribution 2 with \(\alpha=2\) and \(p=0.5\) and \(0.02\). The starting point for Step 3 of the Algorithm 1 was chosen to be \(x_{I-2q}\), a point near the end of the right tail (beyond the limited domains shown in Figures 4). As mentioned in Step 3 of Algorithm 1, the median of the data is a much better choice for a starting point. However, choosing a point near the right tail makes the iterations of Algorithm 1 traverse a large distance before converging to an approximation of the \(l^{p}\) average and thus provides an excellent test for the robustness of Algorithm 1. Computational results for \(p=0.5\), \(0.1\) and \(0.02\) and for window sizes \(2q+1=7\), \(13\), \(19\) and \(25\) are presented in Tables 1-4.