Let's take the function $f(x)$. I know that the average value of this function over the interval $a<x<b$ can be calculated as follows: $$\int_a^b f(x)\,dx \over b-a$$
My question is, say I have another variable $y$ such that $y=g(x)$, and I calculate the average value of $f(x)$ (otherwise written as $f(g^{-1}(y))$) over the interval $g(a) < y < g(b)$, would the solution be any different? In other words, does this relation always hold true: $${\int_a^b f(x)\,dx \over b-a} = {\int_{g(a)}^{g(b)}f(g^{-1}(y))\,dy \over g(b) - g(a)}$$
If it does, then please provide rational and/or proof as to why. However, if it doesn't always hold true, please explain the cases where it does and doesn't hold true and provide rational and/or proof for both cases.
Please note that I'm only concerned about functions that are continuous, differentiable, and injective (one-to-one) for the purposes of this question.
Update: To give you an idea of where I'm at with my thoughts, my initial intuition tells me that this would hold true for simple, linear $g(x)$ functions such as $g(x) = 3x$ or $g(x) = -2x + 7$. But then again, I may be wrong. It is also unclear to me whether or not it would hold true for more complex functions such as polynomials or exponentials.
Further Note: Originally, I asked if the following relation always held true: $${\int_a^b f(x)\,dx \over b-a} = {\int_{g(a)}^{g(b)}f(y)\,dy \over g(b) - g(a)}$$
However, as was pointed out to me, that was not the question I meant to ask. It seems that I forgot that the difference between $f(y)$ and $f(x)$ was actually a matter of substituting the function $g(x)$ for the variable $x$ in the expression of the function, therefore not retaining the function's original behavior with respect to $x$. For instance, it would be the difference between $f(x) = 3x + 2$ and $f(x) = 3(e^x + 5) + 2$ (given $y = g(x) = e^x + 5$).
Instead, I only meant to change the variable the function was being integrated with respect to, while retaining its original behavior with respect to the $x$ variable. In other words, I would only be plotting the function on a different scale as determined by the new variable $y$ that I would be using. Since I will still be integrating the original $f(x)$ function, the most I can do is to change my notation from $f(x)$ to $f(g^{-1}(y))$ (given that $y = g(x)$, so $x = g^{-1}(y)$).
You know that for $g$ differentiable and invertible, $\int_a^b f(x)g'(x)\,\mathrm{d}x = \int_{g(a)}^{g(b)} f(g^{-1}(y))\,\mathrm{d}y$ by substitution.
Case 1: $g'(x)$ is constant in $x$, i.e. $g(x) = c_1x+c_0$. Then, $g'(x) = c_1$ and $g(b)-g(a) = c_1(b-a)$, so $$\frac{\int_{g(a)}^{g(b)} f(g^{-1}(y))\,\mathrm{d}y}{g(b)-g(a)} = \frac{c_1\int_a^b f(x)\,\mathrm{d}x}{c_1(b-a)} = \frac{\int_a^b f(x)\,\mathrm{d}x}{b-a}$$
Case 2: $g'(x)$ is not constant in $x$, e.g. $g(x) = c_2x^2$ (for this purpose, let $0\leq a < b$). Then, $g'(x) = 2c_2x$ and $g(b)-g(a) = c_2(b^2-a^2)$, so $$\frac{\int_{g(a)}^{g(b)} f(g^{-1}(y))\,\mathrm{d}y}{g(b)-g(a)} = \frac{2c_2\int_a^b xf(x)\,\mathrm{d}x}{c_2(b^2-a^2)} = \frac{2\int_a^b xf(x)\,\mathrm{d}x}{b^2-a^2}$$ which is not equal to $\frac{\int_a^b f(x)\,\mathrm{d}x}{b-a}$ in general. Generally, if $g$ is a degree $n$ polynomial, then the integral in $y = g(x)$ will be in terms of the first $n-1$ moments of $f$. If we know the first $n-1$ moments of $f$ and the endpoints of $[a, b]$, then it is possible to choose $g$ in such a manner that you will have the equality you mentioned, but there is no $g$ such that your equality will hold for all $f$.