Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^10: Random sampling a variable length file.

by BrowserUk (Patriarch)
on Dec 30, 2009 at 11:51 UTC ( [id://814919]=note: print w/replies, xml ) Need Help??


in reply to Re^9: Random sampling a variable length file.
in thread Random sampling a variable record-length file.

Because there might be (for example) a time-related correlation. If the file in question were a log file running midnight to midnight, it's possible that there might be less activity at either end of the day than in the middle.

Or (for example), the file might have been previously ordered in some way that means the longer records are at the front and shorter at the end.

Whilst it is possible that a random selection picked across the length of any given file might pick all the longest (or shortest), it is far,far less likely, than likely. That's why you pick a random sample.

It is the whole basis of normal distributions, the 68-95-99.7 rule, and the associated statistics.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
  • Comment on Re^10: Random sampling a variable length file.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://814919]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2025-11-17 03:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (72 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.