Actually the only psychological profile that wouldn't be deterred by 10 vs 5 years would be the psychopath (who is largely immune to punishment, and often regards it with complete serenity). An "average person" would make tremendous sacrifices to get 5 instead of 10. Plea bargain justice makes this clear.
A plea bargain is after the event though. If you have been caught and are likely to be convicted then 5 years sounds a lot better than 10. That has nothing at all to do with deterrent effects.
The thing is, an 'average person' has no real idea or mental model of what five years in prison actually entails. They haven't been locked up ever, even for shorter stretches, and most likely neither have their friends. Basically they know its bad, but with no frame of reference it gets left at that and filed away as irrelevant anyway since prison happens to other, bad people. So there's no way to make a risk calculation about e.g 6mo vs 5y sentences, they are both just vague bad things. Monetary fines work because people understand money and what losing a sum of money means because they deal with money all the time. I assume corporal punishment works too, since everyone has experience with pain?
Citation needed that longer sentences work as a deterrent.
The reason you don't steal from your coworkers has little to do with the sentence that would be imposed and a lot to do with your personal values: you know theft is wrong.
Edit: talking about downvoyes will always attract downvotes. HN's voting culture may not even what you're used to. People can down item for any, or for no, reason. A few people can down vote, but most people with an account can upvote. Corrective upvote will often be provided - there are people on HN who look for unfairly downvoted posts to supply corrective upvote.
If your post is downvoted and remains downvoted it means that someone downvoted it, and no-one else who read it thought it deserved different.
Phrases like [citation needed] are often going to get downvoted. Downvotes are likely because you're claiming prison is a deterrent and that longer sentences are a stronger deterrent with nothing to support that claim, while asking someone else to support their claim that longer sentences aren't a deterrent.