The Spread of AIDS

Part 1. Plotting the Data

The list AIDS, defiined below, contains the total numbers of AIDS cases reported to the Centers for Disease Control as of the dates indicated by numbers of months from the start of 1980. Enter the AIDS data.

Months = {20, 21, 24, 26, 29, 31, 35, 37, 41, 44, 49, 52, 59, 62, 67, 
          69, 73, 83, 89, 98, 119, 143, 151};
NumCases = {110, 129, 220, 257, 439, 514, 878, 1029, 1756, 2057, 
          3512, 4115, 7025, 8229, 12067, 14049, 16458, 28098, 36058, 56575, 
          113891, 202843, 226252};
AIDS = Thread[{Months, NumCases}]

The next command plots the data ponts.

ListPlot[AIDS, 
        PlotStyle -> {RGBColor[0, 0, 1], 
            PointSize[0.015]}];

Mathematica uses the command LogListPlot to construct a semilog plot.  (Note we needed to load a package for this function to be available.)  Enter the LogListPlot command.  Answer the questions in step 2 after the plot.

<< Graphics`Graphics`

LogListPlot[AIDS, 
        PlotStyle -> {RGBColor[0, 0, 1], 
            PointSize[0.015]}];

Answer step 2 here.

Enter the LogLogListPlot command, and answer step 3 after the plot.

LogLogListPlot[AIDS, 
        PlotStyle -> {RGBColor[0, 0, 1], 
            PointSize[0.015]}];

Answer step 3 here.

Part 2. Finding a Model Function

Type response here for step 1.

Use the following evaluation cell to do your calculations for steps 2 and 3. Then enter your parameter values and function definition in the appropriate commands.

a=  ;(* Enter the value of a here *)
b=  ;  
f[t_]:=  ;

Part 3. Checking Your Model Function

Step 1. Change the following commands either to semilog or log-log ploting commands, whichever is appropriate, and plot your model function with the data.

AIDSplot  =  
        ListPlot[AIDS, 
          PlotStyle -> {RGBColor[0, 0, 1], PointSize[0.015]}, 
          DisplayFunction -> Identity];
Modelplot  =  
        Plot[f[t], {t, 20, 151}, PlotStyle -> {RGBColor[0, 1, 0]}, 
          DisplayFunction -> Identity];
Show[AIDSplot, Modelplot, 
        DisplayFunction -> $DisplayFunction];

Step 2. Enter the following commands to construct the Cartesian plots.  Then comment on the extent to which your model function represents the data.

AIDSplot  =  
        ListPlot[AIDS, 
          PlotStyle -> {RGBColor[0, 0, 1], PointSize[0.015]}, 
          DisplayFunction -> Identity];
Modelplot  =  
        Plot[f[t], {t, 0, 151}, PlotStyle -> RGBColor[0, 1, 0], 
          DisplayFunction -> Identity];
Show[AIDSplot, Modelplot, 
        DisplayFunction -> $DisplayFunction];

Write your comments here.

Step 3. The next block of commands will construct and plot an array of residuals from the NumCases and Months arrays, using your model function.

residuals = 
        NumCases - 
          Table[f[Months[[k]]], {k, 1, Length[Months]}];
resdata  = Thread[{Months, residuals}];
residualsplot =  
        ListPlot[resdata, 
          PlotStyle -> {RGBColor[0, 0, 1], 
              PointSize[0.015]}];

Do the residuals look relatively small?

Step 4. The next block of commands will construct the relative residuals array from the residuals array and then plot the relative residuals.

relresiduals = 
        Table[residuals[[k]]/NumCases[[k]], {k, 1, 
            Length[NumCases]}];
relresdata = Thread[{Months, relresiduals}];
relresidualsplot = 
        ListPlot[relresdata, 
          PlotStyle -> {RGBColor[0, 0, 1], 
              PointSize[0.015]}];

How would you describe the relative residuals?  What does this tell us about the sizes of the residuals?

Part 4. Summary

Answer the questions in part 4 here.  Use an evaluation cell for calculation as necessary.