What is the difference between rand and sample?

I fully agree with this view. The function sample refers to an operation performed on a dataset (or population) and can take weights and replacement options. The function rand is for random variables with a given distribution (e.g. Distributions.jl).

1 Like