Notebook
First, load the data and plot it. Note that we have years in actual years, and idx as a counter for years.
Next, obtain cumulative totals. Note that this is a slightly longwinded way of doing things, but we had an ulterior motive for wanting to use as much linear algebra as possible.
Very simple plot of cumulative sums seems to show a change point.
blah=np.zeros(111) for i in range(111): blah[i] = mprob(lambdabefore, lambdaafter, alphaprior, betaprior, gammaprior, deltaprior, i, cumsumbefore[i], cumsumafter[i]) condalpha = blah / sum(blah) m=random.choice(range(111), size=1, replace = 0, p=condalpha) print lambdabefore print lambdaafter