1. An image forming apparatus comprising: an image formation unit that forms patterns including at least small dots with a relatively small area and large dots with a relatively large area on an image forming surface of a printing medium or an image carrier; a detection unit that detects the small dots and the large dots contained in the patterns formed on the image forming surface; a determination unit that determines a statistical value indicating the graininess of the small dots detected by the detection unit, a statistical value indicating the graininess of the large dots detected by the detection unit, and a predicted value of the statistical value indicating the graininess of the large dots, predicted from the statistical value indicating the graininess of the small dots; a comparison unit that obtains a result of a comparison between the statistical value indicating the graininess of the small dots and a predetermined reference value and further obtains a result of a comparison between the statistical value indicating the graininess of the large dots and the predicted value; a selection unit that selects an image forming condition that corresponds to a combination of the result of a comparison between the statistical value indicating the graininess of the small dots and the predetermined reference value and the result of a comparison between the statistical value indicating the graininess of the large dots and the predicted value among a plurality of image forming conditions including charging conditions used when forming latent images, developing conditions used when developing the latent images, and transfer conditions used when transferring toner images formed by developing the latent images; and a correction unit that corrects the image forming condition selected by the selecting unit using a correction value corresponding to a combination of the result of a comparison between the statistical value indicating the graininess of the small dots and the predetermined reference value and the result of a comparison between the statistical value indicating the graininess of the large dots and the predicted value.