Calculation of rectifying LTPD and AOQL plans for sampling inspection by variables which minimize mean inspection cost per lot of process average quality.