This phrasing is not that specific. One way to make it specific is if the teacher instead offers
“Every morning I will let you wager on whether the test will occur with the following odds: you may bet 9 dollars to win ten dollars if the test happens that day, nothing otherwise. you may bet up to $9000 each day. The test will be a surprise, so you won’t be able to make money.”
The student then picks a bet size each morning, after which the teacher decides whether or not to give the test (except that on the last day, they must give the test if they haven’t yet. ) This is a zero sum game of perfect information, and one which the student wins by betting 9000 on friday, 900 on thursday, 90 on wednesday etc which in this formalism is the operationalization of not being surprised. The teacher is wrong, although they only are wrong by a couple of cents.
However, if the formalization of the problem is changed to where the student must make a binary choice each day (bet 9 dollars or nothing) then they are unable to profit and are therefore surprised. The teacher is right.
Make another tiny tweak: each morning the student writes their bet on a piece of paper, which must be either 0 or 9, then the teacher reveals whether the test is that day, then the student turns over their paper and money changes hands. With this version, the student wins again (proof exercise for the reader: the students winning strategy is to randomize whether to bet and 10x their odds of placing a bet each day. why is this winning?) This version is imho the nicest: In the first version, if the student plays optimally the teachers choice doesn’t matter, in the second version the teacher’s optimal strategy is simply to always give the test on the forst day the student doesn’t bet or on friday; but in the final version the teacher’s optimal strategy is very nearly to give the test 90% of the time every day, leaving the student indifferent as to whether to bet at 90% odds (i.e. the student has a correct 90% subjective provability that the test will be today, every day)
Given that the answer differs between reasonable formulations, the original problem is in my opinion underspecified.
“he will not know when the test is coming.”
This phrasing is not that specific. One way to make it specific is if the teacher instead offers
“Every morning I will let you wager on whether the test will occur with the following odds: you may bet 9 dollars to win ten dollars if the test happens that day, nothing otherwise. you may bet up to $9000 each day. The test will be a surprise, so you won’t be able to make money.”
The student then picks a bet size each morning, after which the teacher decides whether or not to give the test (except that on the last day, they must give the test if they haven’t yet. ) This is a zero sum game of perfect information, and one which the student wins by betting 9000 on friday, 900 on thursday, 90 on wednesday etc which in this formalism is the operationalization of not being surprised. The teacher is wrong, although they only are wrong by a couple of cents.
However, if the formalization of the problem is changed to where the student must make a binary choice each day (bet 9 dollars or nothing) then they are unable to profit and are therefore surprised. The teacher is right.
Make another tiny tweak: each morning the student writes their bet on a piece of paper, which must be either 0 or 9, then the teacher reveals whether the test is that day, then the student turns over their paper and money changes hands. With this version, the student wins again (proof exercise for the reader: the students winning strategy is to randomize whether to bet and 10x their odds of placing a bet each day. why is this winning?) This version is imho the nicest: In the first version, if the student plays optimally the teachers choice doesn’t matter, in the second version the teacher’s optimal strategy is simply to always give the test on the forst day the student doesn’t bet or on friday; but in the final version the teacher’s optimal strategy is very nearly to give the test 90% of the time every day, leaving the student indifferent as to whether to bet at 90% odds (i.e. the student has a correct 90% subjective provability that the test will be today, every day)
Given that the answer differs between reasonable formulations, the original problem is in my opinion underspecified.