You're missing the other half of the picture. How many were deterred because of prison? Would it have been 2 or 5 or 10% were it not for the deterrents? You can't say.
All the science points to preventing initial conditions for conviction and significant improvements needed post release.
http://www.slate.com/articles/business/the_dismal_science/20...
https://nij.gov/five-things/Pages/deterrence.aspx
https://www.nij.gov/topics/corrections/recidivism/Pages/welc...