stat_identity_sample function

Generates a sample from a distribution