"Three hats in a row" is an example for a conclusion out of given facts and logic thinking - without direct observation.
a: Number 3 will know the colour of his own hat, if he sees the two red hats in front of him.
b: Number 2 knows he doesn't wear a red hat, if he sees a red hat in front of him. (Otherwise number 3 would have known his own colour)
c: Number 1 is sure to wear a white hat, because none of his friends was able to determine their own colour (following a and b).