## New Research In

### Physical Sciences

### Social Sciences

#### Featured Portals

#### Articles by Topic

### Biological Sciences

#### Featured Portals

#### Articles by Topic

- Agricultural Sciences
- Anthropology
- Applied Biological Sciences
- Biochemistry
- Biophysics and Computational Biology
- Cell Biology
- Developmental Biology
- Ecology
- Environmental Sciences
- Evolution
- Genetics
- Immunology and Inflammation
- Medical Sciences
- Microbiology
- Neuroscience
- Pharmacology
- Physiology
- Plant Biology
- Population Biology
- Psychological and Cognitive Sciences
- Sustainability Science
- Systems Biology

# Approximation of the expected value of the harmonic mean and some applications

Contributed by Calyampudi R. Rao, July 1, 2014 (sent for review June 5, 2014)

## Significance

The harmonic mean (HM) filter is better at removing positive outliers than the arithmetic mean (AM) filter. There are especially difficult issues when an accurate evaluation of expected HM is needed such as, for example, in image denoising and marginal likelihood evaluation. A major challenge is to develop a higher-order approximation of the expected HM when the central limit theorem is not applicable. A two-term approximation of the expected HM is derived in this paper. This approximation enables us to develop a new filtering procedure to denoise the noisy image with an improved performance, and construct a truncated HM estimator with a faster convergence rate in marginal likelihood evaluation.

## Abstract

Although the harmonic mean (HM) is mentioned in textbooks along with the arithmetic mean (AM) and the geometric mean (GM) as three possible ways of summarizing the information in a set of observations, its appropriateness in some statistical applications is not mentioned in textbooks. During the last 10 y a number of papers were published giving some statistical applications where HM is appropriate and provides a better performance than AM. In the present paper some additional applications of HM are considered. The key result is to find a good approximation to *n* observations from a probability distribution. In this paper a second-order approximation to

The harmonic mean *n* observations *n* → ∞. Our interest in this paper is to determine the second term in the asymptotic expansion of **5**] to the case that the first moment of

## Approximations

We derive the asymptotic approximation of *α*, *α*

Assume that there is a positive constant *n* such that

We have the following asymptotic approximation of

**Theorem 1.** *Assume that conditions* [**7**]**–**[**10**] *are satisfied and* *and* *Then we have the following first approximation:**where*

The proof is given in *Appendix: Proof of Theorem 1*. Because **10**] is smaller than the remaining terms in [**11**], the coefficients of both *β* in [**11**].

** Remark 1:** For an extension of

*Theorem 1*to the weighted harmonic mean in [

**2**], we consider the following partial sum:

*s*:

**6**] satisfies that

**13**] and [

**14**], ref. 15 showed that the distribution of

*s*follow uniform distribution

**14**] is satisfied when

*Theorem 1*, it can be shown that

**2**] do not have to be nonnegative, but must satisfy both conditions [

**9**] and [

**13**].

By *Theorem 1*, **5**] has the value −1. It is noted that *Theorem 1* holds true if

A higher-order approximation may be similarly obtained but extra conditions on **7**] and [**8**] may be needed. In view of the proof of *Theorem 2.1* given in *Appendix: Proof of Theorem 1*, the higher-order term should be *n* independent observations from standard uniform distribution

As in ref. 3, suppose that **4**], which is

According to our *Theorem 1* and the approximation [**16**],

Fig. 1 displays the approximations given in [**17**]**–**[**19**] compared with the sample mean of 1,000,000 replications of *n* independent observations from the uniform distribution *n* takes values **18**] is better than the approximation [**17**]. Although the approximation [**19**] is purely empirical, this empirical exercise basically achieves the desired result as shown in Fig. 1; it clearly gives much better approximation of

We now consider the case that *Theorem 1*, we have the following asymptotic approximation of

**Theorem 2.** *Assume that conditions in* [**7**]–[**10**] *are satisfied and* *then we have the following approximation:**where*

** Remark 2:** A similar result as in

*Theorem 2*can be obtained for the weighted harmonic mean in [

**2**] by assuming that conditions [

**13**] and [

**14**] are satisfied with

## Some Applications

We present two applications which involve the use of the approximation of

### Image Denoising.

Image denoising is very important in image processing. There are many methods for image denoising in the literature of image process. We are interested in the local filters such as the arithmetic and harmonic mean filters that have been used in image denoising. The harmonic mean filter is better at removing positive outliers and preserving edge features than the arithmetic mean filter. However, both of them fail when the image is contaminated by a uniform noise. Comparing the difference between the two means on different segments, we use the ratio of the harmonic mean and the arithmetic mean (defined in [**23**]) as a local filter and select the corresponding threshold of the ratio using the improved approximation [**16**] plus a saddle-point approximation. This application shows how the local filter can improve the performance of image denoising. The details are given below.

