When collecting data from a sensor, it wonʼt be very long before you need to calculate some statistics on that data such as the mean and standard deviation. A touch sensor is a good example. Its data may not be very stable and an average needs to be calculated in order to determine a valid touch. Standard deviation is another useful measurement in helping determine the quality of the data gathered.
Because of the very limited memory in microcontrollers, the luxury of storing large data sets is not possible. This article describes a means to collect such a dataset with a very small storage footprint.
Statistics on the Arduino (also Pic or any microcontroller) - [Link]