Weighted sampling functions