stdDevSamp resulting same result in repeated executions

I get that stdDevSamp should be used when a sample of documents are sufficient to get essence of the documents. So the result should vary when executing aggregation query multiple times.

But that is not the case when I am executing the query from first Lab in Chapter 3. The same result is being generated everytime. Please correct me if I am wrong in understanding the stdDevSamp.

@ itssunilsid

Why do you think that the standard deviation of a sample varies? For any given set of data, the standard deviation will always be the same. See the definition here from Wikipedia.

The deviation is based on the sample, so it only changes if the sample changes.

I thought mongo would take a random sample.
Thanks for clarifying