MSE Calculator

The MSE calculator determines the mean square error (MSE) for a regression based on the observed and predicted values.

How to Use the MSE Calculator?

  1. 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.
  2. Press the 'Calculate' button.
  3. 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:

MSE =  
Σ(Pi - Oi)2
n

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.

MSE =  
Σ(Pi - Oi)2
n
=  
(2-5)2 + (5-3)2 + (4-7)2 + (8-6)2
4
=  
(-3)2 + (2)2 + (-3)2 + (2)2
4
=  
9 + 4 + 9 + 4
4
=  
26
4

MSE = 6.5