Hi Akiva,
The denominator in your code does not include cases where the DS method correctly predicts a calculation as incorrect.
I have updated your code to reflect this and you can find the notebook here: https://github.com/abhivr/public_repo/blob/main/Digit_Sum_Checker.ipynb
When I wrote the book & created the course, I estimated the accuracy of the DS method using simple probability.
The digit sum can only be a number between 1 to 9. So there are 9 possible values.
8 of these 9 possible DS values will help you catch an error in the calculation without an issue.
One out of these 9 possible values is the DS of the correct answer but it can also be the DS of the incorrect answer.
So there are actually a total of 10 possible values for the Digit sum (9 Correct DS + 1 Incorrect DS) with one number repeating in Correct DS and Incorrect DS.
So 9 / 10 (90%) the DS method correctly predicts the calculation as incorrect & correct. But 1/10 times the DS method predicts the calculation is correct when it is actually incorrect.
Hope this clarifies.