Skip to content
Oakfield Operator Calculus Function Reference Site

Mean

For samples {xi}i=1N\{x_i\}_{i=1}^{N},

μ=1Ni=1Nxi\mu = \frac{1}{N}\sum_{i=1}^{N} x_i

For continuous fields ff over domain Ω\Omega with measure Ω|\Omega|, the mean is μ=Ω1Ωf(x)dx\mu = |\Omega|^{-1} \int_{\Omega} f(x)\,dx.

Applies to real or complex samples with finite first moment. Output shares the same field (complex mean taken componentwise).


Linear: mean of a linear combination equals the same combination of means. Minimizes the L2L^2 error to samples among constant estimators.


For symmetric distributions around 00, μ=0\mu = 0. As NN \to \infty, the sample mean converges to the expectation when moments exist (law of large numbers).


  • Constant samples xi=cx_i=c give μ=c\mu=c.
  • For symmetric distributions about 00, μ=0\mu=0.

Variance measures second central moment around the mean; RMS combines mean and magnitude squared.


Oakfield computes means as part of its runtime field diagnostics:

  • SimFieldStats.mean_re / mean_im track the arithmetic mean of real/imag components (with mean kept as a legacy alias of mean_re).
  • These statistics are computed efficiently during diagnostics updates and are used for baseline/offset monitoring and for derived metrics.

The arithmetic mean is the canonical “average” and the finite-sample analogue of expectation in probability.

Means are ubiquitous summary statistics and also appear as minimizers of squared error among constant approximations.


  • Grimmett & Stirzaker, Probability and Random Processes
  • Cover & Thomas, Elements of Information Theory