Suppose I have a population of size N (N is large, say a million), and I take a simple random sample of size 100. Denote the units in the sample as $u_1$, ... $u_{100}$.

I also know additional information about each $u_i$: an auxilary variable $x_i$. It is a catagorial variable (in my application, it's actually some user_id). Now I compute a subset of the sample in the way described in the following bullet point. My question is: is this subset still a simple random sample?

  • we randomly add units from the sample to the subset until a desired number (e.g. 10) of unique x value is added to the subset. In python-style pseudo code, the procedure is the following:
subset = []
for i in range(100):
  if number_of_unique_x_value_in(subset) < 10:
     subset.append( (u[i],x[i])  )
return subset

For example, suppose the catagorial variable $x$ have only 50 possible values, there must be some $u$ in the 100-unit sample having the same $x$ value. The above procedure keep adding units to the subset until the subset reaches 10 unique $x$ values, and therefore the size of subset can be some number greater than 10.

That's end of the question, but in case you are interested --

Why I ask this question: in my application, I need to send a sample of internet users' e-commerce product reviews to human labelers every week, in order to estimate the mean of some variable of interest among all products. However, the human labelers have limited budget --- they can only label some amount of users ever week (not some amount of reviews). And therefore I have to "trim" the simple random sample in the above way in order to not go over that amount (in our example, it's 10). I want to know if such a trimmed sample is still a simple random sample, because I am using the formula for simple random sample to estimate the mean.


  • 1
    $\begingroup$ Are you taking a sample of size 100, and from this using the first 10 unordered observations? If so then yes this would still count as a simple random sample. It is as if you never sampled the remaining 90 observations. If you order the values first, say from smallest to largest or in any other way, then it would not be considered a simple random sample. If it is safe to view the process as stationary over time without a time effect and each sample value as a time stamp, then this could be used to ensure there is no preferential ordering of the values. $\endgroup$ Nov 30 '21 at 2:59
  • $\begingroup$ @GeoffreyJohnson: I think you could make this an answer $\endgroup$ Nov 30 '21 at 4:26
  • $\begingroup$ @GeoffreyJohnson no, it's different than what you said. I am using the first K observations, where K is picked as large as possible such that the unique number of x value is 10. x is an auxilary variable whose value I already know. Please see my question description for details. $\endgroup$
    – Zero Liu
    Nov 30 '21 at 5:20
  • $\begingroup$ I added an example in the question description. Hope it helps. $\endgroup$
    – Zero Liu
    Nov 30 '21 at 5:27

No, this is not a simple-random-sample

Except in the trivial case where all the auxiliary variables are different (which means that your second step consists of choosing any ten random units), this is not a simple-random-sample. A simple-random-sample has the property that every sample of a given size is equally likely to be selected. Under your procedure this is not true; there are some samples of size ten that can be selected, and other samples of size ten that are impossible to select (i.e., any subset containing more than one data point with the same auxiliary variable).

  • $\begingroup$ Thanks for the insight! Follow-up question: if I estimate the population mean using the sample mean obtained from the above procedure, how good is the estimate ? e.g. is it unbiased? or approx unbiased when sample size is large? I should have asked this follow-up question because this is actually what I care about the most .. $\endgroup$
    – Zero Liu
    Nov 30 '21 at 21:56
  • $\begingroup$ @ZeroLiu: Then do ask it, as a separate question, referencing this post if you think it adds useful context. $\endgroup$ Nov 30 '21 at 23:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.