function [sb1,db1,hxp,dypbar,dypran] = inference(x,StdErrEst,pptdist,xp)
n=length(x);
sumxsq=x'*x;
sumx=sum(x);
sb1=StdErrEst/sqrt(sumxsq-sumx^2/n);
db1=pptdist*sb1;
xbar=sumx/n;
varx=x-xbar;
sstx=varx'*varx;
hxp=(xp-xbar)^2/sstx+1/n;
dypbar=StdErrEst*pptdist*sqrt(hxp);
dypran=StdErrEst*pptdist*sqrt(1+hxp);
end