Defines commonly functionality for generating random samples of data