In section 10 of his 2d Treatise on Government: On Civil Government," John Locke distinguishes between deterrence and reparation:
Besides the crime which consists in violating the law, and varying from the right rule of reason, whereby a man so far becomes degenerate, and declares himself to quit the principles of human nature, and to be a noxious creature, there is commonly injury done to some person or other, and some other man receives damage by his transgression; in which case he who hath received any damage, has, besides the right of punishment common to him with other men, a particular right to seek reparation from him that has done it: and any other person, who finds it just, may also join with him that is injured, and assist him in recovering from the offender so much as may make satisfaction for the harm he has suffered.
However, if one takes a stochastic perspective, what is needed for proper reparation can do most of the work of deterrence. The key idea is that since the perpetrator of a particular harm—say a theft—is not always detected, the perpetrator who does get caught should make restitution for all of the other chances shehe had to get away with it as well as restitution for the (realized) case of getting caught. In other words, the starting point should be reparations equal to (1/p) * (harm of offense), where p is the probability of getting caught. This makes the expected gain for a criminal and the expected loss for a victim zero.
This starting point raises many issues:
First, it is not fair for bumbling criminals who often get caught to be paying the freight for clever criminals who seldom get caught. Thus, the multiple damages factor (1/p) needs to be based on a probability specific to a type of crime and to a type of criminal. In other words, by this logic, types of criminals known to be more clever and therefore to be caught less often should pay a higher multiple of the damages.
Second, if the probability of detection is too low, many perpetrators will be partially judgment-proof: genuinely unable to pay the full amount of (1/p) * (harm of offense). Also low detection probabilities create unfairness between individual perpetrators within the same type: some get lucky and get away with it, while others get caught. So higher detection probabilities are better. Given the value of a higher detection probability, perpetrators can legitimately be required to pay their share (multiplied by 1/p) of the costs of better detection as well as of other costs of enforcement. Note that charging perpetrators for the costs of detection and enforcement enhances deterrence.
Third, the deadweight loss to society of detection and other aspects of enforcement is greater if people do not take reasonable crime-prevention precautions, such as locking their doors. Thus, there should be some incentive for people to take basic crime-prevention precautions. Insurance is a great way to organize compensation for victims that both reduces risk for victims and provides appropriate incentives for crime prevention. People get compensated immediately for their loss—whether or not the perpetrator is caught—if they have been making basic efforts toward crime-prevention. Then when multiplied recovery is made from a perpetrator, the agency providing insurance gets the part of that money that was not needed to pay for detection and other aspects of enforcement. (The insurance agency's taking over the right of recovery is called "subrogation.") If someone has failed to make basic efforts toward crime prevention, they retain the right of recovery, but get nothing if no perpetrator is caught in that instance.
Finally, as discussed at some length in Robert Nozick's Anarchy, State and Utopia, the problem of people being partially judgment-proof can justify some penalties for taking risky actions that may harm others. That is, in many cases it can be reasonable to take as the starting point not (1/probability of detection) *(harm of offense), but (probability of harm given the risky action/probability of detection) *(magnitude of harm if it occurs). This modification also makes sense from a stochastic perspective.