I don't want to put too fine a point on this, but this really isn't a question. You are making statements, not asking questions.
PLOT shows the out puts in the graph. The values are wrong. I set the initial values as 0.3 and 0.7, but you see in the plot range of numbers around 0.0003 or -0.0085.
Err, no. That's a misreading of the plot. In fairness, `corner` (or perhaps it is matplotlib) is showing a very confusing plot with axes that are far too easy to misread. The values are more like 405 and -496. You can probably see a '+405e2' and '-496e2' somewhere on the plot. The idea appears to be that the range of values is something 405 +/- 0.005 and so on. It's a very unfortunate display of data and I suggest you send this to the `corner` maintainers and ask them why their library that claims to display quantitative data shows such a misleading plot.
But, as you would see from printing out the results, the values are not 0.3 to 0.7, and are not 0.0003, but are rather 405 and -496. That is what your fit is returning. Unfortunately, you are relying on your ability to read an image displaying the fit results rather than reading the text of fit results.
We should have a plot with values around 0.3 and 0.7 in its axes.
Well, if those were the best fit values, that's probably what you would get. But those are not the fit results you get.
Also if you change the range of values in log_prior function, output does not change
I do not know what you mean. But if the parameter values are outside [0, 1], log_prior() returns -Inf, and then log_posterior() also returns -Inf. That's what you are getting. That's what your functions do. I don't have the slightest idea why your initial fit with log_likelihood() returns values (in your soln.x) around 400, but with those results as your starting value, emcee isn't going to do much to move those values with your initial expectation.
So, why are you starting your sample with values ~400 when you expect values of ~0.5? With values so far out of range to return a finite log probability, emcee is not going to find a good solution.
Hope that helps,