Yes, all stats on weapon, armour, etc. are random. They are determined when you first look at them (even if you only ID it later)
Lots of players use the trick to save before opening chests and reloading after identifying an item when they don't like the stats.