Sampling is used to take sample of analog varying quantity. like sine wave..
To get the approximated shape. Two times sampling is required then that of freq of wave to be sampled.
As the Nyqueist 3rd rule.
There are many sampling algorithm. two point, 3 point, algorith, delta mehtod.
Average is kind of sampling and filtering techniques. Weighted sampling is also possible.
Last 5/10 sample average...