http://dougkerr.net/Pumpkin/articles/Split_Prism.pdf
Next, we should learn that every lens has spherical aberration, this is the chart for the luxury Zeiss Planer 85/1.4 (which was available in ZK Mount):-

via the Chinese Xitek Pentax Forum
Take this as an example, we can see the maximum deviation of focus can vary as large as 0.13mm, i.e., 130um. As such, when an AF sensor is measured near the centre of the glass, i.e., the case of all Pentax DSLRs, the errors could be very significant when the lens is opened wider, where the focus is shifted largely.
With a "f/2.8" AF sensor, the AF is measured more to the boundary of the glass, such that the measurement is more accurate and it is always more realistic to do so, as for larger apertures, most of the light is coming from the boundary, but not the centre.
Of course, Pentax could input the spherical aberration error for each of the original Pentax AF lens such that the DSLR body can compensate. I have no concrete information about this anyway. But however, even if this has already been implemented, the spherical aberration could vary from lens to lens even if it is of the same model, owing to the errors in assembling and there are no two lenses on this planet made completely identical, indeed.
As such, accurate measurement is always desirable rather than guess works. That's why Live View CDAF always produces more accurate AF results than Phase Matching AF as it is just WYSIWYG (What You See Is What You Get) of which the sharp focus is detected with the projected image on sensor.
Related:-
Focus Calibrations for (Pentax) (D)SLR Bodies and Lenses
keithj · 731 weeks ago
But you're right, another plus for contrast-detect autofocus.
elgreen · 731 weeks ago
keithj · 731 weeks ago
It's interesting that it happens also with 3rd-party lenses - to me, this implies that it's not anything to do with spherical aberration (why would Pentax be going out of their way to make someone else's lens perform better?). So it's a bit of a mystery...
Dave · 465 weeks ago
if i focus @ 2.8 and after that i close i.e. @ f8 without refocusing, the pic is perfect. I'd like to disable the K5 'automatic focus shift compensation' but this is in the firmware, that in my case, makes the wrong thing.
Binhe · 505 weeks ago
RiceHigh 110p · 505 weeks ago