And I'm going to disclaim immediately any connection between the term "noise" and XP gained from logins and voting. At any rate, the discussion occurred in the chatterbox this morning (princepawn had a large hand in it) regarding the "signal" XP (gained from writeups) vs. "noise" XP (everything else) -- so I suppose this could be taken in a context where decibel levels are ordered similarly to /. rep scores.
The basic SNR formula is R = 20 * log (signal/(total - signal)).
So, for example, if your rep was 94, and 54 of those were from
writeups, your ratio would be:
20 * log (54/(94-54)) = 20 * log (1.35) = 20 * .1303 = 2.606 dB.
Note that the above assumes common logs; to use natural logs (a la perl), you need to change the 20 to an 8.68589. Which leads to our trivial code sample:
#!/path/to/perl use strict; if ($#ARGV != 2) { die "Usage: progname <total XP> <writeup XP>\n"; } my $txp = $ARGV[0]; my $wxp = $ARGV[1]; $txp =~ tr/0-9//cd; $wxp =~ tr/0-9//cd; if ((length($txp) < 1) || (length($wxp) <1) || ($wxp == 0) || ($wxp == + $txp)) { die "Unable to compute value!\n"; } my $snr = 8.68589 * (log($wxp/($txp-$wxp))); print "Signal-to-Noise ratio is $snr dB\n"; exit 0;
Spud Zeppelin * spud@spudzeppelin.com
In reply to Signal-to-Noise Ratio by spudzeppelin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |