code: function lnlike(theta, x, y) {
    var m = theta[0], b = theta[1], t = theta[2];
    var s = 0.0;
    for (var i = 0; i < x.length; i++) {
      var r = y[i] - (m * x[i] + b);
      s += r*r*t - Math.log(t);
    }
    return -0.5*s;
  }
docs: log-likelihood for the model y ~ N(m*x + b, 1/t)