Inspired by the definition of an integral: $\int^b_af(x)dx=\lim_{n\to∞} \Delta x \sum^{n}_{i=1} f(x^*_i)$.

I wanted to create an equation that finds the average height for all the points on an interval "a b" of a function. So I came up with this equation: $$\lim_{n\to∞}\frac{1}{n}\sum^{n}_{i=1}f(a+i\Delta x)$$ Where $\Delta x=\frac{b-a}{n}$. I noticed that the "average equation" is very similar to the definition of an integral. In fact, it is equal to $\frac{\int^b_a f(x)dx}{b-a}$ or the integral divided by distance between a and b. I was wondering conceptually why these two ideas are related in this way.

• Good job, you've arrived at the usual definition of the average of a function on an interval. It seems like you've already explained the connection between the two ideas. I don't understand what you're asking. Feb 6 '18 at 0:10
• en.wikipedia.org/wiki/Mean_of_a_function Feb 6 '18 at 0:11

An average is a sum of datapoints divided by the size of the dataset. The integral formula you gave is the continuous version of this: the integral gives the continuous sum of datapoints in an interval $[a,b]$, and $b-a$, the length of the interval, is the size of the dataset.
There is also a geometric interpretation. Let's look at the formula you gave. The integral gives the area under the function in the interval $[a,b]$. Let's say we took that area and smoothed it out so it was rectangular-shaped, with width $[a,b]$ and some height. It would be geometrically reasonable to call this height the average height of the function. And we can get the height by dividing the area (the integral) by the width ($b-a$) -- your formula.
• No, the size of the dataset is not $(b-a)$. The dataset's size is the number of subintervals in the partition. This is why the average is equal to $\sum_{i=0}^k \frac{f(a + \Delta x \cdot i)}{n}$ that is exactly $\frac{\int_a^bf(x)dx}{b-a}$ if the integral's interval is $[a,b]$ and the points in the partition are $n$. Sep 28 '20 at 3:28
Just for fun, lets relate the definition you discovered to the mean value and show that the two definitions of mean are consistent. Let our function $f(x)$ be given. Let us define a function $g(x)$ such that $f(x) = g'(x)$ (I know this is not always possible but let's pretend that $f(x)$ is nice and integrable, if it's not then defining it through an integral is not useful). Let's say that the average value of $f$ occurs at the point $x=c$. From our definition of $g$ we can say $$f(c) = g'(c)$$ From the mean value theorem we can say $$f(c)=g'(c) = \frac{g(b)-g(a)}{b-a} = \frac{\int_a^b g'(x)dx}{b-a} = \frac{\int_a^bf(x)dx}{b-a}$$ Which is the deifintion you obtained. So, our definitions of mean are consistent, Yay!