For demonstration, we consider a test image with dimension 250 × 250 (Fig. 2*A*) including disk, hand, human body, ring, sunflower, and triangle as shown in figure 2 of ref. 16. We contaminate the image with uniform noise, which is displayed in Fig. 2*B*. The usual harmonic mean filter method in image denoising is to replace the value of each pixel with the harmonic mean of values of the pixels in a surrounding region. We consider a square containing 9 pixels for each pixel such that this pixel is located at the center. Here the variable *C* and *D*, it can be seen that even though the harmonic mean filter outperforms the arithmetic mean filter, both arithmetic mean filter and the harmonic mean filter fail to denoise the noisy image given in Fig. 2*B*. However, we can first use the ratio of the harmonic mean and the arithmetic mean jointly with a threshold *θ* to transform the pixel *E* and *F*, it can be seen that both images look much better than the images in Fig. 2 *C* and *D*. The image in Fig. 2*F* (by the harmonic mean filter) looks almost the same as the initial unnoisy image.

We note that only when using the ratio of the harmonic mean and the arithmetic mean, we assign 1 or 0 according to a threshold *θ* in [**23**], which is determined by the asymptotic behavior of the ratio of their expected values. How to select the threshold *θ* is important in practice. To demonstrate how to select *θ*, we consider two cases of uniform distributions with sample size *n*: (*i*) *ii*) *i*), **16**], an improved approximation compared with the result of *Theorem 1*. For case (*ii*), *ii*) is larger than the one for case (*i*). By this figure, a practical recommendation of the threshold *θ* may be 0.85, which has been used for obtaining images displayed in Fig. 2 *E* and *F*.

### Evaluating Marginal Likelihood.

It is of importance to calculate the marginal likelihood in the process of likelihood maximization. Let **1**], where *α*-stable law with index *α* close to 1, and the convergence is very slow at rate

Suppose we want to evaluate the marginal likelihood *θ* and variance 1 for a sample *δ* is a positive constant. Let*Theorem 2.2*, it follows that

As displayed in Fig. 4, the convergence rate of *α* is close to 1. From Fig. 4, it can be seen that **24**] has a faster convergence rate to the two-term approximation in [**25**]. It is noted that this two-term approximation converges to the marginal likelihood

Similar results are obtained for different values of *δ*, although rate increases with less accuracy or decreases when *δ* is larger or smaller than 1.5, e.g.,

## Appendix: Proof of Theorem 1

First we prove the case **6**], and the distribution of **7**] and [**8**] where **7**] and [**10**], **9**]

Using Taylor expansion, we have**8**] and [**10**]

Because **8**] and [**10**]. In sum, we have

## Acknowledgments

This work was partially supported by the Natural Sciences and Engineering Research Council of Canada.

## Footnotes

- ↵
^{1}To whom correspondence should be addressed. Email: crr1{at}psu.edu.

Author contributions: C.R.R. designed research; C.R.R., X.S., and Y.W. performed research; X.S. and Y.W. analyzed data; and C.R.R., X.S., and Y.W. wrote the paper.

The authors declare no conflict of interest.

## References

- ↵.
- Hamerly G,
- Elkan C

*Proceedings of the 11th International Conference on Information and Knowledge Management*(ACM, New York), pp 600–607 - ↵.
- Iman RL

- ↵
- ↵.
- Zhang B,
- Hsu M,
- Dayal U

- ↵.
- Pinto JE,
- Henry E,
- Robinson TR,
- Stowe JD

- ↵.
- Lim MCH,
- McLernon DC,
- Ghogho M

*IEEE International Conference on Acoustics, Speech, and Signal Processing*(Institute of Electrical and Electronics Engineers, Taipei, Taiwan) pp 2381–2384 - ↵.
- Jones CM

- ↵
- ↵
- ↵.
- Shi X,
- Wang X-S,
- Reid N

- ↵.
- Newton MA,
- Raftery AE

- ↵.
- Gnedenko BV,
- Kolmogorov AN

- ↵.
- Ibragimov IA,
- Linnik YV

- ↵.
- Hall P

- ↵.
- Berkes I,
- Tichy R

- ↵
- ↵.
- Wolpert RL,
- Schmidler SC

*α*-Stable limit laws for harmonic mean estimators of marginal likelihoods. Stat Sin 22(3):1233–1251 - ↵
- ↵

## Citation Manager Formats

## Sign up for Article Alerts

## Article Classifications

- Physical Sciences
- Statistics

## Jump to section

## You May Also be Interested in

*Left*); © Bioimaging at The Pirbright Institute (

*Right*).