Set sample size programatically.