Its no more dangerous than say Basra , or Kabul , I'm sure you'll be fine. As Edinburgh is largely a tourist economy its best to ensure that everyone knows you are a tourist, this is best achieved by walking down the middle of the road wearing an england football shirt, waving a cross of St George flag , and a swigging from a can of special brew , whilst singing the National Anthem including the second verse* to let the natives no you arent to be triffled with.
You should also take some bolts of cloth and some coloured beads to bargain wih hostile natives , and when someone approaches you and starts talking in the native toungue you should reply loudly and slowly as if talking to an imbecile (as this has been proven by generatiomns of foreign travelers to enable foreigners to understand english)
(for the hard of thinking this advice is intened as humour and i take no responsibility if it is actually followed)
*Lord, grant that Marshal Wade,
May by thy mighty aid,
Victory bring.
May he sedition hush,
and like a torrent rush,
Rebellious Scots to crush,
God save The King.