When finding the [[Average]] of a [[Discrete]] set, you take the sum of all elements and divide by the number of elements.
$\huge \op{avg}(S) = \frac{1}{|S|} \sum^{|S|}_{i} S_{i} $
But for finding the average of a [[Function]] over a [[Continuous]] [[Interval]], you would need to find the [[Limits|limit]] of the average as you add more and more samples.
To find the [[Average]] of a [[Function]] over the [[Interval]] $[a,b]$:
$\huge \begin{align}
\let \Delta x &= \frac{{b-a}}{N} \\
\frac{1}{b-a}\lim_{N\to \infty} \sum^N_{i=1}{
f(x_{i}^*) \Delta x
} &= \frac{1}{b-a} \int_{a}^b f(x)\d{x}
\end{align}
$