I repost here a brilliant note published on Quora by an anonymous contributor.
What does it mean when a girl smiles at you every time she sees you?
It’s simple. Just use Bayes’ theorem. The probability she likes you is
is what you want to know – the probability she likes you given the fact that she smiles at you.
is the probability that she will smile given that she sees someone she likes.
is the probability that she likes a random person.
is the probability that she will smile at a random person.
For example, suppose she just smiles at everyone. Then intuition says that fact that she smiles at you doesn’t mean anything one way or another. Indeed,
and we have
meaning that knowing that she smiles at you doesn’t change anything. At the other extreme, suppose she smiles at everyone she likes, and only those she likes. Then
Then we have
and she is certain to like you. In the intermediate case, what you need to do is find the ratio of odds of smiling at people she likes to smiles in general, multiply by the percentage of people she likes, and there is your answer. The more she smiles in general, the lower the chance she likes you. The more she smiles at people she likes, the better the chance. And of course the more people she likes, the better your chances are. Of course, how to actually determine these values is a mystery I have never solved.