How to Use the MSE Calculator?
- First, input the list of observed and predicted values. Make sure the entered list should be comma or space separated. Example: 10,15,23 or 10 15 23.
- Press the 'Calculate' button.
- Finally, the tool returns the mean square error (MSE) for a regression.
How to Calculate MSE?
The mean square error (MSE) is calculated using the following formula:
Where,
Σ = Symbol define 'sum',
Pi = Predicted value of the ith observation,
Oi = Actual or observed value of the ith observation,
n = Number of data points or sample size.
Here is an example:
Example:
Calculate the mean square error (MSE) for the actual values of [5, 3, 7, 6] and the predicted values of [2, 5, 4, 8].
Solution:
Here,
Pi = [2, 5, 4, 8]
Oi = [5, 3, 7, 6]
Apply the formula.
= |
(2-5)2 + (5-3)2 + (4-7)2 + (8-6)2 | | 4 |
|
= |
(-3)2 + (2)2 + (-3)2 + (2)2 | | 4 |
|
MSE = 6.5