>>27940730Starmie will always want max speed, where to put the other EVs and which ability to use depends on its role.
A defensive oriented set would have Recover, Scald (for burns), Rapid spin and something else. Psyshock, Reflect Type and Ice Beam are common choices.
248 HP EVs, the rest in SpA or SpD. Natural Cure means you can switch in and out on status moves, it's my ability of choice in general.
An offensive set would instead have Hydro Pump, Psychic/Psyshock, Rapid Spin and a coverage move. Life Orb is great, my item of choice.
People say Analytics is good for the 30% boost when people switch something in against it, but I still like Natural Cure here because my teams tend to be weak to status in general. It matters against very bulky stuff like Rotom, and in general it makes your predictions easier since even a neutral hit on a switch-in hurts that much more.
Investing in HP is a waste with Life Orb, so usually I go 252 SpA. You can combine SpA investment and Leftovers instead of Life Orb, but the power drop is noticeable since Starmie only has base 100 Special attack.
You can also run weird sets like Trick Choice Specs, or Toxic stall with Recover. The Reflect Type set is probably the most versatile set, since with its speed you can get up Reflect Type fast, and thus stacking weaknesses doesn't matter as much. You'll still want to be careful with your switches if you do, though.
Bring something to switch in on Electric-types, they're your worst enemy.