Predicting a switch means using available information to consider an opponent’s choice, not reading a hidden command. Both sides commit in the same turn, even if one Pokémon is faster.
After an ordinary switch, the attack usually hits the incoming Pokémon. Water typing does not grant Ground immunity, so switching to a Water type does not automatically make Earthquake miss.
Compare staying in and switching: what does your chosen move gain in each case, and what could it cost? Without behavioural data, two options are not automatically a real 50/50. Damage endpoints do not supply odds either.
When reviewing, hide the later result first and judge the information available at the time. Then reveal it and look for a response you missed.