Calculate the RMSE between predicted and observed values. Input your values and visualize the differences between them.
Root Mean Squared Error (RMSE):
Understanding Root Mean Squared Error (RMSE)
The Root Mean Squared Error (RMSE) is a standard way to measure the error of a model in predicting quantitative data. It represents the square root of the average squared differences between predicted values \( P_i \) and observed values \( O_i \).
Formula for RMSE
Example Calculation
Let's calculate the RMSE for the following observed and predicted values:
- Observed values: [34, 37, 44, 47, 48]
- Predicted values: [37, 40, 46, 44, 46]
Following the formula:
- Find the differences between each pair of predicted and observed values:
- Difference 1: \( 37 - 34 = 3 \)
- Difference 2: \( 40 - 37 = 3 \)
- Difference 3: \( 46 - 44 = 2 \)
- Difference 4: \( 44 - 47 = -3 \)
- Difference 5: \( 46 - 48 = -2 \)
- Square each difference:
- \( 3^2 = 9 \)
- \( 3^2 = 9 \)
- \( 2^2 = 4 \)
- \( (-3)^2 = 9 \)
- \( (-2)^2 = 4 \)
- Sum the squared differences: \( 9 + 9 + 4 + 9 + 4 = 35 \)
- Divide by the number of observations: \( 35 / 5 = 7 \)
- Take the square root: \( \sqrt{7} \approx 2.646 \)
Therefore, the RMSE for this example is approximately 2.646.
Further Reading
Attribution
If you found this guide helpful, feel free to link back to this post for attribution and share it with others!
Suf is a senior advisor in data science with deep expertise in Natural Language Processing, Complex Networks, and Anomaly Detection. Formerly a postdoctoral research fellow, he applied advanced physics techniques to tackle real-world, data-heavy industry challenges. Before that, he was a particle physicist at the ATLAS Experiment of the Large Hadron Collider. Now, he’s focused on bringing more fun and curiosity to the world of science and research online.