Recent content by maka89

  1. M

    I Linear regression and probability distribution

    I got the confidence intervals to work with statsmodels. Need to figure out how to get prediction intervals as well, though. The reason I want to be able to sample, is that the regression coeficients obeys some (potentially complex) physics equation with several other parameters (That also have...
  2. M

    I Linear regression and probability distribution

    Excel is not free and the data is user specified so the script should be able to do the numbercrunching itself. I found that the statsmodels package works well for getting confidence intervals.But I still have some trouble understanding how it works and how I can sample from the distribution of...
  3. M

    I Linear regression and probability distribution

    Excel is nice, but I'm looking to use this as a means to an end in a different project, which is python based :)
  4. M

    I Linear regression and probability distribution

    I need to be able to sample from the distribution of the regression coeficients, eventually. So I try to understand what pdf to use.
  5. M

    I Linear regression and probability distribution

    Thanks! Bit rusty on the ol' central limit theorem... So, since I have two coeficients and numpy.polyfit returns a 2x2 covariance matrix, I guess I am looking at a multivariate t-distribution with n-2 degrees of freedom and the covariance matrix returned by the function .. ?
  6. M

    I Linear regression and probability distribution

    Ah. Okay. But am I right in that the two coeficients in my model has a joint multivariate normal distribution. So to get a 95% confidence interval, I suppose I have to integrate out the other coeficient that I am not looking at(And not naively just add/subtract 1.96std.devs) ?
  7. M

    I Linear regression and probability distribution

    Sklearn does not have it :( statsmodels does, but api seems kind of lame. Think numpy.polyfit with cov=True will do the trick :cool:
  8. M

    I Linear regression and probability distribution

    Sound like what I am after. Any Python library that has this ability?
  9. M

    I Linear regression and probability distribution

    I have some data that I want to do simple linear regression on. However I don't have a lot of datapoints, and would like to know the uncertainty in the parameters. I.e. the slope and the intercept of the linear regression model. I know it should be possible to get a prob. distribution of the...
  10. M

    A Probability of Surface Realization Above Black Line in Gaussian Process Puzzle

    Thanks for the answer :) Hadn't considered that angle. I will work on it some more and then write here if I post on stack exchange or solve it. I attach a new figure that is more realistic. The old one allowed all slopes on the point where the scattering occurs. This one is constraned to having...
  11. M

    A Probability of Surface Realization Above Black Line in Gaussian Process Puzzle

    No problem. Its good that you are interested at least :D So, you are right its a scalar Gaussian process with x as an index variable. E[h(x)] = 0 E[h(x)h(x')]=\sigma^2\exp(-0.5\frac{(x-x')^2}{a^2}) Never mind the indices I wrote for h and x if you find them confusing. I conceptualize it like...
  12. M

    A Probability of Surface Realization Above Black Line in Gaussian Process Puzzle

    The height is modeled as a multivariate gaussian. h_i refers to the height at the point x=x_i. The covariance function determince the elements of the covariance matrix. I.e. how to heights at different positions are correlated. The equation should be cov(h_i,h_j) =...
  13. M

    A Probability of Surface Realization Above Black Line in Gaussian Process Puzzle

    I am looking at a surface where the height is described by a zero-mean gaussian process with cov(h_1,h_2)=\sigma^2\exp[-0.5\frac{(x_1-x_2)}{a^2}]. Given that h(x=0) = 0, what is the probability that a surface realization will go above the black line going from x=0 to infinity in the figure...
  14. M

    A Can classical EM be derived from QFT?

    Thanks vanshees71, that was interesting. I did, however mean the lagrangian density for the klein-gordon or dirac field. One gets the feynman diagram vertices for EM by demanding local gauge invariance in the lagrangian of the field(i read this in chap 11.3 in griffiths introduction to...
  15. M

    A Can classical EM be derived from QFT?

    In QFT, one can derive the equations for particles interacting electromagnetically by demanding phase invariance for the field when writing down the free field lagrangian for the klein-gordon or dirac equation. Question: Does classical EM follow from this method also? (At least theoretically...
Back
Top