Harmonic Mean for ungrouped data
Let $x_1, x_2, \cdots , x_n$
be $n$ observations on a variable
$X$. Then the Harmonic Mean of these $n$ observations is denoted
by $HM$.
Formula
The harmonic mean for ungrouped data is given by
$\dfrac{1}{HM} = \dfrac{1}{n}\sum_{i=1}^{n} \dfrac{1}{x_i}$
OR
$$ \begin{equation*} HM = \dfrac{n}{\sum_{i=1}^{n} \dfrac{1}{x_i}} \end{equation*} $$
Harmonic mean is undefined if any one value of the variable is zero.