The goal of autofocus is to enable a digital camera to capture sharp images as accurately and quickly as possible in any lighting condition without human intervention. Recent developments in mobile imaging seek to embed phase-detection sensor pixels into the image sensor itself because these phase-detection sensors are able to provide information for controlling both the amount and the direction of lens offset and thereby expedite the autofocus process. Compared to the conventional contrast-detection autofocus algorithms, however, the presence of noise, the lack of contrast in the image, and the spatial offset between the left and right phase sensing pixels can easily affect phase detection. In this paper, we propose to address the issue by characterizing the relation between phase shift and lens movement for various object depths by a statistical model. Experiments are conducted to show that the proposed method is indeed able to improve the reliability of phase-detection autofocus.