Okay, let's look at both Pokemon:
Alakazam
Best Stats: Sp Atk, and Spd
Decent Stats: Sp Def
Worst Stats: HP, Atk and Def
Stat Total: 500
Alakazam is one of my favourite Psychic types in the game. It has a really wide move pool and has a massive special attack stat to compliment such moves as Energy Ball and Focus Blast. It also has some great STAB psychic type moves to work with, like Psychic, Psyshock and Future Sight in order to deal massive damage to anything with a low special defense stat. It also has access to Trick, which is good for shutting down Megas in competetive.
Overall, Alakazam is a great Pokemon, and special EV training can offset its weaknesses significantly.
Now, let's look at Grumpig
Grumpig
Best Stats: Sp Def
Decent Stats: Hp, Sp Atk and Spd
Worst Stats: Atk and Def
Stat Total: 470
As you can see, Grumpig's stats are not as impressive as Alakazam's. It has low physical attack and defense, and a pretty mediocre special attack stat for a Psychic type. It seems to be mostly relying on the Special Defense, but since most of Psychic's weaknesses are physical attackers, it cannot really function as much of a tank. And unfortunately, unlike most other Psychic types, it has an average speed stat of 90, making it unsuitable for sweeping. Poor Grumpig is stuck in this grey area, and it can only become a sweeper or a tank with EV training.
On the bright side, however, Grumpig still retains a very colourful move pool to work with, with moves like shadow ball and payback available via TM. This makes Grumpig effective at countering other Psychics, because most Psychic moves are special. Another plus is its abilities, Own Tempo and Thick Fat. Own Tempo eliminates the threat of confusion, and Thick Fat gives Grumpig resistances to Fire and Ice type moves, both of which are often used in competitive battling.
In the end, I would still go with Alakazam, but that's just me. If you are prepared to put in the work to make Grumpig strong enough, go right ahead. But if you want a reliable Psychic who has a ton of attack power and speed for sweeping teams, go with Alakazam.
Hope this helped!