Avoiding duplicates in statistics