i've been calling on trudeau to resign for years, but my analysis of the situation is rather different. i do have a math degree, and i have worked in polling. i tend to provide alternate analyses of the mainstream polling media.
if you look at the raw numbers, the conservatives were actually relatively flat, but the liberal numbers completely caved in. turnout was down 20%. these two things, together, indicate that what happened was more along the lines of that the liberals couldn't get their vote out rather than that there was some kind of massive swing right.
this is certainly cause for alarm, if you're a liberal (and i'm not), but there are a lot of reasonable explanations. it was game 7 in the stanley cup finals and with a canadian team, and perhaps the conservative base was a little more devoted to their cause than the liberal base. there were some concerns about trudeau's hamas sympathizing messaging (including repeating hamas blood libel propaganda, probably from facebook) in a very jewish riding, and that may have kept a lot of voters home. it's also worth pointing out that the liberal candidate was parachuted in, and replaced somebody with deep ties in the community, who was also rather clearly pushed out to make way for one of trudeau's friends. trudeau and his parachuted-in candidate may have been punished for kicking a popular elder out and replacing her with a backroom party operative that nobody knew anything about.
the liberals are certainly in trouble, but the national polling in canada is very difficult to distribute correctly, which is a point i've tried to help with and had some impressive results with. the liberals could conceivably win a majority and lose the popular vote. for that reason, they shouldn't freak out too much from bad national polling. yet, that is why this byelection was supposed to be helpful. unfortunately, the actual reality is that the byelection has too many anomalies to expect it to be representative, and i would advise avoiding using it to predict much of anything.
the lesson the liberals should learn is to stop parachuting in these backroom party hacks like this. the candidate lost because she was unknown in the riding and rejected by the voters for it. an mp's job is to represent their constituents. if they allow for a nomination in the riding, they should probably win the seat back in the general next year.