Imprisonment limits what an offender can do and enjoy: that is why it represents a punishment. This loss of enjoyment is an opportunity cost but is not easy to measure. Of course one of the reasons for demanding high standards of evidentiary evidence before a person is convicted is precisely to minimise the frequency with which individuals are mistakenly convicted. The compensation paid to individuals who successfully establish that they have been wrongly imprisoned may give some indication of the scale of losses the experience is thought to have caused, although it may be compensating also fot things such as loss of reputation.
Bibliographical review: Lost Freedom to the Offender review
Costing issues: Lost Freedom to the Offender

