Evaluate prediction accuracy. Compare actual vs predicted values.
MSE is a fundamental metric for evaluating prediction model performance by measuring average squared differences between observed and predicted values.
MSE = (1/n) × Σ(yᵢ − ŷᵢ)²
Related Metrics:
Key Properties:
Gather n pairs of (actual value yᵢ, predicted value ŷᵢ). Ensure same count for both.
For each pair: eᵢ = yᵢ − ŷᵢ (actual minus predicted, can be positive or negative).
Compute eᵢ² for each error. Removes negative signs and amplifies large errors.
MSE = (Σ eᵢ²) / n. Divide sum of squared errors by total pairs to get average.
Actual: [3, 5, 2, 7, 6] Predicted: [2.5, 5.5, 1.8, 7.2, 5.5] Step 1: Calculate errors (yᵢ − ŷᵢ) e₁ = 3 − 2.5 = 0.5 e₂ = 5 − 5.5 = −0.5 e₃ = 2 − 1.8 = 0.2 e₄ = 7 − 7.2 = −0.2 e₅ = 6 − 5.5 = 0.5 Step 2: Square the errors e₁² = 0.25 e₂² = 0.25 e₃² = 0.04 e₄² = 0.04 e₅² = 0.25 Step 3: Sum squared errors Σ e² = 0.25 + 0.25 + 0.04 + 0.04 + 0.25 = 0.83 Step 4: Calculate MSE MSE = 0.83 / 5 = 0.166 RMSE = √0.166 = 0.4074
Related Tools
Linear relationship strength.
Linear correlation coefficient.
Rank correlation.
Regression fit quality.
Parabolic curve fit.
Third-degree polynomial fit.