Statistical variation in a calculus setting