PHY 2048L
Lab 0

Graphical Analysis

Remember to hit the "reload/refresh" button to see changes made to this page.

Updated: 8/9/2004
 ==============

Practice with Graphical Analysis

Many of the labs produce date for two variables where theory tells us that one should be a linear function of the other. The computers in the lab have a program called Graphical Analysis on them that provides an easy interface to enter those data, make graphs of the data, and do a linear least-squares fit to the data. Best of all, the linear regression option gives us uncertainties in the fit parameters that we can use to analyze and interpret our results.

The photo belows shows what it looks like when running: The large panel on the right side is the graph, while the tall panel on the upper left contains the (x,y) data set. You might notice that one pair is highlighted; the vertical line on the graph shows which point it is.

computer running Graphical Analysis
Computer running Graphical Analysis

The steps for generating a graph like that, or the one shown below, are on a handout. There are three important details about using it, only the first of which is emphasized in the handout.

(1) You should only do the linear regression. If you also do an automatic fit as shown in the handout, you must be careful to do the regression on the data ("Y") and not on "Fit 1" as was done in the example shown in the handout. The example in the handout has bogus uncertainties. [Compare that fit to the one shown at the bottom of this page.]

(2) The data points must be entered so the x values are in increasing order or the regression program will skip some of them.

(3) You must be very careful to enter the data value that should be on the abcissa (horizontal axis = x, the independent variable) in the first column and the value that is to be on the ordinate (vertical axis = y, the dependent variable) in the second column. This sounds trivial, but most of the calculation tables in the lab manual are set up so the numbers are in (y,x) order rather than (x,y) order. Wrong order equals bogus result. You will have x = my + b rather than y = mx + b.

The graphs from this program are not pretty but they have everything you need to analyze the data:

Least-squares fit example from handout
Least-squares fit example shown in the handout

I used a pull-down menu to make the data points solid black so they would print more clearly. I strongly recommend doing this, just as you should also put a title and date on your plots so you know when they were made and what lab they came from.

A Warning:
If you contrast this fit (which is the one shown in the 10-page uncertainties handout) with the regression shown in the Graphical Analysis handout, you will see the difference between true uncertainties and ones that consist entirely of the effects of the 15-digit internal representation of floating point numbers used by the computer.

If you get uncertainties that are on the order of 10-15, you have very likely made a mistake in how you did your regression. (You managed to fit a line to another fit, not to the data themselves.) If you only do the regression and never do the automatic fit described in the handout, you will not encounter this problem.

Aside: Although I don't recommend doing a least-squares fit on a TI-83 calculator (because you do not get the uncertainties in the slope and intercept and the graph is basically useless), I do have a pdf file on least-squares fitting with the TI-83 available here.

 
 ==============

 ?? Contact me if you have any questions.