In short, Phelps’s leading position was weakened due to low support in the postal and pre-poll vote but she rebounded after some errors were identified in the election-night counts.

Phelps won a clear majority of votes cast at local polling places on election day. She managed 54% of the vote after the distribution of preferences. Yet she did much worse on pre-poll and postal votes.

Pre-poll votes (which were counted late last night) strongly favoured Sharma, who managed 55% of the vote after preferences across the four main pre-poll booths. He did particularly well at Rose Bay, in the strongly pro-Liberal harbourside suburbs, while Phelps only managed a slim majority in Waverley, despite winning strong majorities in surrounding booths on election day.

Phelps backs getting children off Nauru, as Wentworth vote narrows

Read more

We are still waiting for the remainder of the postal votes to report but the first batch strongly favoured Sharma. He polled over 64% of these votes after preferences.

It is hard to know how many postal votes are left to be counted. The Australian Electoral Commission sent out 12,788 postal vote packs to voters but they won’t all be returned. So far, 5,463 postal votes have been counted, with another 1,266 waiting to be opened. Earlier today it looked likely that another strong batch of postal votes could put Sharma in front.

So the Phelps campaign will be hoping that relatively few postal votes are returned, or that the remaining postal votes are less favourable to Sharma.

Why were the postal votes and pre-poll votes so much stronger for the Liberal party? It’s normal to expect the Liberal party to do well on postal votes, but not 18% better. It’s also unusual to see pre-poll votes diverge so much from the election day vote.

It’s possible this reflects a late shift to Phelps in the final days of the campaign. It could also reflect Wentworth’s large Jewish population, some of whom would be more likely to choose to vote before election day and would likely favour Sharma.

None of this was particularly encouraging for Phelps but there is another potential issue.

Analysis of the election day results suggested there may have been a potential problem issue in two or three booths, where Phelps received much lower preference flows than in other booths.

In most booths, Phelps received around 65% to 80% of preferences from the 14 other candidates. Yet she only received 57% of preferences at Bondi Beach and 49% at Bellevue Hill.

After a day of counting, we now know that the election night counts in Bondi Beach and Bellevue Hill were indeed wrong, and the corrected results have increased Phelps’s lead by 1,000 votes.

This was likely due to a counting error at the end of a long work day with booth workers needing to distribute preferences from 16 candidates.

The AEC always ensures that votes are counted again to check for errors, so if there is an error we would expect it to be picked up in the next few days.

Antony Green (@AntonyGreenABC)

After much digging around, I've worked out the following. The AEC is currently re-counting the Bondi Beach, Bellevue Hill and Vaucluse polling places. At 3pm they will begin a count of and additional 1,200 postal votes. The result will be clearer or closer by tonight.

Following this correction, it now seems implausible for Sharma to win Wentworth. He would need almost all of the potential postal votes to be returned, and to receive a higher proportion of these votes than he has been polling so far. It seems very unlikely, but we will know if it’s possible once the next batch of postal votes is reported.

The Wentworth byelection isn't just a loss for the Liberals. It's a disaster | Katharine Murphy

Read more

Finally, why was it so hard to accurately project the result in Wentworth last night? It was particularly difficult because Phelps was a new candidate, with no history of running in the electorate.

Election projections usually compare voting returns to the data from the same booths at the previous election. This process allows you to eliminate bias in terms of which booths report first, and predict what the voting figures will look like at the end of the count.

It was possible to make some assumptions about how pre-poll and postal votes would go, compared with the election day vote, but the actual votes have so far been surprisingly strong for the Liberal party, which is the main reason why the definitive predictions last night have been replaced by more cautious analysis today.