You don't mention when this calculation is applied, but it's likely to be done on a per-frame basis. Which means that you probably apply those inaccuracies, but they are changed so frequently around 0 mean that you simply don't see the effect.
You can bias your random calculation per hit: for example, bias = math.random(-20, 20)
and then inaccuracy = bias + math.random(-40, 40)
; you then reset bias
on each hit.
You can also move the target: calculate where the hit for the CPU should happen and them move that target randomly. For each frame you'd need to interpolate based on the ball position where your want your bat to be and because the bat target is wrong, its approach to the target will be inaccurate too, as you want.