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...
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...
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 .. ?
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) ?
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...
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...
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...
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) =...
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...
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...
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...