Image copyright Thinkstock

It's not easy taking opinion polls for an unprecedented election, such as the forthcoming Scottish independence referendum.

We've seen a great deal of attention given over the weekend to a poll from YouGov printed in the Sunday Times, which put the "Yes" campaign ahead by 51% to 49%, excluding the don't knows.

The first thing to say is that we should not get too excited about a single poll - another poll from Panelbase, for example, still puts the "No" campaign ahead.

The second thing is that one-off, yes or no elections present peculiar difficulties for pollsters, as the Alternative Voting System referendum in 2011 showed.

The way YouGov's polls work is that they have hundreds of thousands of people registered on their site who may be asked to take part in a poll.

The company's computer systems will take a group of people to reflect as closely as possible the electorate in terms of both demography and political views.

The responses given will then be weighted to make up for any parts of the panel that were not quite representative of the electorate.

One-off elections cause problems because it is hard to predict how big the turnout will be (although pollsters say that is more of a problem for low turnouts than high ones). With general elections, polling organisations may learn from mistakes made in previous campaigns, but with one-off elections they are breaking new ground.

So what can we learn from the last two weeks of polling? The gap between the two campaigns does seem to have narrowed to the extent that many commentators now see the referendum as too close to call.

It would certainly be a mistake to see a difference of two percentage points between the campaigns as significant.

Perhaps more significant is a less well-publicised aspect of the YouGov polling.

Because its results are taken from a panel, it can check people's responses against what they said in previous polls.

Apparently, almost half of the just over one thousand people included in each of the last two YouGov polls had taken part in another poll since January.

Looking at just the people who had expressed an opinion in the past, "in the last few weeks there has been a real and significant shift to yes", YouGov's Peter Kellner told BBC News.

One tenth of those saying "yes" now, had not said "yes" when asked previously, he said.

But while the London-based national newspaper headlines are all about saving the union, another source seems less convinced.

Gambling odds are often a good place to look for this sort of information, because they reflect views that people are prepared to back up with money.

Looking at the range of odds available on the referendum, most bookmakers are offering about 2-1 against a yes vote and about 4-11 on a no vote, which means you would have to bet £110 to make a £40 profit.

Gamblers still clearly think that no to Scottish independence is by far the most likely outcome.