Presentation is loading. Please wait.

Presentation is loading. Please wait.

Physics 114: Lecture 11 Error Analysis, Part II

Similar presentations


Presentation on theme: "Physics 114: Lecture 11 Error Analysis, Part II"— Presentation transcript:

1 Physics 114: Lecture 11 Error Analysis, Part II
John Federici NJIT Physics Department

2 ANNOUCEMENT We will have our midterm on TUESDAY Feb 27th during class time Closed book/ closed notes/ Bring calculator I will supply equation sheet

3 Physics Cartoons

4 Method of Propagation of Errors
Review…. Start with original relation, in this case: Use the chain rule: Here, dI represents the deviations of individual measurements : We now square both sides to give the square deviations: Finally, average over many measurements:

5 A Great Simplifier—Relative Error
Review…. Notice that we can take: And divide through by I2 = V2/R2: What about this term ? This is the product of random fluctuations in voltage and resistance. When we multiply these random fluctuations and then average them—they should average to zero! Thus, we have the final result: The general formula is Square of relative error in I

6 Other Examples For homework, you should have calculated some uncertainties for quantities made up of calculations of other quantities with their own measurement uncertainties. Let me point out a few patterns: You see the quadratic nature of the resultant error—the errors behave like the pythagorean theorem. This is a good way to think about errors, and can be a big help in estimating errors. Note the effect of powers, which expand the influence of errors of a quantity. All covariances assumed zero (i.e. u and v not correlated) error in x error in v error in u

7 MatLAB Examples CODE located in lecture11_example.m
Make random arrays u = randn(1,1000); and v = randn(1,1000); then plot v vs. u (i.e. plot(u,v,’.’)). Set ‘axis equal’ to see them on the same scale. The cloud of points form a circular pattern, concentrated in the center. Now multiply v by 2, and plot again with axis equal. The clouds form an oval cloud of points. Add 10 to u and 15 to v and replot with axis equal. Adding constants does not change the errors, only the mean. Now calculate the relative errors for u, v, and x=u.*v. Do they obey the expected relationship? Now calculate the relative errors for x=u./v. They should obey the same relationship. Do they? Look at hist(u,20), hist(v,20), hist(u.*v,20), hist(u./v,20). Now subtract 13 from v and calculate relative errors for x=u./v. What is wrong?

8 MatLAB Examples CODE located in lecture11_example.m
Make random arrays u = randn(1,1000); and v = randn(1,1000); then plot v vs. u (i.e. plot(u,v,’.’)). Set ‘axis equal’ to see them on the same scale. The cloud of points form a circular pattern, concentrated in the center. Now multiply v by 2, and plot again with axis equal. The clouds form an oval cloud of points. Add 10 to u and 15 to v and replot with axis equal. Adding constants does not change the errors, only the mean. Now calculate the relative errors for u, v, and x=u.*v. Do they obey the expected relationship? Now calculate the relative errors for x=u./v. They should obey the same relationship. Do they? Look at hist(u,20), hist(v,20), hist(u.*v,20), hist(u./v,20). Now subtract 13 from v and calculate relative errors for x=u./v. What is wrong? Standard Dev comparable to mean value…. Relative error LARGE, SNR low

9 Matlab – Adding Error Bars to Plots
>> u=10+randn(1,10); >> err_u=std(u)*ones(size(u)); % create vector of error corresponding to each data point >> errorbar(1:10,u,err_u) Side issue: How can the mean value of 10 NOT be within the range of the error bars?

10 Estimating Error As noted, the way to think about errors is to consider relative uncertainty (or percent error). If we have a 10% error in both u and v, what is the percent error in x for this expression? What if u has a 1% relative error and v has a 10% relative error? What is percent error in x then? So thinking in terms of the Pythagorean Theorem, errors are dominated by the biggest term, unless both have similar errors. What if both u and v have 10% errors, and x = uv4? error in x error in v error in u 40%, in this case

