Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
Back to noise and the number of samples .... by taking more samples you increase the signal to noise ratio. Why? because "noise" has a tendency to mathematically cancel it self out, while a true signal within the noise has a tendency to accumulate or re-enforce itself the more samples that are taken. The general formula for an increased signal to noise ratio by ensemble averaging is essentially the square root of the number of samples taken. .... i.e. With TWO samples your signal to noise ratio becomes 1.41 to 1 ... FOUR samples 2:1 .... TEN samples 3.16:1
I might add in some cases you want to avoid any division i.e. adding two numbers and dividing by 2 to obtain an average of the two numbers. The reason is that this will introduce a compounding error by truncation and you will loose data in the process. If you must only perform the division at the end or for display purposes (human readable feedback) only. Otherwise use an Accumulator to hold ALL of the raw data being sampled.
Similar techniques can be used to turn the LSB (Least Significant Bit) into fractional bit data that is useful .... You know the annoying bit on the end that bounces from a 1 to a 0 and is never stable that most people just truncate to minimize the fluctuation?..... If it were truly random, that bit would be ON 50% of the time and OFF the other 50% of the time. Any bias or "signal" to the system would persuade that 50/50 percentage one direction or the other. By taking several samples (sometimes hundreds or thousands) you can measure the bias any external influence might be introducing to the LSB. I have used this technique on angular rate sensors to utilize buried data below the noise floor to minimize drift error with pleasing results.