PHY 445/6 / PHY 515/6

Solutions to Homework (Error analysis)

Submit solutions 4:00PM, 2/8/99 to Prof. Mihaly, Room B-142.
  1. Download the http://lmihaly.physics.sunysb.edu/teach/phy515/statmeth/hall.csv data file to your computer. The numbers represent voltages measured by a digital voltmeter, and recorded by computer.

    Create a histogram. Do the data follow a normal (Gaussian) distribution?

    ANSWER

    No, the distribution is not Gaussian. The histogram, and a part of the Excel spreadsheet is shown below.

  2. In performing the Compton scattering experiment, the following calibration data was taken using standard g ray sources:
    Channel Tabulated Energy (keV) source
    379.1 +/- 3.9 510.9996 22Na
    870.0 +/- 5.5 1274.5450 22Na
    25.8 +/- 1.4 32.1000 Ba X-ray
    481.8 +/- 3.3 661.6610 137Cs
    638.9 +/- 2.4 898.0460 88Y
    814.8 +/- 4.9 1173.2380 60Co
    911.4 +/- 4.1 1332.5130 60Co
    24.3 +/- 1.3 26.3450 241Am
    50.6 +/- 2.8 59.5370 241Am

    The channel numbers and their uncertainties are given in column 1 of the table. The g-ray energies (given in column 2) have been measured very precisely and for this purpose can be considered to have negligible uncertainty.

    Perform a linear fit to this data to determine the calibration, Energy=a*(channel) + b. Judging by the reduced c2 of the fit, how good is the fit? Can you determine the uncertainties of a and b?

    Make as plot of the residuals "measured - fit" (it is up to you to define what is "measured" and what is "fit"). Do you notice a trend in this plot that might suggest some way to improve your calibration?

    ANSWER

    First, you have to recognize that in this problem, the quantities are "inverted". The formula suggests that the independent variable is the Channel number, but the Tabulated energy has no error, and the Channel number has. Therefore we first express the channel number as Channelfit = (1/a)(Energy) + b/a. We will consider Energy as the x variable, and make a plot of Channel vs. Energy, with error bars on the y axis. The result of the fit is shown here:


    Although the fit looks OK, it gives a reduced c2=14.9 (the number is in cell "I6"). Something must be wrong! The plot of the residuals (Channel number - fit) indicates that there is a systematic deviation from the fit, that is much larger than the error bars. Therefore trying to figure out the error of parameters a and b is quite meaningless. An increase of the (non-reduced) c2=104.5 by 1 (the usual test for determining the error of a parameter, as described by Bevington) does not really change the fit by much - it remains equally terrible. (By the way, if nothing else works, you may argue that a possible way to get at least some idea about the error of the fitting paramaters is to look for the condition of c2=c2best + reduced c2 = (1+1/(N-P))c2best. )

    We can improve the fit by adding a third parameter. For example:
    Channelfit = (1/a)E) + b/a + g*E2
    works great! The residual plot looks OK, and we get reduced c2 = 0.69 (the number of parameters is P=3).


    At this point we may start looking for the error of the fitting parameters in a meaningful way. But let us keep in mind, that this was a calibration: it has to be done accurately, but it is only the first step of the measurement. The real question is NOT the error of parameters a, b and c. The question is, how much error will the calibration cause in the actual measurement. For most practical purposes the error of the calibration (if done properly, like in the second fit) can be deduced by looking at the residuals plot: it will be represented by a +/-1 channel number error, that has to added to the error of the actual measurement.

  3. This set of data was obtained in a diffraction measurement, by taking 10 sec counts. In a separate measurement we established that the background is 150 +/-2 counts/10sec.
    Angle(deg) Counts/10sec
    34 183
    34.1 192
    34.2 238
    34.3 372
    34.35 594
    34.4 907
    34.45 771
    34.5 574
    34.55 355
    34.6 288
    34.7 232
    34.8 189
    34.9 173

    1. Assume that the detector counts follow a Poisson distribution. Fit a Lorentzian, y = A (G/2)2/((x-x0)2+ (G/2)2), to the data by the c2 method, adjusting parameters A, x0 and G. Report the best fit results.
    2. Fix (to the best value) parameters A and G. Determine the error of the peak position by mapping c2 vs. x0 and looking for the c2min+1 points.
    3. Fix the parameter A, and determine if there is any correlation between the other two parameters. For this, you have to make a contour plot of c2 vs. x0 and G.

ANSWER

The fit of three parameters gives gives c/2)2=11.3. The data and the fit is shown here:


The best fit parameters are x0=34.420 +/- 0.002 o, G=0.082 +/- 0.002 o. The error of this quantity was determined from plotting c2 vs. G, shown below. Also shown is the surface plot of c2. The contour plot of the surface indicates that there is NO correlation between the two quantities.




This page was created by Laszlo Mihaly. Las updated 1/27/98.