Difficulty has two components that must be designed separately:
Absolute difficulty is the objectively measurable challenge — enemy health values, platform gap distances, time limits. It can be tuned directly by the designer.
Perceived difficulty is what the player experiences, and it diverges substantially from the absolute figure. Adams’ formula: Perceived Difficulty = f(Absolute Difficulty, Player Skill, Clarity of Goals, Fairness Perception, Consequence of Failure). A player who does not understand what to do perceives a task as harder than it is; a player who feels a failure was unfair perceives the game as harder than one who accepts the loss (Adams 2014, see source-fundamentals-game-design).
Dynamic Difficulty Adjustment (DDA) adjusts absolute difficulty in real time to track player skill — used in God of War, Max Payne, Burnout 2. Hiwiller notes that players perceive even randomised outcomes as more fair when they feel in control (Hiwiller 2016, see source-players-making-decisions).
Related: game-balance, challenge-types, flow, balance, randomness-in-games