# Mean substitution of missing values

I have a dataset that has missing values and I am just testing various methods that are used to replace them for my thesis. I would like to know how does the mean substitution method works, like say I have 3 missing values in my data. For the first missing values, it calculates the mean of the known values and insert that value for the first missing data. I would like to know if the method suppose to replace all the missing values with the mean of the known values or does it do it for each missing values, say it takes into account of insert value for the first missing values and calculate the new mean to replace the next missing value?

• There is no difference. Once you insert the mean value for missing case #1, by definition you have not changed the mean of the whole set.
– mkt
Apr 7, 2018 at 8:40

Your two ways are not different: they give the same result. You can use algebra to check that $$\frac{x_1+\dotsm+x_n+\bar{x}}{n+1}=\bar{x}$$ where $\bar{x} = \frac{x_1+\dotsm+x_n}{n}$ is the mean.