>>28674901Pokemon begin with IVs in every stat ranging from 0-31 that are set when the Pokemon is generated. At level 100, these make a 0-31 point difference in the Pokemon's stats, so a Jolly 252 EV Choice Scarf Gyarados 1 with a speed IV of 10 will be 21 points slower than a Jolly 252 EV Choice Scarf Gyarados 2 with a speed IV of 31, or a perfect Pokemon. These are about half around level 50, so Gyarados 1 will be about 10 points slower than Gyarados 2 for most online battles.
When you breed a Pokemon, the egg gets something like 3-4 random IVs from its parents(5 with a destiny knot). It flips a coin for each stat it takes to see which parent it takes the stat from. Let's say you want a 31 IV Magikarp, Gyarados 1 has a 31 attack IV and 10 speed IV. Gyarados 2 has a 10 attack IV and a 31 speed IV, so you breed them with a destiny knot. Magikarp has 5 shots to roll attack, then flip a coin and land that it takes Gyarados 1's Attack IV. Now it has 4 shots to proceed to roll Speed, then flip a coin and land that it takes Gyarados 2's Speed IV. If both happen, then you end up with a Magikarp with an attack IV of 31 and a Speed IV of 31. If you don't hit that, breed more eggs. Repeat hatching eggs with other Pokemon that have perfect IVs and this Magikarp(who should now be Gyarados 3) until your Gyarados3's baby Magikarp rolls a full slew of 31 IVs.