Calculate average and the standard deviation.
Fix typo.
Add new mechanism for buffer and filter.

Signed-off-by: cctsao1008 <chiacheng.tsao@gmail.com>
Remove unused code and simplify the main function.

Signed-off-by: cctsao1008 <chiacheng.tsao@gmail.com>