Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

BrowserUk:

I'm pretty sure that this is the same math we played with in Re: [OT] The statistics of hashing.. I don't know how to compute the standard deviation, though. I'll have to do a bit of reading and see what I can come up with. But judging from the results from that thread, I'd expect there to be minimal overlap between two sets of 1e6 bits in 4e9 possibilities.

Update: I found my ana_2.pl script, but since I'm on a 32-bit machine, I couldn't run it with 2^32 bit vectors. (I really need to stand up a 64-bit OS and perl one day.) But I ran it with a million samples in a pair of vectors of various sizes (2^24, 2^26, 2^28, 2^30 and 2^31) and it looks like collisions shouldn't be very frequent, judging from the progression:

$ ./ana_2.pl 24 2 1000000 N=16777216, V=2, X=1000000 integral(1000000)=25166956.740071, integral +(0)=25165824 Expected collisions: 1132.74007095024 $ ./ana_2.pl 26 2 1000000 N=67108864, V=2, X=1000000 integral(1000000)=100663369.193409, integra +l(0)=100663296 Expected collisions: 73.1934093236923 $ ./ana_2.pl 28 2 1000000 N=268435456, V=2, X=1000000 integral(1000000)=402653188.613027, integr +al(0)=402653184 Expected collisions: 4.61302703619003 $ ./ana_2.pl 30 2 1000000 N=1073741824, V=2, X=1000000 integral(1000000)=1610612736.28892, integ +ral(0)=1610612736 Expected collisions: 0.288918733596802 $ ./ana_2.pl 31 2 1000000 N=2147483648, V=2, X=1000000 integral(1000000)=3221225472.07225, integ +ral(0)=3221225472 Expected collisions: 0.0722546577453613

...roboticus

When your only tool is a hammer, all problems look like your thumb.


In reply to Re: [OT] Statistics question. by roboticus
in thread [OT] Statistics question. by BrowserUk

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others pondering the Monastery: (7)
    As of 2014-12-25 06:38 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      Is guessing a good strategy for surviving in the IT business?





      Results (159 votes), past polls