# Computing RMSE (Root Mean Square Error) [closed]

I have the following data:

actual=[88,86 87,39 88,83 89,95 90,69 91,15 91,19 91,68 92,05 93,17 95,41 96,81 98,45 97,95 99,67 100,14 101,77 101,80 101,28 104,09 104,18 104,07 102,93 102,25 102,44 102,58 102,78 102,45 104,39 103,76 101,64 102,12 102,71 101,72];

forecast=[91,383 90,482 90,950 90,757 91,498 91,861 91,8267 92,230 91,010 89,943 90,463 91,345 90,098 91,724 92,228 93,583 92,935 93,900 93,880 94,732 95,410 95,070 94,016 93,417 94,065 92,991 92,551 92,649 91,821 94,460 93,665 93,317 93,256 92,644];


How can I calculate this equation in Mathematica?

• RootMeanSquare maybe? :) – Pinti Oct 23 at 8:43
• @embla Welcome to Mathematica.SE! Like Pinti wrote, RootMeanSquare[actual-forecast] should do the trick. But beware that Mathematica syntax for list is actual={88.86, 87.39, 88.83, ...}, i.e. curly braces, comma as delimiter and . as decimal comma. – Thies Heidecke Oct 23 at 10:46

actual = {88, 86 87, 39 88, 83 89, 95 90, 69 91, 15 91, 19 91, 68 92,
05 93, 17 95, 41 96, 81 98, 45 97, 95 99, 67 100, 14 101, 77 101,
80 101, 28 104, 09 104, 18 104, 07 102, 93 102, 25 102, 44 102,
58 102, 78 102, 45 104, 39 103, 76 101, 64 102, 12 102, 71 101, 72};

forecast = {91, 383 90, 482 90, 950 90, 757 91, 498 91, 861 91,
8267 92, 230 91, 010 89, 943 90, 463 91, 345 90, 098 91, 724 92,
228 93, 583 92, 935 93, 900 93, 880 94, 732 95, 410 95, 070 94,
016 93, 417 94, 065 92, 991 92, 551 92, 649 91, 821 94, 460 93,
665 93, 317 93, 256 92, 644};

N@Sqrt[Mean[Power[actual - forecast, 2]]]


137255.