Introduction to Statistics − Day 4

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

Using the Profile Likelihood in Searches for New Physics / PHYSTAT 2011 G. Cowan 1 Using the Profile Likelihood in Searches for New Physics arXiv:
Statistical Data Analysis Stat 3: p-values, parameter estimation
G. Cowan Lectures on Statistical Data Analysis 1 Statistical Data Analysis: Lecture 10 1Probability, Bayes’ theorem, random variables, pdfs 2Functions.
1 Nuisance parameters and systematic uncertainties Glen Cowan Royal Holloway, University of London IoP Half.
G. Cowan Lectures on Statistical Data Analysis Lecture 12 page 1 Statistical Data Analysis: Lecture 12 1Probability, Bayes’ theorem 2Random variables and.
G. Cowan Lectures on Statistical Data Analysis 1 Statistical Data Analysis: Lecture 8 1Probability, Bayes’ theorem, random variables, pdfs 2Functions of.
G. Cowan 2011 CERN Summer Student Lectures on Statistics / Lecture 41 Introduction to Statistics − Day 4 Lecture 1 Probability Random variables, probability.
Inference about a Mean Part II
Inferences About Process Quality
G. Cowan Lectures on Statistical Data Analysis Lecture 13 page 1 Statistical Data Analysis: Lecture 13 1Probability, Bayes’ theorem 2Random variables and.
G. Cowan Lectures on Statistical Data Analysis Lecture 10 page 1 Statistical Data Analysis: Lecture 10 1Probability, Bayes’ theorem 2Random variables and.
G. Cowan Lectures on Statistical Data Analysis 1 Statistical Data Analysis: Lecture 7 1Probability, Bayes’ theorem, random variables, pdfs 2Functions of.
880.P20 Winter 2006 Richard Kass 1 Confidence Intervals and Upper Limits Confidence intervals (CI) are related to confidence limits (CL). To calculate.
G. Cowan 2009 CERN Summer Student Lectures on Statistics1 Introduction to Statistics − Day 4 Lecture 1 Probability Random variables, probability densities,
G. Cowan Lectures on Statistical Data Analysis Lecture 3 page 1 Lecture 3 1 Probability (90 min.) Definition, Bayes’ theorem, probability densities and.
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.
ECE 8443 – Pattern Recognition ECE 8423 – Adaptive Signal Processing Objectives: Deterministic vs. Random Maximum A Posteriori Maximum Likelihood Minimum.
Statistical Methods for Data Analysis Introduction to the course Luca Lista INFN Napoli.
1 Introduction to Statistics − Day 4 Glen Cowan Lecture 1 Probability Random variables, probability densities, etc. Lecture 2 Brief catalogue of probability.
G. Cowan Lectures on Statistical Data Analysis Lecture 8 page 1 Statistical Data Analysis: Lecture 8 1Probability, Bayes’ theorem 2Random variables and.
1 Introduction to Statistics − Day 3 Glen Cowan Lecture 1 Probability Random variables, probability densities, etc. Brief catalogue of probability densities.
Machine Learning 5. Parametric Methods.
G. Cowan TAE 2010 / Statistics for HEP / Lecture 11 Statistical Methods for HEP Lecture 1: Introduction Taller de Altas Energías 2010 Universitat de Barcelona.
G. Cowan Lectures on Statistical Data Analysis Lecture 4 page 1 Lecture 4 1 Probability (90 min.) Definition, Bayes’ theorem, probability densities and.
G. Cowan Computing and Statistical Data Analysis / Stat 9 1 Computing and Statistical Data Analysis Stat 9: Parameter Estimation, Limits London Postgraduate.
G. Cowan Lectures on Statistical Data Analysis Lecture 9 page 1 Statistical Data Analysis: Lecture 9 1Probability, Bayes’ theorem 2Random variables and.
G. Cowan Lectures on Statistical Data Analysis Lecture 6 page 1 Statistical Data Analysis: Lecture 6 1Probability, Bayes’ theorem 2Random variables and.
Chapter 8 Estimation ©. Estimator and Estimate estimator estimate An estimator of a population parameter is a random variable that depends on the sample.
G. Cowan Lectures on Statistical Data Analysis Lecture 12 page 1 Statistical Data Analysis: Lecture 12 1Probability, Bayes’ theorem 2Random variables and.
G. Cowan Lectures on Statistical Data Analysis Lecture 10 page 1 Statistical Data Analysis: Lecture 10 1Probability, Bayes’ theorem 2Random variables and.
G. Cowan RHUL Physics Statistical Issues for Higgs Search page 1 Statistical Issues for Higgs Search ATLAS Statistics Forum CERN, 16 April, 2007 Glen Cowan.
1 Nuisance parameters and systematic uncertainties Glen Cowan Royal Holloway, University of London IoP Half.
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.
Statistics for HEP Lecture 1: Introduction and basic formalism
TESTING STATISTICAL HYPOTHESES
Discussion on significance
Virtual University of Pakistan
ESTIMATION.
12. Principles of Parameter Estimation
3. The X and Y samples are independent of one another.
Statistics for the LHC Lecture 3: Setting limits
Hypothesis Testing and Confidence Intervals (Part 1): Using the Standard Normal Lecture 8 Justin Kern October 10 and 12, 2017.
Lecture 4 1 Probability (90 min.)
Determining the distribution of Sample statistics
TAE 2018 / Statistics Lecture 1
Chapter 9 Hypothesis Testing.
CONCEPTS OF ESTIMATION
Chapter 9 Hypothesis Testing.
Bayesian Models in Machine Learning
Graduierten-Kolleg RWTH Aachen February 2014 Glen Cowan
Chi Square Distribution (c2) and Least Squares Fitting
TAE 2017 / Statistics Lecture 1
Statistical Data Analysis Stat 3: p-values, parameter estimation
Discrete Event Simulation - 4
Computing and Statistical Data Analysis / Stat 8
Lecture 3 1 Probability Definition, Bayes’ theorem, probability densities and their properties, catalogue of pdfs, Monte Carlo 2 Statistical tests general.
Lecture 4 1 Probability Definition, Bayes’ theorem, probability densities and their properties, catalogue of pdfs, Monte Carlo 2 Statistical tests general.
Statistics for Particle Physics Lecture 3: Parameter Estimation
TAE 2018 Benasque, Spain 3-15 Sept 2018 Glen Cowan Physics Department
Statistical Tests and Limits Lecture 2: Limits
Computing and Statistical Data Analysis / Stat 7
TRISEP 2016 / Statistics Lecture 1
Introduction to Unfolding
Parametric Methods Berlin Chen, 2005 References:
Lecture 4 1 Probability Definition, Bayes’ theorem, probability densities and their properties, catalogue of pdfs, Monte Carlo 2 Statistical tests general.
Statistics for HEP Roger Barlow Manchester University
12. Principles of Parameter Estimation
Chapter 8 Estimation.
Computing and Statistical Data Analysis / Stat 10
Presentation transcript:

