We need to subtract the previous threshold here, not the previous beta.  Something like the following should do it:

~~~java
double tr = t1;
for (int i = 1; i <= beta.length; i++) {
    double trnext = (qtzValues.get(i) + qtzValues.get(i+1)) / 2;
    beta[i-1] = Math.log(trnext - tr);
    tr = trnext;
}
~~~