If there is a greater amount of Special majority type weaknesses (Fire, Water, Electric, Grass, Ice, Poison, Psychic, Ghost) then I go with Sp Def (poison due to Sludge Bomb being a common Poison type move.) If there is a greater amount of physical weaknesses (Fighting, Ground, Flying, Bug, Rock, Dragon, Dark, Steel) then I choose Defense. If there is an equal amount of weaknesses on both sides, I go with HP. However, I give EVs to the stats with the highest base, because usually it is close to useless making for example Speed go up from the high 100s to the low 200s because most Pokemon would still be able to outspeed the Pokemon.