metropolisRatio function

Function to calculate the metropolis ratio