I apologize if the question is too simple but to me it's a bit difficult to see. I have certain data, let's say data in units of mass [kg] over a range of few years. I get the input of mass every 2 days during a period of 20 years. In theory the mass should be constant over time but it has a small variation each timestep. Thus, if I plot mass vs time I have a very noisy plot. In order to analyse the results in a better way, I would like to take the average of the mass every 2 years, so my average will have units of [mass/year]. Basically I want to spread the data over time. I also would like to associate a standard deviation to this average, but I'm not sure of how to compute it, due to the units I have. The equation for the mean is basically for this case (if I'm correct):
$\frac{\sum m_i}{Period = 2 yr}$
instead of the usual equation $\frac{\sum m_i}{N}$, where $m_i$ are the masses. For example using some data:
Time Mass
[day] [kg]
2 3.5
4 2.5
6 3.7
8 3.8
10 3.7
12 3.2
14 3.7
16 3.4
18 3.7
20 3.6
If I wanted to do the same but instead of a period of every two years, every 10 days then my first two points would be (using the first equation):
Period 1: 1.72 kg/day
Period 2: 1.76 kg/day.
Now my question is how can I associate a standard deviation to each of the two past values?
I know that the standard deviation equation is: $\sqrt{\frac{1}{N} \sum (m_i - \hat{m}_i)^2}$
But with my units I don't see how to compute this. Or am I doing this in a wrong way? I think I can also just compute first the mean of the masses, using the second equation ($\sum m_i/N$)i.e.
Mean:
Period 1: 3.43 kg
Period 2: 3.52 kg
and then also estimate the standard deviation
Std:
Period 1: 0.48 kg
Period 2: 0.19 kg
and in the end I just know from the last example that in 2 days the mean for period 1 is 3.43 in two days so in 1 day it will be only half, Period 1: 1.71 kg/day and for Period 2: 1.76 kg/day and I estimate the standard deviation in the same way. Basically my question is how to use the equation for standard deviation in this case where I'm averaging over time with units rather than number of counts.
Thanks!