Physics 114: Lecture 15 Probability Tests & Linear Fitting Dale E. Gary NJIT Physics Department.

Slides:



Advertisements
Similar presentations
Modeling of Data. Basic Bayes theorem Bayes theorem relates the conditional probabilities of two events A, and B: A might be a hypothesis and B might.
Advertisements

The Maximum Likelihood Method
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Curve Fitting ~ Least Squares Regression Chapter.
Copyright © 2009 Pearson Education, Inc. Chapter 29 Multiple Regression.
CmpE 104 SOFTWARE STATISTICAL TOOLS & METHODS MEASURING & ESTIMATING SOFTWARE SIZE AND RESOURCE & SCHEDULE ESTIMATING.
1 12. Principles of Parameter Estimation The purpose of this lecture is to illustrate the usefulness of the various concepts introduced and studied in.
Physics 114: Lecture 7 Uncertainties in Measurement Dale E. Gary NJIT Physics Department.
Physics 114: Lecture 16 Linear and Non-Linear Fitting Dale E. Gary NJIT Physics Department.
P M V Subbarao Professor Mechanical Engineering Department
Regression Analysis Using Excel. Econometrics Econometrics is simply the statistical analysis of economic phenomena Here, we just summarize some of the.
The Simple Linear Regression Model: Specification and Estimation
G. Cowan Lectures on Statistical Data Analysis 1 Statistical Data Analysis: Lecture 10 1Probability, Bayes’ theorem, random variables, pdfs 2Functions.
Curve-Fitting Regression
Chapter 4 Multiple Regression.
Evaluating Hypotheses
Inferences About Process Quality
Chi Square Distribution (c2) and Least Squares Fitting
Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Evaluating Hypotheses.
1 Seventh Lecture Error Analysis Instrumentation and Product Testing.
Physics 114: Lecture 11 Error Analysis
Modern Navigation Thomas Herring
Principles of the Global Positioning System Lecture 10 Prof. Thomas Herring Room A;
Calibration & Curve Fitting
Physics 114: Lecture 17 Least Squares Fit to Polynomial
Regression Analysis Regression analysis is a statistical technique that is very useful for exploring the relationships between two or more variables (one.
Regression Analysis (2)
Introduction to Error Analysis
1 As we have seen in section 4 conditional probability density functions are useful to update the information about an event based on the knowledge about.
880.P20 Winter 2006 Richard Kass 1 Maximum Likelihood Method (MLM) Does this procedure make sense? The MLM answers this question and provides a method.
Statistics for Data Miners: Part I (continued) S.T. Balke.
Lecture 12 Statistical Inference (Estimation) Point and Interval estimation By Aziza Munir.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 4 Curve Fitting.
R. Kass/W03P416/Lecture 7 1 Lecture 7 Some Advanced Topics using Propagation of Errors and Least Squares Fitting Error on the mean (review from Lecture.
Statistical Decision Making. Almost all problems in statistics can be formulated as a problem of making a decision. That is given some data observed from.
Physics 114: Exam 2 Review Lectures 11-16
1 Statistical Distribution Fitting Dr. Jason Merrick.
Lab 3b: Distribution of the mean
Chapter 4 Linear Regression 1. Introduction Managerial decisions are often based on the relationship between two or more variables. For example, after.
PROBABILITY AND STATISTICS FOR ENGINEERING Hossein Sameti Department of Computer Engineering Sharif University of Technology Principles of Parameter Estimation.
Physics 114: Lecture 14 Mean of Means Dale E. Gary NJIT Physics Department.
1 2 nd Pre-Lab Quiz 3 rd Pre-Lab Quiz 4 th Pre-Lab Quiz.
CHEMISTRY ANALYTICAL CHEMISTRY Fall Lecture 6.
Review of fundamental 1 Data mining in 1D: curve fitting by LLS Approximation-generalization tradeoff First homework assignment.
NON-LINEAR REGRESSION Introduction Section 0 Lecture 1 Slide 1 Lecture 6 Slide 1 INTRODUCTION TO Modern Physics PHYX 2710 Fall 2004 Intermediate 3870 Fall.
1 Introduction to Statistics − Day 4 Glen Cowan Lecture 1 Probability Random variables, probability densities, etc. Lecture 2 Brief catalogue of probability.
1 6. Mean, Variance, Moments and Characteristic Functions For a r.v X, its p.d.f represents complete information about it, and for any Borel set B on the.
Chapter 20 Statistical Considerations Lecture Slides The McGraw-Hill Companies © 2012.
Measurements and Their Analysis. Introduction Note that in this chapter, we are talking about multiple measurements of the same quantity Numerical analysis.
CHAPTER – 1 UNCERTAINTIES IN MEASUREMENTS. 1.3 PARENT AND SAMPLE DISTRIBUTIONS  If we make a measurement x i in of a quantity x, we expect our observation.
ESTIMATION METHODS We know how to calculate confidence intervals for estimates of  and  2 Now, we need procedures to calculate  and  2, themselves.
CHAPTER- 3.1 ERROR ANALYSIS.  Now we shall further consider  how to estimate uncertainties in our measurements,  the sources of the uncertainties,
R. Kass/W03 P416 Lecture 5 l Suppose we are trying to measure the true value of some quantity (x T ). u We make repeated measurements of this quantity.
Richard Kass/F02P416 Lecture 6 1 Lecture 6 Chi Square Distribution (  2 ) and Least Squares Fitting Chi Square Distribution (  2 ) (See Taylor Ch 8,
Statistics 350 Lecture 2. Today Last Day: Section Today: Section 1.6 Homework #1: Chapter 1 Problems (page 33-38): 2, 5, 6, 7, 22, 26, 33, 34,
Statistical Decision Making. Almost all problems in statistics can be formulated as a problem of making a decision. That is given some data observed from.
R. Kass/Sp07P416/Lecture 71 More on Least Squares Fit (LSQF) In Lec 5, we discussed how we can fit our data points to a linear function (straight line)
Fundamentals of Data Analysis Lecture 11 Methods of parametric estimation.
The Maximum Likelihood Method
Physics 114: Lecture 13 Probability Tests & Linear Fitting
Physics 114: Exam 2 Review Weeks 7-9
Basic Estimation Techniques
Physics 114: Exam 2 Review Material from Weeks 7-11
Basic Estimation Techniques
CHAPTER 29: Multiple Regression*
Introduction to Instrumentation Engineering
Physics 114: Lecture 14 Linear Fitting
Chi Square Distribution (c2) and Least Squares Fitting
John Federici NJIT Physics Department
CHAPTER – 1.2 UNCERTAINTIES IN MEASUREMENTS.
CHAPTER – 1.2 UNCERTAINTIES IN MEASUREMENTS.
Presentation transcript:

Physics 114: Lecture 15 Probability Tests & Linear Fitting Dale E. Gary NJIT Physics Department

Mar 29, 2010 Reminder of Previous Results  Last time we showed that rather than considering a single set of measurements, one can join multiple sets of measurements to refine both the estimated value and the precision of the mean.  The rule for finding the standard deviation of such a combination of sets of measurements, for the case of all statistically identical data sets (i.e. same errors ), is  Likewise, the rule for combining data sets with different errors is  That led us to the concept of weighting, where perhaps the errors themselves are not known, but the relative weighting of the measurements is known. In that case, the rule for individual sets of data is: then combine N sets as usual

Mar 29, 2010 Probability Tests  We sometimes need to know more than just the mean and standard deviation (uncertainty) of a set of measurements. For many cases, we also want to assess how likely our result is to be “true.”  One way to do this is to relate the uncertainty to the Gaussian probability. For example, we have learned that approximately 68% of measurements in a Gaussian distribution fall within 1  of the mean . In other words, 68% of our measurements should fall in the range (  –  ) < < (  +  ). If we repeat our measurement many times to determine the mean more precisely ( ), then again 68% of the repeated measurements should average in the range (  ’ –   ) < < (  ’ +   ).  A table of probability versus  is given in Table C.2. In science, it is expected that errors are given in terms of ± 1  Thus, stating a result as 3.4±0.2 means that 68% of values fall between 3.2 and 3.6. In some disciplines, it is common instead to state 90% confidence intervals (1.64  ), in which case the same measurements would be stated as 3.4±0.37. To avoid confusion, one should say 3.4±0.37 (90% confidence level).

Mar 29, 2010 Probability Tests, cont’d  A problem, however, occurs when we want to assign a probability estimate to measurements that are based on only a few samples. Although the samples are governed by the same parent mean and width (  ), the sample width s  is so poorly determined with only a few measurements that we should take that into account.  In such cases, a better estimate of probability is given by Student’s t distribution. Note that this has nothing to do with students. It was first described by an author who published under the name Student. In this distribution, the parameter t is the deviation in units of the sample standard deviation, t = (x – )/s .  It is a complicated function: where  is the gamma function (see Chapter 11), and is the number of degrees of freedom ( N – 1 in this case).  This function (listed in Table C.8) differs from Table C.4 for small N, but is nearly identical for N > 30 or so.

Mar 29, 2010 Chi-Square Probability  I want to introduce a useful concept without proof, called the (chi-square) test of goodness of fit. We will need it in the next lecture when we describe linear fits to data.  Consider our histograms from Lecture 14.

Mar 29, 2010 Chi-Square Probability  Here is a similar histogram from the text, showing the parent pdf (solid Gaussian curve NP G (x) ) and one histogram of 100 measurements of mean 5. Superimposed is the spread of values in each bin for multiple sets of 100 measurements.  Since the histogram is a frequency diagram, the value of each bin can only have integer values—hence, we expect a Poisson distribution with mean NP G (x) and standard deviation.

Mar 29, 2010 Chi-Square Probability  The definition of is where y i are the measurements (the bin heights in this case), y is the expected value (the smooth Gaussian curve NP G (x) in this case), and  i is the expected standard deviation of each y i ( in this case).  You can see that in each bin you expect the y i not to stray more than about  i from y on average, so each bin should contribute about 1 to the sum.  Thus, the sum should be about n, the number of bins. This is almost right. In fact, statistically the expectation value of is not n, but the number of degrees of freedom = n – n c, where n c is the number of constraints.  Often we use the reduced chi-square

Mar 29, 2010 Meaning of the Chi-Square Test  Consider the plot below as some measurements given by the histogram, and the smooth Gaussian as a fit to the data. If we shift the smooth curve, it will obviously not fit the data as well. Then will be much larger than, because the deviations of each bin from the shifted smooth curve are larger than  i.  Likewise, if we change the width, or the amplitude of the curve, either of these will also raise the value of.  The best fit of the curve, in fact, is the one that minimizes, which then should be close to. What is in this case? It takes three parameters to define the Gaussian, so = n – n c  = 6 – 3  = 3.

Mar 29, 2010 Chapter 6—Least Squares Fit to a Straight Line  There are many situations where we can measure one quantity (the dependent variable) with respect to another quantity (the independent variable). For instance, we might measure the position of a car vs. time, where the position is the dependent variable and time the independent variable.  If the velocity is constant, we expect a straight line Let us generically call the dependent variable y for this discussion, and the independent variable x. Then we can write such a linear relationship as, where a and b are constants.  Here is a plot of points with noise, showing a linear relationship, and a straight line that goes through the points.

Mar 29, 2010 Least Squares Fit to a Straight Line  Here are several plots with lines through the points. Which one do you think is the best fit?  It is surprisingly easy to see by eye which one fits best, but what does your brain do to determine this?  It is minimizing  2 !  Let’s go through the problem analytically.

Mar 29, 2010 Minimizing Chi-Square  We start with a smooth line of the form which is the “curve” we want to fit to the data. The chi-square for this situation is  To minimize any function, you know that you should take the derivative and set it to zero. But take the derivative with respect to what? Obviously, we want to find constants a and b that minimize, so we will form two equations:

Mar 29, 2010 Minimizing Chi-Square  Now we can rearrange these two equations to obtain two equations in two unknowns ( a and b ):  You can solve this set of simultaneous equations any way you wish. One way is to use Cramer’s Rule of matrix theory, which says Ratios of determinants.

Mar 29, 2010 Linear Regression  The solution, then, is where  Note that if the errors are all equal (i.e. ), then when you take the ratio of these determinants the errors cancel and we get simpler expressions