LONDON (Reuters) - The campaign to keep Britain in the European Union is 4 percentage points ahead of the "Out" campaign, though that lead has halved since February, JPMorgan said in an analysis of recent opinion polls.

While polls, which failed to predict Prime Minister David Cameron's victory in Britain's 2015 national election, have cast the June 23 referendum as too close to call, betting odds have indicated a strong probability of a vote to remain.

In an analysis of recent polling data, JPMorgan said the "In" campaign averaged 47.2 percent in the last week of April while "Out" averaged 43.3 percent with 8.1 percent who said they didn't know how to vote.

"The bottom line is that 'remain' appears to have a near 4 percentage point lead over 'leave,'" JPMorgan said in a note for clients.

"That lead has narrowed from around an 8 percentage point lead in late February, but has been reasonably stable over the last handful of weeks," the bank said.

President Barack Obama warned Britain on April 22 that it would be "in the back of the queue" for a trade deal with the United States if it dropped out of the EU, an unusually strong intervention into British politics that "In" campaigners welcomed.

JPMorgan said the polls indicated Obama’s comments had not led to "any significant shift in opinion".

Citi, Goldman Sachs, JPMorgan and Morgan Stanley have already donated six-figure sums to the Britain Stronger in Europe campaign group, sources have said, as some of the world's biggest banks fear the impact on their UK operations of a British exit.