I read a really interesting report about a university that set out to investigate just what you ask. They gave participants a scenario:
You are in line at a bank, waiting to take out money. Suddenly, a gunman walks in and, in the course of holding up the bank, fires his gun, and you get hit in the leg. What is your reaction?
What was interesting was that the people who said "Just my luck! Typical! These things always happen to me!" were those who would class themselves as unlucky. Those who said that they were lucky, on the other hand, responded by saying things like "How fortunate! I could have been killed! I was just hit in the leg!" Luck, they concluded, depends on our own outlook and perspective rather than anything else.