It's probably just a simple comparison test,
Just pull out the match history profile of the entire server, filter out the matches that don't involve *'s in the chat history.
Then compare the win-loss ration between the 2 segments, the non-swearing and the swearing games.
Done.
Of course there are more complex ways to validity the stats, making sure that it only uses the matches where the cursings are typed in harmful instead of joking manner.
But I doubt they did it, considering these stats were not actually there to prove a point, but to promote certain positive mindset to the player so I wouldn't be surprised this stat is completely off by a large margin in reality, hell there might not even be a correlation between swearing and winning games who knows.