In this paper we consider the use of an X -chart for controlling a single-stage process. The three controllable variables, as usual, are the interval between consecutive samples, the sample size, and the distance away from the in-control process mean at which the control limits are placed. Costs considered are those of sampling, false alarms, operating when the process is out-of-control, and identification of underlying causes/putting process back in control. Most importantly, we take account of process improvement (reduction in the frequency of out-ofcontrol situations) as causes are determined and possibly eliminated. An optimal procedure for dynamically setting the values of the three control parameters is presented and compared over a wide range of numerical examples with two simpler approaches. There are substantial cost savings associated with taking account of process improvement.