How can I calculate the median in a gamma distribution?
Solution 1:
User TwistedSim answered my question.
You need to find the value
m
for which the integral from 0 tom
give you 0.5. You can do that withc = cumsum(f)*dx
wheredx = 0.01
in your case. After it's just a matter of usingfind(c>0.5, 1, 'first')
.