Polly is acting out to deal with her mother's death.Polly's mother is apparently no longer around, so we'll assume she died. Being mostly serious and focused on his inventing, Professor Spark was ill-equipped to deal with a bereaved child and so buried himself in his work. Polly responded by acting out for attention. With his wife gone, Professor Spark invented Botley so that there would be someone to watch Polly while he's away. Polly's contempt for Botley stems from the fact that she sees him as a replacement for her mother. Polly got a severe scolding for that test she failed two weeks ago, so after the fun of failing another test on purpose wore off, she started to worry about what her father would say. Therefore, she decided to fix the problem the only way she could think of... by changing history! Polly isn't really a bad kid. She's just in serious need of grief counseling.