What is the unit of root mean square error (RMSE)? For example if we get an RMSE of 47 from a regression model, what does it tell in terms of unit?
-
11$\begingroup$ Errors are measured in the same units as your response. Squared errors have units of your response squared. Square root of squared error is once again the same unit as your response. $\endgroup$– Gregor ThomasCommented Jul 18, 2017 at 0:14
-
$\begingroup$ For example: what if we are trying to predict a temperature of the next day learning from the past days? Will this mean 47% of our prediction is right if let's say the RMSE is 47? $\endgroup$– ArmoCommented Jul 18, 2017 at 7:06
-
5$\begingroup$ No! Nothing that has been said has anything to do with percentages. If your response (temperature of the next day) is in degrees Celsius, and your RMSE is 47, then the units of that 47 is degrees Celsius. $\endgroup$– Gregor ThomasCommented Jul 18, 2017 at 7:25
1 Answer
Let's say you have a model represented by the function $f(x)$ and you calculate the RMSE of the outcomes compared with the training set outcomes $y$. Let's also assume the outcome has some arbitrary unit $u$.
The RMSE is $$RMSE(y)=\frac{1}{N^2}\sqrt{\sum_i{(f(x_i) - y_i)^2}}$$
or expressing the units explicitly $$RMSE(y)=\frac{1}{N^2}\sqrt{\sum_i{(f(x_i)[u] - y_i[u])^2}}$$
developing this equation you get (treat u as a unitary constant that holds the units) $$RMSE(y)=\frac{1}{N^2}\sqrt{\sum_i{((f(x_i) - y_i)[u])^2}}$$ $$RMSE(y)=\frac{1}{N^2}\sqrt{\sum_i{((f(x_i) - y_i))^2 [u]^2}}$$ $$RMSE(y)=\frac{1}{N^2}\sqrt{[u]^2\sum_i{((f(x_i) - y_i))^2}}$$ $$RMSE(y)=\frac{1}{N^2}[u]\sqrt{\sum_i{((f(x_i) - y_i))^2}}$$ $$RMSE(y)={[u]}\times{\frac{1}{N^2}\sqrt{\sum_i{((f(x_i) - y_i))^2}}}$$
Notice that the part on the right is a dimensionless variable multiplied by the constant representing the arbitrary unit. So, as @Gregor said, its units are the same as those of the outcome.
-
$\begingroup$ For example: what if we are trying to predict a temperature of the next day learning from the past days? Will this mean 47% of our prediction is right if let's say the RMSE is 47? $\endgroup$– ArmoCommented Jul 18, 2017 at 7:06
-
5$\begingroup$ For those happy with a hand-waving argument, note that the wording root mean square error gives it all away. Error is residual is observed $-$ predicted. Squaring squares the units and rooting reverses that. Taking a mean leaves the units as they are. Defining error as predicted $-$ observed, as Gauss did, would give the same result. $\endgroup$– Nick CoxCommented Jul 18, 2017 at 8:46
-
1$\begingroup$ Arno's comment was answered emphatically by @Gregor below the original question. $\endgroup$– Nick CoxCommented Jul 18, 2017 at 8:47
-
$\begingroup$ You could take the percent difference of the two quantities and average it mean((predicted-y)/y) or something similar. $\endgroup$ Commented Jul 18, 2017 at 13:03