SNR = Power(signal) / Power(noise)
Power(x(t)) = average Energy(x(t)) over all t
Energy(x(t)) = the area under |x(t)|^2
(Energy/power involve squaring the signal because you are interested in the magnitude of the signal and not just its amplitude. That's it.)
Say you have a stimulus that is the sum of a signal and a noise. The stimulus for trial t=1 is s_t:
s_t = x_t + n_t
Where x_t is either 0 or A, and n(t) is normally distributed with variance sigma^2. In signal detection, your stimulus looks like two gaussian bumps: the signal-absent bump, N(0, sigma^2), and the signal-present bump, N(A, sigma^2). You're asked to discriminate between signal-present and signal-absent.
Q: What's the SNR of the stimulus?
SNR(s_t) = (1/T * sum|x_t|^2) / (1/T * sum|n_t|^2) = A^2 / sigma^2 = (d')^2
Sources: