Skip to content

Instantly share code, notes, and snippets.

@mobeets
Last active August 29, 2015 14:05
Show Gist options
  • Save mobeets/cd787974f18c12193b4a to your computer and use it in GitHub Desktop.
Save mobeets/cd787974f18c12193b4a to your computer and use it in GitHub Desktop.
Q: Why does calculating SNR involve squaring the signal strength?

Definitions

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.)

Situation

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.

Question

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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment