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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.