A $3.20 jar looks cheaper than a $7.20 jar, but if the small one holds 16 oz and the big one 40 oz, you pay $0.20 per ounce for the small jar and $0.18 for the big one.
Package sizes vary so much that the shelf price on its own rarely tells you which is the better value.