11 Reducing Error Knowing how errors propagate is very important in reducing sources of error. Let’s say you do an experiment that results in a measurement whose errors are a factor of 2 too high. You have a budget that allows you do reduce the errors in one quantity by a factor of 2. Where do you put your resources? If the relationship is then if the relative errors are equal you are doomed to failure, because you can only reduce the total by 1.4 (square root of 2). But if the relative error in u is much smaller than that in v, you put your resources into reducing the error in v. Likewise, if the relationship is then you put your resources into reducing the error in v, unless the relative error in v is already 4 times smaller than in u.

12 Physics Cartoons

13 Experimental Design – Error Analysis
In this section of material, we will demonstrate how to use error analysis in the design of experiments. Please note that the DETAILS of the experiment are not as important for this class as to the METHODOLOGY of determining which errors are DOMINATING the noise. Lets start with a simple example from an exam

14 Experimental Design – Error Analysis
Problem 4. You are given the following measurements, a=[ ]; which represent counts of an event (say cosmic rays) recorded from a detector. The counts are taken in 1 second intervals. Find: a) The mean of the sample of five measurements. Write down the equation you used. b) The standard deviation of the sample of five measurements. Write down the equation you used. c) Now, assume that you are told that there is a systematic noise in the detector which adds a background count of 11 counts/s to your data. By correcting your measurement for the systematic error, what is the CORRECTED mean number of cosmic rays detected in a 1 second interval? d) Using the results of (b) and (c), what is the Signal-to-noise (SNR) ratio for the data? e) Assuming that the experiment obeys Poisson statistics, estimate how long the time interval for detection should be so that the SNR=100 [after correction for the systematic noise].

15 Experimental Design – Error Analysis
Problem 4. You are given the following measurements, a=[ ]; which represent counts of an event (say cosmic rays) recorded from a detector. The counts are taken in 1 second intervals. Find: a) The mean of the sample of five measurements. Write down the equation you used. b) The standard deviation of the sample of five measurements. Write down the equation you used.

16 Experimental Design – Error Analysis
Problem 4. You are given the following measurements, a=[ ]; which represent counts of an event (say cosmic rays) recorded from a detector. The counts are taken in 1 second intervals. Find: a) The mean of the sample of five measurements b) The standard deviation of the sample of five measurements c) Now, assume that you are told that there is a systematic noise in the detector which adds a background count of 11 counts/s to your data. By correcting your measurement for the systematic error, what is the CORRECTED mean number of cosmic rays detected in a 1 second interval? d) Using the results of (b) and (c), what is the Signal-to-noise (SNR) ratio for the data?

17 Experimental Design – Error Analysis
OK, now we have a signal-to-noise ratio for the measurement. How do we use our knowledge of statistics to IMPROVE the measurement? e) Assuming that the experiment obeys Poisson statistics, estimate how long the time interval for detection should be so that the SNR=100 [after correction for the systematic noise]. For Poisson statistics, we know that So we want to INCREASE our measurement time interval so that the MEAN of our counts is 104. But we KNOW that there are roughly 95.2 counts per second. SO the time interval required to count 104 counts is

18 Can not I just take more data?
The previous example suggests that the way to improve the SNR ratio is to INCREASE the time interval over which one counts the cosmic rays. Rather than taking 5 measurements each 105 seconds in duration, can I take instead 5×105=525 measurements of 1 second intervals? If you are INCREASING the number of measurements (but keeping the time interval the same), you are changing from a sample population of 5 samples to a sample population of 525 samples, but you HAVE NOT CHANGED the PARENT population which depends on the MEAN of the measurement. Since you have not changed the mean, you have not changed the standard deviation, nor the SNR ratio!

19 In Class Project – Start on HW#5, Problem 3.
Solve for the refractive index n gives Use the chain rule on Equation above to determine the formula for the cumulative error in the calculated value of n2 . HINT: for the equation below, what are the formulas for the partial derivatives?


Download ppt "Physics 114: Lecture 11 Error Analysis, Part II"

Similar presentations


Ads by Google