Confusion with the definition of mean value For some reason the formula for mean started to trouble me: 
$$\mu  = \frac{1}{b-a}\int_a^b f(x)\:dx$$
The reason this confuses me a bit is because when I read this formula I read it as: $\text{Mean} = \frac{\text{Area}}{\text{Length}}$. I've used to the idea that mean is the average value of a set of numbers e.g. $\frac{1+2+3+4+5}{5} = 3$. Should I interpret this value as the average area under a curve or as the average value of a set function values? Picture will point out my question:

Hope I made my question clear :) Does mean value always equal $\text{Mean} = \frac{\text{Area (or volume)}}{\text{Length}}$. The definition confuses me because the integral doesn't equal the sum of function values $f(x)$, it is the area under the curve. This might be a very simple question but nonetheless confused me x) 
 A: You can also think of the mean value of $f$ on $[a, b]$ as the average height of $f$ on the interval $[a, b]$. That is, $\mu$ is the unique constant which (when interpreted as a constant function) has the same integral as $f$ over $[a, b]$. Just like the mean of $k$ numbers is the unique number which (when interpreted as a collection of $k$ numbers) has the same sum as the sum of the $k$ numbers.
A: Try plotting your example of $$\frac{1+2+3+4+5}{5}=\mu$$
$$\mu  = \frac{1}{5-1}\int_1^5 x\:dx =\frac{12}{4}=3$$
A: An integral is a generalization of a sum - or, more precisely, it is the limit of a sum of function values, as the spacing between the points where you sample the function goes to zero.
Incidentally, this is why the integral sign $\int$ is an elongated $s$ - it stands for the Latin word summa, meaning sum.
I'll be a little imprecise here, as I don't think a fully rigorous treatment is what you need at this point. But the idea is to partition the interval $[a,b]$ into a sequence of values
$$a = x_0 < x_1 < \dots < x_{n-1} < x_n = b$$
and define a sum over function values as
$$I = \sum_{i=0}^{n-1} f(x_i) (x_{i+1} - x_i)$$
It is a sum of the values of the function, multiplied by the distance between adjacent values of $x_i$ (i.e. it is height times width, which is why you can interpret it as an area).
As the spacing between adjacent values of $x_i$ goes to zero, the value of the sum approaches the value of the integral.
A: Consider what you are looking at in the picture you have included here.  The "mean" that you are referring to is the mean value of the function over the interval $[a,b]$.  In other words, the mean is the answer to the question, "If I imagined the interval as a bucket, and the function represents the level of sand filling that bucket, what height would the sand settle to if I made it level across the width of the bucket?"
This interpretation is also valid in the discrete case.  Suppose I took the interval from $a$ to $b$ and divided it into $n$ subintervals of equal width.  For each subinterval--which is like a "sub-bucket"--I fill it with sand up to the level of the function's height.  Now I can add up the total heights for each sub-bucket and divide by the number of buckets $n$, and I get an average height of sand across all the buckets.  If I do this for very large $n$, the result will approach the continuous case I described above.
A: Let us call $\mu$ the mean. The colored area on your picture is equal, by definition, to $$A=\mu\times(b-a).$$
$A$ is therefore the area of a rectangle of basis $(b-a)$ and height $\mu$.
If you draw the horizontal line of ordinate $\mu$ on the graph, the excess
colored area above the line is equal to the uncolored area under the line
(try to see why). This shows that $\mu$ corresponds to the intuivive definition of the mean. 
A: Suppose in the interval [a,b] there are n partitions of equal width, where the width of each partition is Δx. So obviously
$$\Delta x = \frac{b - a}{n}$$ or
$$n = \frac{b - a}{\Delta x}$$
Of course the height of each partition would be f(xi), where xi = a + i(b-a)/n. To find the mean value of f(x) we simply add up all the f(xi) s and divide by n, as follows.
$$\mu  = \frac{\sum_{i=1}^nf(x_i)}{n} = \sum_{i=1}^n\frac{f(x_i)}{n}$$
Now we wish to show that finding the mean and dividing the area by the length are really the same operation.
$$\mu  =  \sum_{i=1}^n\frac{f(x_i)}{n} = \sum_{i=1}^n\frac{f(x_i)}{\frac{b-a}{\Delta x}} = \sum_{i=1}^n\frac{f(x_i)\Delta x}{b-a} = \frac{1}{b - a}\sum_{i=1}^nf(x_i)\Delta x$$
So for the continuous case
$$\mu = \lim_{n\to \infty} \frac{1}{b - a}\sum_{i=1}^nf(x_i)\Delta x = \frac{1}{b-a}\int_a^b f(x)\:dx$$
Note also that we could rewrite the integral as follows
$$\frac{1}{b-a}\int_a^b f(x)\:dx = \int_a^b \frac{f(x)}{b - a}\:dx = \int_a^b f(x)\frac{\:dx}{b - a} = \int_a^b \frac{f(x)}{\frac{b - a}{\:dx}}$$
where (b-a)/dx represents the (infinite) number of partitions on [a, b] that correspond to a partition width of dx.
