Say I have a random dataset (generated using pareto distribution):
dataset <- rpareto(1000, shape=3, scale=100)
And I have a function f(x)