# Estimating the mean when there is missing data

Let's say that we have one area and in this area there are designated 5 points, $a, b, c, d, e.$ For these 5 points we count the number of a specific feature. We capture the values for two different days, for example:

$\begin{array}[t]{llllll|l} \text{date} & a & b & c & d & e & \text{sum}\\\hline \text{first day}& 10 & 20 & 30 & 50 & - & 110\\ \text{second day} & 30 & - & - & - & 30 & 60 \end{array}$

The dashes mean that we have missing data for these points. We want to find the average of the number of features for these two days.

We know that when there is missing data, it is quite unlikely that the value is zero. So, the mean $\frac {110 + 60}{2} = 85$ would lead to not a so correct result.

I can think of two approaches for this.

a) We can take the average for each point for both of the days; if for a day there is no data, we can consider that the value is the same, i.e. for point $a: \frac{10 + 30}{2}= 20$, for point $b: \frac{20 + 20}{2} = 20, \ldots$ and then we can add all the values. So, we will end up with $$20 + 20 + 30 + 50 + 30 = 150.$$

b) This approach I prefer more (but I am not sure about its correctness or if I am missing some crucial points) is to get a weighted average. So, because the first day we have more data, it seems more logical to me to give a larger weight to the sum of that date that we have more data, i.e. the first day.

So, we could say:

$$\frac{4\cdot(10 + 20 + 30 + 50) + 2\cdot (30 + 30 )} {4+2} = 93.33,$$ which means we don't take into account that much the second day, due to the large number of missing data.

I would like to know what measure is considered to be more appropriate in this case, in terms of which method is more likely to be more accurate if it makes sense at all.

If there are more elegant methods to deal with such situations, you are more than welcome to suggest them.