clear;
load strikes;
plot(t,Xt,'+',t,Xt);
suptitle('Strikes Data');
ylabel('Strikes in the USA 1950-1980')
xlabel('Time Period');
meanXt=mean(Xt);
Yt=Xt-mean(Xt);
cov=acovf(Yt,20);
cor=acorf(Yt,20);
meanXt
lag=0:1:length(cov)-1;
STATS=[lag'  cov' [1;cor']]
phi=cov(2)/cov(1)
sigma2=cov(1)*(1-phi^2)
%gamma1=(phi*sigma2)/(1-phi^2)
%cov(2)
predictor=meanXt+phi*(Xt(length(Xt))- meanXt)

