April 7, 2007

Get excited about the negative

Posted by Ben Simo

"It is the peculiar and perpetual error of the human understanding to be more moved and excited by affirmatives than by negatives."

--Francis Bacon

Selective thinking is the practice of giving more weight and credence to information that confirms our beliefs than information that may contradict our beliefs. We are all guilty of this. We tend to easily believe data that confirms our beliefs and experience. We tend to ignore data that does not confirm our beliefs.

This confirmation bias can greatly impact our work as software testers. Testers (and developers) often test (and code) to confirm requirements are met by testing the positives. We often overlook the negatives.

Peter Wason's card problem demonstrates this. The problem involved four cards that each have a number on one side and a letter on the other. They are presented with the following values visible:





The other side of the cards is not shown.

The following claim is made: "If a card has a vowel on one side, then it will have an even number on the other."

The following question is then asked: Which cards do you need to turn over to determine if the above claim is true?

Try to solve the problem before continuing.

Research has shown that most people get the answer wrong. The majority of people believe that A and 4 must be turned over to answer the question. This suggests that most people try to confirm the positive when the question requires that we also try to disprove the statement. Both the positive and negative need to be confirmed to answer the question. Click here to see the answer.

When we test software we need verify both the positive and the negative of the requirements. We need to ensure that the software does what it should do and does not do what it should not do.



February 20, 2009  
Anonymous wrote:

I think the Wason example is wrong.

The claim is: If a card has a vowel on one side, then it will have an even number on the other.

the claim does not say anything about what happens if the the card has a consonant on it - so the associated number on the card could be either even or odd.

So the test subjects have not got it wrong - turning over A and 4 would be enough to test the Wason claim because it is only a partial claim

In logic, the claim is an implication, i.e.:

vowel implies even

i.e. the number is even whenever there is a vowel, but the number could still be even with a consonant on the card

Howver it is a common logic fallacy to infer the reverse case

even implies vowel

For Wason to be right he would need to make an unambiguous claim, i.e.:

"If a card has a vowel on one side, then it will have an even number on the other. If a card has an even number on one side it will have vowel on the other"

In this case you would need to turn over all four cards to test the truth of the claim

February 20, 2009  
Ben Simo wrote:


Yes, it is a partial claim. And only take it as a partial claim. There is no claim that even implies vowel. There is no claim about cards with consonants on either side.

So with the claim "If a card has a vowel on one side, then it will have an even number on the other." ...

Turning over the A card can expose whether the opposite side contains the required even number. Just turning over the A and finding an even number would not prove the statement. It would only be an example of the statement being correct in a specific case.

Turning over 4 is not necessary to test the claim. It doesn't matter what's on the other side of the 4.

So what about the B and 7 cards?

What if the B or 7 card has a vowel on the other side?

What if the B or 7 card has a vowel on the side we can't see. Wouldn't that disprove the claim?

The tendency to want to turn over only A and 4 demonstrates confirmation bias.


February 20, 2009  
Mark Tomlinson wrote:

How do you test for 'sometimes Y'?