Introduction to Statistics − Day 4 Lecture 1 Probability Random variables, probability densities, etc. Lecture 2 Brief catalogue of probability densities The Monte Carlo method. Lecture 3 Statistical tests Fisher discriminants, neural networks, etc Goodness-of-fit tests Lecture 4 Parameter estimation Maximum likelihood and least squares Interval estimation (setting limits) → 2007 CERN Summer Student Lectures on Statistics

2007 CERN Summer Student Lectures on Statistics Parameter estimation The parameters of a pdf are constants that characterize its shape, e.g. r.v. parameter Suppose we have a sample of observed values: We want to find some function of the data to estimate the parameter(s): ← estimator written with a hat Sometimes we say ‘estimator’ for the function of x1, ..., xn; ‘estimate’ for the value of the estimator with a particular data set. 2007 CERN Summer Student Lectures on Statistics

Properties of estimators If we were to repeat the entire measurement, the estimates from each would follow a pdf: best large variance biased We want small (or zero) bias (systematic error): → average of repeated measurements should tend to true value. And we want a small variance (statistical error): → small bias & variance are in general conflicting criteria 2007 CERN Summer Student Lectures on Statistics

An estimator for the mean (expectation value) Parameter: Estimator: (‘sample mean’) We find: 2007 CERN Summer Student Lectures on Statistics

An estimator for the variance Parameter: Estimator: (‘sample variance’) We find: (factor of n-1 makes this so) where 2007 CERN Summer Student Lectures on Statistics

