#  >> K-12 >> K-12 Basics

How to Calculate MSE

The mean square error is the average of the squared errors between actual and estimated readings in a data sample. Squaring the difference removes the possibility of dealing with negative numbers. It also gives bigger differences more weight than smaller differences in the result. Mean square error is widely used in signal processing applications, such as assessing signal quality, comparing competing signal processing methods and optimizing signal processing algorithms.

Instructions

    • 1

      Find the difference between the actual and estimated data points in a sample. For example, if you have developed an algorithm for predicting stock prices, the difference between the predicted stock price and the actual price would be the error. If your algorithm predicts $12, $15, $20, $22 and $24 as prices for five stocks on a particular day, and the actual prices are $13, $17, $18, $20 and $24, respectively, then the errors are $1 ($13 - $12), $2 ($17 - $15), -$2 ($18 - $20), -$2 ($20 - $22) and zero ($24 - $24), respectively.

    • 2

      Compute the sum of the square of the errors. First, square the differences, and then add them up. Continuing with the example, the sum of the square of the errors is 13 (1 + 4 + 4 + 4 + 0).

    • 3

      Divide the sum of the square of the errors by the number of data points to calculate the mean square error. To conclude the example, the mean square error is equal to 2.6 (13 / 5).

Learnify Hub © www.0685.com All Rights Reserved