Read in the Radioactivity Data

data1= Import["http://physicsx.pr.erau.edu/MathematicaExamples/radio.csv","CSV"];

List the Data

data1[[17]]

data1

Length[data1]

Make a new data structure by peeling off the "header" information removing the "zero" data in the tail.

data2=Table[{data1[[i,2]],data1[[i,3]]},{i,17,876}]

Plot the # of radioactive decays as a function of time.  Dwell time = 1.00 sec.

g1=ListPlot[data2]

sol=FindFit[data2,a (E^(- (t/τ)))+c,{a,c,τ},t]

How well does the function fit the data?

Plot[a (E^(- (t/τ)))+c/.sol,{t,0,860},AxesOrigin->{0,0},PlotRange->{Automatic},Epilog->Prepend[Point/@data2,PointSize[0.002]]]

Calculate the half-life    (Subscript[t, 1/2])

tOneHalf=(τ/.sol) Log[2]  seconds

tOneHalf/(60.  seconds/minutes)

chiSquare=(∑_(i=1)^860)(((((data2[[i,2]]-(a (E^(- ((data2[[i,1]])/τ)))+c)/.sol)/(Sqrt[data2[[i,2]]]))))^2)

chiSq[tau_]:=(∑_(i=1)^860)(((((data2[[i,2]]-(a (E^(- ((data2[[i,1]])/tau)))+c)/.sol)/(Sqrt[data2[[i,2]]]))))^2)

Plot[chiSq[tau],{tau,215.5,216.5}]

chiSquare3[a_,c_,τ_]:=(∑_(i=1)^860)(((((data2[[i,2]]-(a (E^(- ((data2[[i,1]])/τ)))+c))/(Sqrt[data2[[i,2]]]))))^2)

sol3=FindMinimum[chiSquare3[a,c,τ],{{a,1531.},{c,55.},{τ,216}}]

ccc=sol3[[2,2,2]] ;

aaa=sol3[[2,1,2]];

Plot[chiSquare3[aaa,ccc,tau],{tau,217.9,218.7},AxesOrigin->{218.272,907.83}]

??*Axes*

??AxesOrigin