At level 3, 6, 9 and 12 a mod will increase an existing secondary stat, or gain a new one.( And always end up with 4 secondary stats after level 12)
On a green mod the one secondary stat shown will always increase at level 3 because it is the only choice. Then new stats at 6,9,12 to end up with 4 secondary stats
On a blue mod one of the 2 stats shown will increase at 3 and at 6. which one is completely random, 50% chance for each one at level 3 and level 6. At 9 and 12 new stats to end up with 4 secondary stats
On a purple mod one of the 3 existing stats will increase (33% chance each) at level 3,6,9 and a new stat at level 12
On a gold mod each stat has a 25% chance to be the one which increases at level 3. Each stats has a 25% chance to be the one which increases at level 6. At level 9 and 12 same thing, only one stat will increase and each of the 4 stats has a 25% chance to be the one.
So a level 1 gold mod with speed as a secondary stat has the most *potential* because it will have 4 chances, but the worst odds each chance at only 25%
A green mod is a guarantee increase, but also guaranteed to only increase once then get 3 other stats.
Personally I have had the best luck with blue mods. You get a 50% chance twice. thus most people's best mods are in the teens, and most of those started as blues