Ex1: Event Generation (Binomial Distribution)

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

Pattern Recognition and Machine Learning
Ch11 Curve Fitting Dr. Deshi Ye
Chi Square Distribution (c2) and Least Squares Fitting
G. Cowan Lectures on Statistical Data Analysis Lecture 10 page 1 Statistical Data Analysis: Lecture 10 1Probability, Bayes’ theorem 2Random variables and.
Statistical Analysis of Systematic Errors and Small Signals Reinhard Schwienhorst University of Minnesota 10/26/99.
Regression Analysis Regression analysis is a statistical technique that is very useful for exploring the relationships between two or more variables (one.
LINEAR REGRESSION Introduction Section 0 Lecture 1 Slide 1 Lecture 5 Slide 1 INTRODUCTION TO Modern Physics PHYX 2710 Fall 2004 Intermediate 3870 Fall.
Stat13-lecture 25 regression (continued, SE, t and chi-square) Simple linear regression model: Y=  0 +  1 X +  Assumption :  is normal with mean 0.
Short Resume of Statistical Terms Fall 2013 By Yaohang Li, Ph.D.
1 Probability and Statistics  What is probability?  What is statistics?
Statistics for Engineer Week II and Week III: Random Variables and Probability Distribution.
Montecarlo Simulation LAB NOV ECON Montecarlo Simulations Monte Carlo simulation is a method of analysis based on artificially recreating.
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.
Inference for Regression Simple Linear Regression IPS Chapter 10.1 © 2009 W.H. Freeman and Company.
Simple Linear Regression. The term linear regression implies that  Y|x is linearly related to x by the population regression equation  Y|x =  +  x.
A taste of statistics Normal error (Gaussian) distribution  most important in statistical analysis of data, describes the distribution of random observations.
LECTURE 3: ANALYSIS OF EXPERIMENTAL DATA
ROOT and statistics tutorial Exercise: Discover the Higgs, part 2 Attilio Andreazza Università di Milano and INFN Caterina Doglioni Université de Genève.
Probability Refresher COMP5416 Advanced Network Technologies.
Reducing MCMC Computational Cost With a Two Layered Bayesian Approach
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.
G. Cowan Lectures on Statistical Data Analysis Lecture 8 page 1 Statistical Data Analysis: Lecture 8 1Probability, Bayes’ theorem 2Random variables and.
Study of pair-produced doubly charged Higgs bosons with a four muon final state at the CMS detector (CMS NOTE 2006/081, Authors : T.Rommerskirchen and.
V. Rouillard  Introduction to measurement and statistical analysis CURVE FITTING In graphical form, drawing a line (curve) of best fit through.
G. Cowan Lectures on Statistical Data Analysis Lecture 5 page 1 Statistical Data Analysis: Lecture 5 1Probability, Bayes’ theorem 2Random variables and.
CHAPTER 4 ESTIMATES OF MEAN AND ERRORS. 4.1 METHOD OF LEAST SQUARES I n Chapter 2 we defined the mean  of the parent distribution and noted that the.
Chapter 14 Introduction to Regression Analysis. Objectives Regression Analysis Uses of Regression Analysis Method of Least Squares Difference between.
Richard Kass/F02P416 Lecture 6 1 Lecture 6 Chi Square Distribution (  2 ) and Least Squares Fitting Chi Square Distribution (  2 ) (See Taylor Ch 8,
Bc → J/   Lifetime measurement Use 6.7 fb -1 and try two independent approaches Selection 1: no dependence of selection on decay time Fit fixes bkgd.
Week 21 Statistical Model A statistical model for some data is a set of distributions, one of which corresponds to the true unknown distribution that produced.
Linear Regression Hypothesis testing and Estimation.
Bivariate Regression. Bivariate Regression analyzes the relationship between two variables. Bivariate Regression analyzes the relationship between two.
Data Modeling Patrice Koehl Department of Biological Sciences
Modeling and Simulation CS 313
(Day 3).
CHAPTER 12 More About Regression
Chapter 13 Simple Linear Regression
Chapter 4: Basic Estimation Techniques
Chapter 4 Basic Estimation Techniques
Regression Analysis AGEC 784.
Parameter Estimation and Hypothesis Testing
M. Kuhn, P. Hopchev, M. Ferro-Luzzi
Parameter Estimation and Fitting to Data
Modeling and Simulation CS 313
Introduction, class rules, error analysis Julia Velkovska
Ch12.1 Simple Linear Regression
CHAPTER 12 More About Regression
Simple Linear Regression - Introduction
Incorporating systematic uncertainties into upper limits
Maximum Likelihood Find the parameters of a model that best fit the data… Forms the foundation of Bayesian inference Slide 1.
CHAPTER 29: Multiple Regression*
Introduction to Instrumentation Engineering
Linear Regression.
Modelling data and curve fitting
Chi Square Distribution (c2) and Least Squares Fitting
Probability Review for Financial Engineers
Reddy Pratap Gandrajula (University of Iowa) on behalf of CMS
PENGOLAHAN DAN PENYAJIAN
Chapter 14 Inference for Regression
Integration of sensory modalities
Introduction to Instrumentation Engineering
Chapter 12 Review Inference for Regression
CHAPTER 12 More About Regression
CHAPTER 12 More About Regression
Mathematical Foundations of BME Reza Shadmehr
Continuous distribution curve.
Empirical Distributions
Uncertainty Propagation
Presentation transcript:

Examples using ROOT http://root.cern.ch Ex1: Event Generation (Binomial Distribution) Ex2: Generate various random distributions Ex3: Linear fits Ex4: Determination of the area under a Gaussian Ex5: Bayesian inference Elton S. Smith, Jefferson Lab

Exercise 1 – Generate Binomial Distribution Exercise: Use the ROOT random number generator to generate 10 random numbers according to the Binomial distribution. Compare with the parent probability distribution function.

Exercise 1 - output

Exercise 2 – Various random distributions Exercise: Use the ROOT random number generator to generate random numbers according to a Uniform distribution Exponential distribution Gaussian distribution Poisson distribution Compare with the parent probability distribution function. Extra credit: Generate random number according to an arbitrary input function.

Random distributions

Polynomial function

Exercise 3 - Linear Fits Assume a parent distribution of the form y(x) = a + bx, a=5, b=1 Assume one experiment collects a data set of ten points of the form (xi, yi±s), i=0,1,2,...9, with the measurements yi following a Gaussian distribution with a fixed width s=0.5. Invent the data points yi for one experiment. Fit the data yi to the form y = a + bx. Determine y and the uncertainty of y as a function of x from the fit.

Exercise 3 - Linear Fits Extra credit Generate 1000 Monte Carlo experiments For each experiment fit the data set to the functional form given above Plot the difference between the fitted function and data Histogram the difference between the fitted parameters and the true parameter a and b Use the width of the distribution to determine the uncertainty in the parameters. Compare with the estimated uncertainties in the fit

Linear Fit – one “experiment” Fit for one “experiment” showing the fitted parameters Repeat 1000 times

Fitted Results to 1000 “experiments” For each fit, plot the fitted value of the intercept and slope. Fit the distributions to Gaussian functions Mean = 5.004 ± 0.010 Sigma = 0.303 Mean = 0.9997 ± 0.0018 Sigma = 0.05626 What is the relation between these two?

Plot difference between fitted and true values Fit Gaussian to slices y(x)-yfit Uncertainty on sy can be computed using sab=0 sy2=sa2+x2sb2+2xsab Correlation term is important

Exercise 4 - Fitted Gaussian area Many measurements of a variable x have been accumulated in one experiment. The measurements are dominated by experimental resolution, so the distribution of measurements is Gaussian. Obtain Integral Generate 1000 measurements (one experiment) according to a Gaussian distribution Fit the distribution to a Gaussian and determine the area under the curve and its uncertainty. Systematic Study (extra credit) Generate 100 experiments with 1000 measurements each and empirically determine areas and uncertainties Use fit defaults and option=‘L’ Compare and discuss

Fitted Gaussian area – one “experiment” (969) (322) (5) Fitting Option=default Variable x (xunits)

Fitted Gaussian area – 100 “experiments” Events Generated Fitted Gaussian Sum Mean = 1000 ± 3.7 Mean = 976.5 ± 3.7 Sigma = 34 Sigma = 35

Fitted Gaussian area – one “experiment” (997) (322) (5) Fitting Option=‘L’ Variable x (xunits)

Fitted Gaussian area – 100 “experiments” Events Generated Fitted Gaussian Sum Mean = 1000 ± 3.7 Mean = 998 ± 3.5 Sigma = 34 Sigma = 32

Summary of examples of fitting Linear fit Obtained values of the uncertainties of the parameters by Monte Carlo. Demonstrated these uncertainties corresponded to the computed estimate The correlation term must be included Determination of areas under Gaussian distributions The area and uncertainties were computed The computation requires inclusion of the correlation term. Monte Carlo determination of the area shows that the use of least-square fits lead to estimates for the area that are systematically low

Bayesian inference - example An experiment is interested in identifying pions in the presence of a large number of muon tracks. A detector is designed to identify pions, but has a 96% efficiency for tagging pions as pions and a 1% chance of misidentifying a muon and tagging it as a pion. Assume there are 10 times more muons than pions. Assume that a track has been tagged as a pion. What is the degree of belief that the track is a pion? How does this change if there are 100 times more muons than pions?

Bayesian inference p m m

Dependence on background ratio