# Improvement of signal/noise ratio by stacking

Series Geophysical References Series Problems in Exploration Seismology and their Solutions Lloyd P. Geldart and Robert E. Sheriff 6 181 - 220 http://dx.doi.org/10.1190/1.9781560801733 ISBN 9781560801153 SEG Online Store

## Problem 6.22

Select random numbers between ${\displaystyle \pm 9}$ to represent noise ${\displaystyle N_{j}}$ and add to each a signal ${\displaystyle S=2}$. Sum 4 values of ${\displaystyle S+N_{j}}$ and determine the mean, standard deviation ${\displaystyle \sigma }$ of ${\displaystyle (S+N_{j})}$, and values of the ratio ${\displaystyle S/(S+N)}$. Repeat for 8, 16, and 32 values. Note how the mean converges toward ${\displaystyle S}$ as the number of values increases, how ${\displaystyle \sigma }$ approaches a limiting value (which depends on the statistical properties of the noise), and how the ratio ${\displaystyle S/(S+N)}$ converges toward ${\displaystyle +1}$.

### Background

The standard deviation ${\displaystyle \sigma }$ is a measure of the scatter of measured values of a quantity, large values corresponding to large variations. It is given by the equation

 {\displaystyle {\begin{aligned}\sigma =[(1/n)\Sigma (x-{\bar {x}})^{2}]^{1/2},\end{aligned}}} (6.22a)

where ${\displaystyle n}$ is the number of values and ${\displaystyle {\bar {x}}}$ is the mean value.

 20897 13007 95217 19221 15433 94882 23741 86571 20504 22169 20737 19305 71148 04035 03180 79506 12771 34806 37279 62739 31552 59282 16856 38655 31802 84283 08694 06945 19286 16924 60605 97685 26147 51379 39553 04893 25469 96469 57436 97888 42094 17446 27775 99466 63704 60957 55029 02764 91845 76174 54774 15832 04324 73597 42328 74303 58231 85798 16725 27836 89730 31886 34683 07814 57000 63721 43798 12003 04676 08367 12049 18538 96266 62439 81839 13093 22659 75018 31494 89519 22364 15913 51674 94189 10336 97801 21025 58966 40663 26197 80102 39977 78674 29634 38652 85289 47962 16594 50834 93484

To obtain a sequence of random numbers within a given range, adopt a rule for selecting digits from Table 6.22a; use this rule to get the units digit, then get the tens digit, etc. To determine the algebraic sign of each number, adopt another rule for fixing the sign, e.g., letting even/odd digits signify plus/minus, respectively.

### Solution

Using Table 6.22a, we get 32 values of ${\displaystyle N_{i}}$ and sums ${\displaystyle S+N}$ in Table 6.22b.

Writing ${\displaystyle ({\overline {S+N}})}$ for the mean of (${\displaystyle S+N_{i}}$), we get the results in Table 6.22c.

Table 6.22b. Values of ${\displaystyle N_{i}}$ and ${\displaystyle S+N_{i}}$.
${\displaystyle N_{i}}$ ${\displaystyle S+N_{i}}$ ${\displaystyle N_{i}}$ ${\displaystyle S+N_{i}}$ ${\displaystyle N_{i}}$ ${\displaystyle S+N_{i}}$ ${\displaystyle N_{i}}$ ${\displaystyle S+N_{i}}$
${\displaystyle -2}$ 0 ${\displaystyle -2}$ 0 ${\displaystyle -3}$ ${\displaystyle -1}$ ${\displaystyle +5}$ ${\displaystyle +7}$
${\displaystyle -1}$ ${\displaystyle +1}$ ${\displaystyle +1}$ ${\displaystyle +3}$ ${\displaystyle -3}$ ${\displaystyle -1}$ ${\displaystyle +8}$ ${\displaystyle +10}$
${\displaystyle +9}$ ${\displaystyle +11}$ ${\displaystyle +7}$ ${\displaystyle +9}$ ${\displaystyle -8}$ ${\displaystyle -6}$ ${\displaystyle -8}$ ${\displaystyle -6}$
0 ${\displaystyle +2}$ ${\displaystyle +2}$ ${\displaystyle +4}$ 0 ${\displaystyle +2}$ ${\displaystyle -3}$ ${\displaystyle -1}$
${\displaystyle -1}$ ${\displaystyle +1}$ ${\displaystyle -6}$ ${\displaystyle -4}$ 0 ${\displaystyle +2}$ ${\displaystyle +5}$ ${\displaystyle +7}$
${\displaystyle +9}$ ${\displaystyle +11}$ ${\displaystyle +3}$ ${\displaystyle +5}$ ${\displaystyle -4}$ ${\displaystyle -2}$ ${\displaystyle -4}$ ${\displaystyle -2}$
${\displaystyle +2}$ ${\displaystyle +4}$ ${\displaystyle -5}$ ${\displaystyle -3}$ ${\displaystyle +4}$ ${\displaystyle +6}$ ${\displaystyle -6}$ ${\displaystyle -4}$
${\displaystyle -8}$ ${\displaystyle -6}$ ${\displaystyle -1}$ ${\displaystyle +1}$ ${\displaystyle +7}$ ${\displaystyle +9}$ ${\displaystyle +1}$ ${\displaystyle +3}$
Table 6.22c. Calculated values of ${\displaystyle ({\overline {S+N}})}$, ${\displaystyle \sigma }$, and ${\displaystyle S({\overline {S+N}})}$ for different numbers of samples.
${\displaystyle \Sigma (S+N)}$ ${\displaystyle ({\overline {S+N}})}$ ${\displaystyle \sigma }$ ${\displaystyle S/({\overline {S+N}})}$
1st 4 14 3.5 4.4 0.57
1st 8 24 3.0 5.3 0.67
2nd 8 15 1.9 4.0 1.05
3rd 8 9 1.1 4.4 1.82
4th 8 14 1.8 5.5 1.11
1st 16 39 2.4 4.8 0.83
2nd 16 23 1.4 5.0 1.43
32 62 1.9 4.9 1.05

We see that as the number of samples increases, ${\displaystyle \sigma }$ approaches 4.9, ${\displaystyle ({\overline {S+N}})}$ approaches 2, and ${\displaystyle S/({\overline {S+N}})}$ approaches ${\displaystyle +1}$.