I hear it again and again when people talk about someone who as a really great or unusual job: “Wow, they’re really lucky to have landed that gig.” And it’s true, competition for good jobs can be fierce, and in today’s labour market, it can seem like you have to be quite lucky just to get any job.

How much does luck factor into being hired? Some people are lucky enough to know the boss (or someone who knows the boss) at a plum company. Others happen be in the right place at the right time, dropping off the perfect resume at the exact moment a hiring manager realizes they need someone.

What are the odds?

It turns out that luck can be learned. Gamblers actually think themselves into winning streaks and losing streaks all the time. Here’s what happens. Researchers for the journal Cognition analysed 565,915 bets placed by professional gamblers. They found that gamblers on a winning streak increased their odds of a next successful bet with each new win. Why? Because they were calm, confident, and they made rational, smarter bets.

Gamblers on a losing streak, however, increase their odds of another losing bet with each successive loss. This is because they fall for what the researchers call the ‘gambler’s fallacy,’ the belief that they are ‘due for a win,’ that their luck will have to turn and therefore the odds are more in their favour. Counting on that causes them to make riskier and riskier (less rational) bets is a desperate attempt to change their luck. It doesn’t work.

Luck is increased through smarter, more logical, calculated risks.

Having a connection to the boss or perfectly-timed job application would be meaningless (and the potential ‘luck’ would go unnoticed) if you didn’t actually have the ability to do the job.

I’ve been very lucky in my career. After I stopped being a travel writer, I took a job as an advertising copy writer for a small marketing company in Montreal. There, I honed the craft of researching topics, conducting interviews, and writing web content, advertising copy, online banner ads and more.

When I decided that I wanted to move on, I posted my resume on an online job board. That same day, the job board itself called me to interview for a contract position preparing all of the content for a new website they were launching for students. (This wasn’t Workopolis, by the way. It was years ago, and I would have to work my way around the web before having the chance to join the Workopolis team.)

Anyway, this was a lucky break. As a job board, this company had a vast database of resumes to choose from, but because I had just posted mine that day, chronologically, I was on top of their search list. However, if I hadn’t had the skills and qualifications that I had just spent a year acquiring at the marketing firm, I wouldn’t have come up in the search results at all.

That’s the key to luck. You have to prepare yourself in advance in order for it to matter. Opportunities are going to come up. Everyone has moments of serendipity in their lives where things just seem to come together, but those moments are opportunities lost if you’re not prepared to step into them when they happen.

The contract to build the content for the student site for that job board was due to last six months. I loved the new office, the new coworkers, and the new role. I worked hard, delivered more results than were even expected of me, and helped out with projects for the rest of the website as well. I went the extra mile because I enjoyed the work and was passionate about being part of the team.

Towards the end of my contract, the Content Manager of the overall website resigned to change cities and pursue other interests. (Oddly, I think it was ballet.) Again, I got lucky. Because I had gotten to know many people in the company, and they thought highly of my work ethic and accomplishments thus far, I was offered the role. Right place, right time.

But being in that place at that time would not have mattered if I had not stepped up and proven myself quickly over the first few months of my contract. Had I done a poor job, or even a merely adequate one, my contract would have ended. The Content Manager would have resigned, and the company would have begun looking for a replacement. I would not likely have been considered a candidate for that role. Luck aborted, opportunity missed.

So, how do you get lucky?

Don’t fall for the gambler’s fallacy. Your odds of things going better for you do not increase just because you’ve been on a losing streak for a while. They increase through hard work and smart choices.

So take any opportunity you can to learn, hone and prove your skills. This may mean taking some low-paying or volunteer, short-term or less-than-ideal jobs. But the point is to put yourself in the position to be ready for opportunity when it knocks on your door. Gain the skills, experience and connections however you can.

You can also increase the chances of getting that knock by putting yourself out there as much as possible. Have up-to-date online resumes. Large corporations have their own internal resume databases; post yours in the ones that interest you through their own career sites. Have professional and engaging online profiles on social networks. And network. Let your connections know what you are interested in and what it is that you can do.

Then keep up to date with the latest opportunities in your field. Apply often. Tailor your applications to each company and role specifically, telling them your story. Demonstrate what you can contribute and why you’re the best person for the job.

When you show up enough times prepared for an opportunity, you’ll be lucky enough to find one.

Read the full report: Carry on winning: The gamblers’ fallacy creates hot hand effects in online gambling

Peter Harris

Peter Harris on Twitter