Notes on Phys 272 MODELING


Every lab will have at least one modeling plot. This implies the creation of a model, a mathematical model, and an expression of that mathematical model typically 'solved for' a variable, $y$, say, for which one has an array of measured values, with experimental uncertainties, gotten by varying something, represented in the model as the variable $x$. The model is basically $ y = f(x) $. Physical theory suggests the model to the experimenter. The experimenter writes down the model in the language C, suitable for using software, specifically the web based suite of modeling routines hosted by fitteia.org.

A readme file that describes registering for a free account to use the software is here. If you haven't already signed up for an account, please do so at your earliest convenience, and before classes begin in any case.

Rather than trying to explain what is meant by modeling, I will direct you the pertinent papers written by the author of the software we'll be using, and furnish a plot below, in which a linear model with zero offset was appropriate. This graph is touched up a bit, adding a legend showing the $\chi^2$ value, the model used, and the best fit value of the modeling parameter, in this case, a perfectly transparent 'a'.
Figure 1. This arises from data taken with laser light normally directed to a multislit aperture. Linear units are in mm. There were 5 principal maxima used, and 5 displacements measured. From the value of the fitting parameter 'a', can you guess the wavelength found? The uncertainty in this measurement would arise from making a Goldilocks plot explained elsewhere and would be inserted after the '$\pm...$'
But important work lies ahead. Once we have a best fit value of the modeling parameter, a Goldilocks plot that gives us the uncertainty in that parameter, we may yet have to compare it to an experimental value of that same modeling parameter. While the model curve will give some global meaning to goodness of fit in a qualitative way, the experimental comparison remains to be done. The difference between a model determined value for some important measurable, and the calculated value of that same thing, is called a discrepancy. To what do we compare it? An uncertainty. Which one? Well, you'll probably have to calculate it. Let me explain with a hypothetical example (some of the units have been changed for the purposes of obfuscation).

Suppose you are trying measure something, we'll call it '$b$'. And in your mathematical model, your best fit parameter depends on the independent variable, mass, in this case, nonlinearly, say, $y = \sqrt{bx}$. You throw in your 4 data points in the form $x,y,\Delta y$, a 3 column matrix of experimental results. Probably you create a spreadsheet with this data and cut and paste directly into fitteia's input data buffer, shown below,
Figure 2. See $1^0$-Data: above. The 3 columns of input are $x$, $y$, and $\Delta y$, the independent, dependent, and uncertainty in the dependent variable, respectively.
and after fiddling with fitteia's defaults on the x and y axis, and letting it find the best fit of the free parameter (there may be more than one in general!) you obtain the following:
Figure 3. Measured nimblequitz (in this case, $\pm$ 1 Hz) vs mass.
Your fit isn't bad. The reduced $\chi^2_R$, sometimes written $\tilde{\chi}^2$, is $\chi^2/(N-M)$, where $N$ is the number of data points, and $M$ is the number of constraints, in this case, the one free parameter, so your $\chi^2_R \approx 0.8$. If the reduced value is close to 1, the fit is supposed to 'good'. Anyway, the model seems qualitatively a good one. Thorny questions about that remain, but let's press on.

The best value of $b$ is 2.19546. The Goldilocks plot will give you the appropriate uncertainty in it. But what do we compare $b_{best}$ to in order to arrive at a discrepancy? Well, that would be the experimental value of $b$ based on measurements. Suppose, according to the model, $b = g/(\mu L^2)$, with, of $g$ being the acceleration due to gravity, in furlongs per fortnight$^2$, $\mu$ is some weird mass density in $deniers$, I don't know, pounds per furlong, and $L$ is some length in, uh, oh yes, furlongs. You have experimental uncertainties in all of those values. You punch in the numbers and you calculate $b_{experimental} = 2.3547912 \times 10^{3} (kpound-fortnight^2)^{-1}$, which are the same units as the best fit value but off by $10^3$. I bring this up because this sort of thing happens a lot. Sometimes it's a factor of a billion (that's when you start checking to see if your data has units of $nm$ or $m$). And in this case, you find your factor of a thousand from the fact that you should've plotted the independent variable in kilopounds and not pounds, so now $b_b = 2.19546\times 10^3$ (sorry, can't keep going with the uber-long subscripts), and $b_e = 2.354712\times 10^3$ in the same units. Progress.

So do these value 'agree within experimental error'? That is, is the discrepancy is less than or equal to the uncertainty? Well, I don't know, I'd have to calculate $\Delta b_e$ by propagating uncertainty in that quantity based on the more basic, primitive uncertainties in $g$, the $\mu$ and the $L$ using standard techniques, which I wont go into here, but which I will assume you all know. Let's say the uncertainty of $\Delta b_b = 0.1$ and the uncertainty $\Delta b_e = 0.3.$ How would that comparison be written in your abstract, using significant figures appropriately, and what would you say there about agreement being 'within experimental error' or not? This question will be put to you on day 1. Have an answer ready. Once you do, you'll recognize that the modeling exercise has furnished crucial qualitative and quantitative comparisons between theory and experiment which permit the experimenter to have a defensible position on the question of whether the data taken was good or not. The experimenter will have taken an active role in coming to that opinion, and will have grown in some measure at being able to make an independent judgment about the goodness of the agreement between the model and the data. And that is important goal of these laboratory exercises.