The likelihood function Suppose the outcome of an experiment is: x1, ..., xn, which is modeled as a sample from a joint pdf with parameter(s) q: Now evaluate this with the data sample obtained and regard it as a function of the parameter(s). This is the likelihood function: (xi constant) If the xi are independent observations of x ~ f(x;q), then, 2007 CERN Summer Student Lectures on Statistics

Maximum likelihood estimators If the hypothesized q is close to the true value, then we expect a high probability to get data like that which we actually found. So we define the maximum likelihood (ML) estimator(s) to be the parameter value(s) for which the likelihood is maximum. ML estimators not guaranteed to have any ‘optimal’ properties, (but in practice they’re very good). 2007 CERN Summer Student Lectures on Statistics

ML example: parameter of exponential pdf Consider exponential pdf, and suppose we have data, The likelihood function is The value of t for which L(t) is maximum also gives the maximum value of its logarithm (the log-likelihood function): 2007 CERN Summer Student Lectures on Statistics

ML example: parameter of exponential pdf (2) Find its maximum by setting → Monte Carlo test: generate 50 values using t = 1: We find the ML estimate: 2007 CERN Summer Student Lectures on Statistics

Variance of estimators: Monte Carlo method Having estimated our parameter we now need to report its ‘statistical error’, i.e., how widely distributed would estimates be if we were to repeat the entire measurement many times. One way to do this would be to simulate the entire experiment many times with a Monte Carlo program (use ML estimate for MC). For exponential example, from sample variance of estimates we find: Note distribution of estimates is roughly Gaussian − (almost) always true for ML in large sample limit. 2007 CERN Summer Student Lectures on Statistics

Variance of estimators from information inequality The information inequality (RCF) sets a lower bound on the variance of any estimator (not only ML): Often the bias b is small, and equality either holds exactly or is a good approximation (e.g. large data sample limit). Then, Estimate this using the 2nd derivative of ln L at its maximum: 2007 CERN Summer Student Lectures on Statistics

Variance of estimators: graphical method Expand ln L (q) about its maximum: First term is ln Lmax, second term is zero, for third term use information inequality (assume equality): i.e., → to get , change q away from until ln L decreases by 1/2. 2007 CERN Summer Student Lectures on Statistics

Example of variance by graphical method ML example with exponential: Not quite parabolic ln L since finite sample size (n = 50). 2007 CERN Summer Student Lectures on Statistics

The method of least squares Suppose we measure N values, y1, ..., yN, assumed to be independent Gaussian r.v.s with Assume known values of the control variable x1, ..., xN and known variances We want to estimate q, i.e., fit the curve to the data points. The likelihood function is 2007 CERN Summer Student Lectures on Statistics

The method of least squares (2) The log-likelihood function is therefore So maximizing the likelihood is equivalent to minimizing Minimum of this quantity defines the least squares estimator Often minimize c2 numerically (e.g. program MINUIT). 2007 CERN Summer Student Lectures on Statistics

Example of least squares fit Fit a polynomial of order p: 2007 CERN Summer Student Lectures on Statistics

Variance of LS estimators In most cases of interest we obtain the variance in a manner similar to ML. E.g. for data ~ Gaussian we have and so 1.0 or for the graphical method we take the values of q where 2007 CERN Summer Student Lectures on Statistics

Goodness-of-fit with least squares The value of the c2 at its minimum is a measure of the level of agreement between the data and fitted curve: It can therefore be employed as a goodness-of-fit statistic to test the hypothesized functional form l(x; q). We can show that if the hypothesis is correct, then the statistic t = c2min follows the chi-square pdf, where the number of degrees of freedom is nd = number of data points - number of fitted parameters 2007 CERN Summer Student Lectures on Statistics

Goodness-of-fit with least squares (2) The chi-square pdf has an expectation value equal to the number of degrees of freedom, so if c2min ≈ nd the fit is ‘good’. More generally, find the p-value: This is the probability of obtaining a c2min as high as the one we got, or higher, if the hypothesis is correct. E.g. for the previous example with 1st order polynomial (line), whereas for the 0th order polynomial (horizontal line), 2007 CERN Summer Student Lectures on Statistics

2007 CERN Summer Student Lectures on Statistics Setting limits Consider again the case of finding n = ns + nb events where nb events from known processes (background) ns events from a new process (signal) are Poisson r.v.s with means s, b, and thus n = ns + nb is also Poisson with mean = s + b. Assume b is known. Suppose we are searching for evidence of the signal process, but the number of events found is roughly equal to the expected number of background events, e.g., b = 4.6 and we observe nobs = 5 events. The evidence for the presence of signal events is not statistically significant, → set upper limit on the parameter s. 2007 CERN Summer Student Lectures on Statistics

