1. A method comprising: drilling a wellbore penetrating a subterranean formation with a drilling system; acquiring measured data from the drilling system, the measured data including a wellhead pressure of the drilling system; executing a model that includes: applying a hydraulic model to an a priori model estimate vector to produce predicted data; converting the measured data to a measured data vector; applying a randomized maximum likelihood algorithm to the a priori model estimate vector, the predicted data, and the measured data vector to produce an a posterioiri model estimates; and applying the hydraulic model to the a posterioiri model estimates to produce an a posteriori prediction and a calculated wellhead pressure set point that corresponds to a desired bottomhole pressure; and changing a wellhead pressure set point based on the calculated wellhead pressure set point.