# Root mean square between data and function

I'm trying to find out RMS between data and function.

data3 = Import["Downloads/data", {"Data", {All}, {1, 2}}];

model3[a_] = ampl Evaluate[PDF[NormalDistribution[x0, sigma], a]];

fit = FindFit[data3, model3[a], {ampl, x0, sigma}, a]

RootMeanSquare[data3[[All]] - Map[model3 /. fit, data3[[All, 1]]]]


I will put my data below. The results did not come out with some values, but array of values.

What is the problem?

• Unfortunately, nobody will be able to reproduce your issue because the code you have posted has very many missing definitions, including the data itself. I can only recommend that you come up with a Minimum Working Example - and read the documentation for RootMeanSquare in detail to understand how it should be used. – Carl Lange May 8 at 9:43