Example of an upper limit Find the hypothetical value of s such that there is a given small probability, say, g = 0.05, to find as few events as we did or less: Solve numerically for s = sup, this gives an upper limit on s at a confidence level of 1-g. Example: suppose b = 0 and we find nobs = 0. For 1-g = 0.95, → The interval [0, sup] is an example of a confidence interval, designed to cover the true value of s with a probability 1 - g. 2007 CERN Summer Student Lectures on Statistics

Calculating Poisson parameter limits To solve for slo, sup, can exploit relation to 2 distribution: Quantile of 2 distribution TMath::ChisquareQuantile For low fluctuation of n this can give negative result for sup; i.e. confidence interval is empty. Many subtle issues here − see e.g. CERN (2000) and Fermilab (2001) confidence limit workshops and PHYSTAT conferences. 2007 CERN Summer Student Lectures on Statistics

2007 CERN Summer Student Lectures on Statistics Wrapping up lecture 4 We’ve seen some main ideas about parameter estimation, ML and LS, how to obtain/interpret stat. errors from a fit, and what to do if you don’t find the effect you’re looking for, setting limits. In four days we’ve only looked at some basic ideas and tools, skipping entirely many important topics. Keep an eye out for new methods, especially multivariate, machine learning, Bayesian methods, etc. 2007 CERN Summer Student Lectures on Statistics

2007 CERN Summer Student Lectures on Statistics Extra slides 2007 CERN Summer Student Lectures on Statistics

2007 CERN Summer Student Lectures on Statistics Setting limits Frequentist intervals (limits) for a parameter s can be found by defining a test of the hypothesized value s (do this for all s): Specify values of the data n that are ‘disfavoured’ by s (critical region) such that P(n in critical region) ≤ g for a prespecified g, e.g., 0.05 or 0.1. (Because of discrete data, need inequality here.) If n is observed in the critical region, reject the value s. Now invert the test to define a confidence interval as: set of s values that would not be rejected in a test of size g (confidence level is 1 - g ). The interval will cover the true value of s with probability ≥ 1 - g. 2007 CERN Summer Student Lectures on Statistics

Setting limits: ‘classical method’ E.g. for upper limit on s, take critical region to be low values of n, limit sup at confidence level 1 - b thus found from Similarly for lower limit at confidence level 1 - a, Sometimes choose a = b = g /2 → central confidence interval. 2007 CERN Summer Student Lectures on Statistics

Likelihood ratio limits (Feldman-Cousins) Define likelihood ratio for hypothesized parameter value s: Here is the ML estimator, note Critical region defined by low values of likelihood ratio. Resulting intervals can be one- or two-sided (depending on n). (Re)discovered for HEP by Feldman and Cousins, Phys. Rev. D 57 (1998) 3873. 2007 CERN Summer Student Lectures on Statistics

Coverage probability of confidence intervals Because of discreteness of Poisson data, probability for interval to include true value in general > confidence level (‘over-coverage’) 2007 CERN Summer Student Lectures on Statistics

More on intervals from LR test (Feldman-Cousins) Caveat with coverage: suppose we find n >> b. Usually one then quotes a measurement: If, however, n isn’t large enough to claim discovery, one sets a limit on s. FC pointed out that if this decision is made based on n, then the actual coverage probability of the interval can be less than the stated confidence level (‘flip-flopping’). FC intervals remove this, providing a smooth transition from 1- to 2-sided intervals, depending on n. But, suppose FC gives e.g. 0.1 < s < 5 at 90% CL, p-value of s=0 still substantial. Part of upper-limit ‘wasted’? 2007 CERN Summer Student Lectures on Statistics

Properties of upper limits Example: take b = 5.0, 1 -  = 0.95 Upper limit sup vs. n Mean upper limit vs. s 2007 CERN Summer Student Lectures on Statistics

2007 CERN Summer Student Lectures on Statistics Upper limit versus b Feldman & Cousins, PRD 57 (1998) 3873 b If n = 0 observed, should upper limit depend on b? Classical: yes Bayesian: no FC: yes 2007 CERN Summer Student Lectures on Statistics