Setting the statistical properties of a finite sample