Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^5: Random sampling a variable length file.

by eye (Chaplain)
on Dec 27, 2009 at 07:02 UTC ( #814486=note: print w/ replies, xml ) Need Help??


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

1. There is no meaningful correlation in the ordering of the records.

How certain are you that this is true? If there is no correlation between any characteristic of interest in a record and the record's position within the file, then taking a sequential sample from an arbitrary location in the file (like the beginning) is entirely unbiased by record size. It's also a very efficient way (computationally, not statistically) to sample the file.

You ask a number of highly technical questions, like "[h]ow many records should you pick?" Answers to this typically range from rules of thumb to equations for computing a sample size that meets some specification. What to use is highly dependent on what you are trying to do. Meeting regulatory requirements is very different from monitoring operations. Can you say more about what you are trying to do?


Comment on Re^5: Random sampling a variable length file.
Re^6: Random sampling a variable length file.
by BrowserUk (Pope) on Dec 27, 2009 at 09:37 UTC
    How certain are you that this is true? If there is no correlation between any characteristic of interest in a record

    Simple. I cannot know what will be inside the file! Because the user may apply the process to any file of their choosing.

    So, Just as the polster might discover that the "random selection" they make of the populous, happens to coincidentally consist of the entire membership of some extremist political organisation, they cannot know it will until they take the sample.

    Put another way, there may be all manner of correlations, but none of them are known, and so cannot be utilised.

    So, at this point, the problem is how to take a statistically valid, random sample of records of any file, without resorting to reading the entire file. I've described the inferences to be drawn elsewhere.


    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.
      ...Just as the polster might discover that the "random selection" they make of the populous, happens to coincidentally consist of the entire membership of some extremist political organisation, they cannot know it will until they take the sample.

      A valid sample may contain every member of an extremist group or only contain records whose lengths are even numbers. What makes the sample valid is the plan for selecting the sample (and adherence to that plan). Developing a sampling plan is non-trivial. It can be aided by things we know theoretically and by observational data. But sometimes you just get atypical samples.

      In this case, I was confused by your statement in another response that "there is no meaningful correlation in the ordering of the records." This sounds like a positive assertion that there is no correlation based on order. This is quite different from the negative assertion that you don't know whether there are order related correlations.

        This sounds like a positive assertion that there is no correlation based on order. This is quite different from the negative assertion that you don't know whether there are order related correlations.

        I disagree. I cannot know if there is any correlation in the ordering of the records, therefore, for my purposes, there is no such correlation.

        Put another way, I am constructing an algorithm to process unknown data, and therefore must construct it on the basis that there is no such correlation.


        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.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (12)
As of 2014-08-01 09:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (258 votes), past polls