That joke and a subtle variation of it has contributed to recent research on humour, leading to a comprehensive analysis of what makes people laugh. In their paper, A Theory of Humor Elicitation (Psychological Review 1992, vol 99, pp 663-88) R S Wyer Jr and J E Collins II explain the difficulties in identifying the humour-eliciting features of a stimulus event and the cognitive elaboration of its implications, but from analysis of joke contents and responses, they deduce eight postulates, simplified as follows:
1 The concepts and schemata that comprise a particular domain of world knowledge are stored in memory.
2 A subset of the initial features implied by the joke is interpreted according to these concepts and schemata.
3 The interpretation results in expectations being formed.
4 A concept is introduced that cannot be interpreted in the same domain as the above, thus introducing incongruity.
5 The incongruity is resolved by a pragmatic reinterpretation.
In other words, something unexpected happens, causing a reassessment of what went before. Up to here, all we have is incongruity, which earlier theorists from Bergson to Freud have identified as a necessary, but not sufficient condition for humour. The next postulate adds to the picture.
6 Humour is elicited only if the inferred features of one or more of the referents of a reinterpreted stimulus are diminished in value.
The priestly tale above is now effective on two levels. First there is the diminution of language involved in reinterpretation of 'What's a quickie?' and, as the authors continue, 'the second thing to note is that the nun, who was initially assumed to be holy and to have the features typically associated with members of this social category, is diminished in value as a consequence of being a prostitute on the side'.
But what if she wasn't a nun in the first place? To test their theory, they changed the story, setting it on Hallowe'en with, instead of a nun, a woman going to a fancy dress party, in nun's garb. The diminution is lessened, but experimental results showed that people found it just as funny. Which brings us to the last two postulates:
7 The amount of humour is a monotonic inverted-U function of the time and effort required for interpretation and reinterpretation.
8 The amount of humour is a monotonic function of the amount of cognitive elaboration of the event and its implications that occurs subsequent to reinterpretation.
In other words, according to Postulate 8, the greater the incongruity the funnier the joke, but according to Postulate 7, there comes a point when the effort needed to see the point of a joke lessens its impact.
On the other hand, it could be the way they tell them.