In contrast, those who were unaware the sweet treats were going to end rated it top in only 22 per cent of cases.
The fact that the chocolates were rated one by one, rather than all together at the end of the experiment, means the results cannot be explained by difference in recall.
University of Michigan researcher Ed O'Brien said: "Endings affect us in lots of ways and one is this 'positivity effect'. It is something motivational. You think, 'I might as well reap the benefits of this experience even though it is going to end' or, 'I want to get something good out of this while I still can'."
It is also possible that we have become used to expecting endings to be happy.
"Many experiences have happy endings - from the movies and shows we watch to dessert at the end of the meal - and so many people may have a general expectation that things end well, which could bleed over into these unrelated or insignificant judgments,"O'Brien said.
He said the effect could also have negative consequences. For instance, the candidate who interviews first for a job may be viewed less favourably than the last in the room. And exam candidates may suffer from having their papers at the top of the pile for marking.
DAILY MAIL