A low-pass filter may work for your application, but it is NOT giving you a true mean, just a local mean. That said, I don't know why you would want a true mean, because after a sufficiently long time the mean will basically not respond at all to new input. With a LPF you can track the input.