>>15178566it picks 5 stats at random, and then from the 5 stats picks what parent at random. It can't pick the same stat twice.
So if you have both parents with a 31 stat, odds are really good that it will be 31 on the egg if you're using a knot, unless it is the single stat that was chosen to be random.