theta a framework for template-based modeling and inference

Size: px
Start display at page:

Download "theta a framework for template-based modeling and inference"

Transcription

1 theta a framework for template-based modeling and inference Thomas Müller Jochen Ott Jeannine Wagner-Kuhr Institut für Experimentelle Kernphysik, Karlsruhe Institute of Technology (KIT), Germany June 17, 2010 Statistical methods such as hypothesis tests and interval estimation for Poisson counts in multiple channels are frequently performed in high energy physics. We present an efficient and extensible software framework which uses a templatebased model approach. It includes modules to calculate several likelihood-based quantities on a large number of pseudo experiments or on data. The generated values can be used to apply frequentist methods such as hypothesis testing and the Neyman construction for interval estimation, or modified frequentist methods such as the CLs method. It also includes an efficient Markov-Chain Monte-Carlo implementation for Bayesian inference to calculate Bayes factors or Bayesian credible intervals. 1

2 Contents 1 Introduction 3 2 Template-Based Modeling Example Model Statistical Methods Discovery Direct Estimation of Z Z via Test Statistic Distribution Bayes Factor Measurement Profile Likelihood Method Neyman Construction Bayesian Inference: Posterior Exclusion Including Systematic Uncertainties Rate Uncertainties Template Uncertainties theta Framework Combination with external Likelihood Functions Markov Chains in theta Testing

3 1 Introduction In High Energy Physics (HEP), the result of an analysis is often the outcome of a statistical procedure. Common cases are interval estimations and hypothesis tests based on models of Poisson counts in multiple channels. In all but the most simple cases, not only the mere number of events is used as input to the statistical method but the measured distribution of a certain observable. Here, we only consider the case where the expected and measured distributions are binned, i.e., given as histograms. The probability of observing n i events in bin i is the Poisson probability with mean m i where the expected poisson mean m i is the sum of expected poisson means of the different contributing processes. Writing the expectation as linear combination of templates is the basis of the (more general) model definition used in theta. It will be defined and discussed in more detail in Section 2. Analytical solutions to the test statistics commonly used, such as the maximum likelihood estimate for a certain parameter or the value of a likelihood ratio, are in general not known for such a model. Therefore, a numerical treatment is necessary. In order to accurately generate the test statistic distribution for a certain model, large-scale Monte-Carlo production of pseudo data and efficient calculation of test statistic is necessary. This is one main application of theta. Details on how theta can be used in various statistical methods is discussed in Section 3. Section 4 discusses how systematic uncertainties affecting the shape and normalization of templates can be included in theta. Section 5 gives an overview of the architecture and some implementation details of theta. An Appendix is included which contains example configuration files for theta. theta is licensed under the GPL. The software package and further documentation can be obtained via 2 Template-Based Modeling A typical model predicts the Poisson mean in each bin i as linear combination of different components m i = p 1 t 1,i + p 2 t 2,i + p 3 t 3,i (1) where p j are real model parameters. Fixing j, t j,k is a one-dimensional template 1 for process j. The resulting template m contains the predicted Poisson mean for each bin. While this covers some simple use cases, systematic uncertainties will complicate the picture, namely one source of uncertainty might affect p 1 and p 2, but not p 3, another source of uncertainty might affect the shape of the templates t i. Therefore, a more general model is considered here which allows the coefficients and templates in the linear combination in the right hand side of eq. (1) to depend arbitrarily on model parameters. 1 The term template is used here to mean both, a probability density in an observable as well as the event count, binned in the observable. It can be thought of a histogram normalized to the expectation. 3

4 The most general statistical model in theta predicts templates of a set of observables o 1,... o N. Both, the coefficients and the templates are functions of real model parameters p. Thus, the model prediction for observable o i is M i m i ( p) = c i,k ( p)t i,k ( p) (2) k=1 where the c i,k are real-valued coefficients and t i,k are the templates of the M i individual processes contributing in this channel. It is assumed that the template bin contents t i,k are all strictly positive. Given model parameters p, the probability of observing data template d is given by a Poisson for each bin of the template: p m (d p) = N b i Poisson(d i,l m i,l ( p)) (3) i=1 l=1 where i runs over all observables, b i is the number of bins for observable o i, d i,l is the number of observed events of observable o i in bin l, and Poisson(n λ) = λn e λ is the poisson probability of observing n events, given mean λ. Fixing d and reading eq. (3) as function of p, is the likelihood function used in many statistical methods discussed in Section 3: n! L( p d) = p m (d p). (4) In general, an additional term D( p) is introduced in the likelihood function and eq. (4) becomes L( p d) = p m (d p)d( p). (5) The origin and interpretation of term D( p) might differ, depending on the application. A typical application is a two-step measurement with two different models. In the first ( sideband ) measurement, some parameter (such as the background rate) is measured as ˆp ± ˆp. In the second measurement, the parameter of interest is estimated. As part of the likelihood function in the second model, a Gaussian term for p with mean ˆp and width ˆp is included in D. In this application, D can be seen as the approximate likelihood of the first measurement. Note that the templates t i,k have been introduced as one-dimensional objects. However, all bins are statistically independent. Therefore, bins can be re-ordered arbitrarily without changing the outcome of any method. In particular, it is also possible to start with multi-dimensional templates and concatenating all their bins to obtain a one-dimensional template. Therefore, using one-dimensional templates does not restrict applications as much as it might seem at first. 2.1 Example Model As example used in the following sections, consider the measurement of signal using two channels: the first channel is a signal-free region used to measure 4

5 arb Background Signal "mass" Figure 1: Templates in the signal region of the signal and background process over some mass-like observable. The Signal template is t s,2 in (7), Background corresponds to t s,1. background ( sideband channel sb), the second channel contains signal ( signal channel s). The parameters of this model are the Poisson mean of the background, µ b, and the Poisson mean of the signal, µ s, both for the signal channel. It is assumed that the Poisson mean in the sideband channel is a fixed multiple of µ b, where the factor is known precisely. The model prediction written in form of eq. (2) is m sb (µ s, µ b ) = µ b t sb,1 (6) m s (µ s, µ b ) = µ b t s,1 + µ s t s,2 (7) where the templates t i,j are constant, i.e., they do not depend on any model parameter. The parameter of interest is µ s ; µ b is a nuisance parameter. In this example, the sideband template, t sb,1, is taken to be a counting-only measurement, i.e., it is a one-bin template with τ as bin content, whereas the templates for the signal channel are a mass like distribution with 100 bins on the range where the background template t s,1 is exponentially falling. The signal template t s,2 is a normal distribution around 250 with width 50. Both templates in the signal channel are normalized such that the sum of their bin entries equals one. The templates in the signal region are depicted in Figure 1. The values used in the following sections will be µ b = 20, µ s = 10, and 10 as normalization of the sideband background template t sb,1. 3 Statistical Methods The statistical methods discussed in the following sections are: 1. Discovery: make a hypothesis test with null hypothesis µ s = 0 versus µ s > Measurement: estimate µ s, and an interval for µ s. 5

6 3. Exclusion: give an upper / lower limit on µ s. In theta, different producers are available to address these questions. A producer calculates one or more values, given data and a model as C++ objects. The calculated values are written to an output file and called products. These products can be used in a second step to make the actual statistical inferences. Examples for producers are maximum likelihood estimator, which produces the estimated parameter values ln L producer for interval estimation which produces profile likelihood intervals Likelihood ratio producer which calculates the negative log-likelihood for different parameter restrictions of the same model Markov-Chain Monte-Carlo producer which calculates a histogram of the posterior in one parameter. In the following sections, some applications of these producers are discussed in more detail with the example model from Section 2.1. Most statistical methods discussed here (such as likelihood-ratio test, maximum-likelihood estimator, Neyman interval construction) are discussed in detail in many introductory texts in statistics (such as [4]) and will not be explained or referenced in detail here. 3.1 Discovery Three methods are discussed: 1. direct estimation of significance using asymptotic properties of the likelihood ratio 2. significance estimation via the tail of the test statistic distribution 3. Bayes factor. The first two methods are frequentist methods. While the first relies on properties which hold for a large number of events, the second one is more general but also much more time-consuming to apply as a large number of pseudo experiments are required for reliable results. They both yield a p value or a Z value (as in a significance of Z sigma ) if applied to a dataset. The third method is the Bayesian counterpart to frequentist hypothesis tests. The Bayes factor is the ratio of posterior probabilities of the null hypothesis and an alternative hypothesis. Thus, it expresses the relative credibility in the null hypothesis: a small Bayes factor would lead to the assumption that the null hypothesis is incorrect Direct Estimation of Z The model is formulated such that the null hypothesis corresponds to a subset B of parameter values p. In this example, B consists of those parameter values with µ s = 0. The ratio of maximized likelihoods λ(d) is defined as λ(d) = ln max p L( p d) max p B L( p d) 6 (8)

7 where L is the likelihood function as defined in eq. (5). In the nominator, the maximum is taken over all allowed parameter values p while in the denominator, the maximum is taken only over the subset B which corresponds to the null hypothesis, i.e., the model without signal. λ(d) is a real value indicating the compatibility with the null hypothesis: a large value disfavours the null hypothesis. The p value for a certain dataset ˆd is defined as the probability of observing a value of λ(d) as least as large as λ( ˆd), assuming the null hypothesis is true. Calculating the p value thus requires the knowledge of the distribution λ(d) for the null hypothesis. According to Wilks Theorem, λ is asymptotically distributed according to a χ 2 distribution, if the data is drawn from the model p B. 2 In HEP, it is common to cite the Z value instead of the p value if reporting the outcome of a hypothesis test. The Z value for a given p value is the number of standard deviations in the sense that Z G(x)dx = p where G(x) is the normal distribution around zero with width one. In the case considered here, the estimated Z value for a given value of λ is Z est = 2λ. (9) In theta, this is done using the likelihood ratio producer. It minimizes the likelihood function for two model variants which only differ in the definition of the prior distribution D( p). By choosing a δ-distribution fixing µ s to zero, the background-only model variant of the example model is defined and by choosing a flat distribution for µ s, the signal-plus-background variant is defined. theta is used to generate the Z est distribution by throwing 100,000 pseudo data distributions d according to the model and calculating Z est (d) each time. The resulting Z est distribution can be seen in Figure 2. The median estimated Z value is 3.02 which can be quoted as expected sensitivity Z via Test Statistic Distribution Alternatively, one can determine the distribution of estimated Z est values as defined in eq. 9 for the null hypothesis numerically. From this distribution, the p value of a measurement Ẑ is p = Ẑ Z est (Z)dZ (10) where Z est (Z) is the distribution of Z est values for the null hypothesis. In order to give an expected p value in case signal is present, eq. (10) is evaluated setting Ẑ to the median Z est value for the signal-plus-background case. theta is run twice, for µ s = 0.0 to generate the Z est distribution for the null hypothesis and for µ s = 10 to determine the median value of the Z est distribution. For the first case, one million pseudo experiments are thrown 2 For simplicity, it is assumed that B fixes only one parameter, as is the case for the example model. 7

8 N PE Z est Figure 2: Distribution of estimated Z values for the example model with µ s = 10 using Z est from eq. (9.) The error bars are approximate uncertainties from the finite number of pseudo experiments. yielding the distribution shown in Figure 3. The second run was already carried out for the previous section and yielded a median value Ẑ = The median p value is given by the fraction contained in the filled area in the Figure and corresponds to a Z value of 3.06 which is the expected sensitivity as usually quoted. The advantages of this method compared to a direct significance estimate discussed in the previous section are that it gives the correct answer even if the assumption of large event numbers used for Z est in eq. (9) is not fulfilled. More importantly, this method is more general than using Z est and allows the straight-forward inclusion of systematic uncertainties via the prior-predictive method which will be discussed in Section 4. The main disadvantage is that it is much more CPU-intensive as it requires a large number of pseudo experiment in order to accurately describe the tail of the test statistic distribution. For the background only distribution evaluating one million pseudo experiments, theta took about 10 minutes using one core of a recent CPU Bayes Factor The Bayes factor is the ratio of posterior probabilities B 01 (d) = p(h 0 d) p(h 1 d) (11) where p(h 0 d) is the posterior probability (degree of belief) of the null hypothesis, given data d, and p(h 1 d) is the posterior probability of the alternative 8

9 N PE per bin median of S + B B only hypothesis S + B hypothesis N PE ˆp Z est Figure 3: Distribution of Z est for the background-only and signal-plusbackground variants of the example model. The y-axis is the number of pseudo experiments per bin; the error bars indicate the approximate statistical errors from the finite number of pseudo experiments. The median of the S+B Z est distribution is marked with a vertical line and defines the integration region of the B only Z est distribution used to calculate the median expected p value, ˆp. 9

10 hypothesis. The smaller B 01, the smaller belief there is that the null hypothesis is correct. The posterior probabilities of the above equation are given via Bayes Theorem: p(h i d) = p(d H i ) π(h i) π(d) where π are the prior probabilities and p(d H i ) is the probability of observing data d, given hypothesis H i. π(d) is a normalization factor which does not have to be determined explicitely as it cancels in the ratio (11). In the case considered here, the null hypothesis H 0 is µ s = 0 and the alternative H 1 is given by µ s = In order to determine the posterior for H 0 or H 1, the probability is integrated over the nuisance parameters, in this case only µ b p(d H 0 ) = p(d µ s = 0, µ b )π(µ b )dµ b (12) µ b and similarly for H 1, where µ s = 10 is used on the right hand side. As prior π(µ b ) for µ b, a flat prior is used. While the integral in eq. (12) is only one-dimensional, it is not uncommon to have of the order of 10 nuisance parameters. Therefore, the numerical evaluation of the integral is done with the Metropolis-Hastings Markov-Chain Monte-Carlo method [5] which has good performance in high-dimensional parameter spaces. theta was used to generate the negative logarithm of the posteriors for the two model variants (signal-plus-background and background-only) using Markov Chains. Figure 4 shows the distribution of Bayes factors calculated for 10,000 pseudo datasets sampled according to the signal-plus-background hypothesis. The expected (median) Bayes factor is Measurement The term measurement in this context is used as synonym for point estimation and interval estimation in statistic literature. Three methods are discussed: 1. the profile likelihood method 2. the Neyman construction for central intervals using as test statistic either (i) the likelihood ratio or (ii) the maximum likelihood estimate and 3. as Bayesian method, the (marginal) posterior of the signal cross section Profile Likelihood Method The profile likelihood function L p in the parameter µ s for the example model is defined as L p (µ s d) = max µ b L(µ s, µ b d) where L is the likelihood function from eq. (5). In general, the maximum on the right hand side is taken over all nuisance parameters, i.e., over all parameters 3 If the alternative hypothesis H 1 does not specify a concrete value for µ s but a whole parameter range, such as µ s > 0, the minimum Bayes factor obtained by scanning over the allowed values of µ s can be cited as result. 10

11 N PE B 01 Figure 4: Distribution of Bayes factors B 01 in case H 1 is true, setting µ b = 20 using 10,000 pseudo experiments. The error bars in x direction indicate the bin borders, the y errors are approximate statistical errors from finite number of pseudo experiments. but the parameter of interest. The likelihood ratio λ defined in eq. (8) can then be written as L p (ˆµ s d) λ(d) = ln L p (µ s = 0 d) where ˆµ s is defined as the value of µ s which maximizes L p. In general, any hypothesis test can be used to construct confidence intervals: the confidence interval with confidence level 1 α/2 for µ s consists of those values µ s which are not rejected by a hypothesis test at level α. Applying this principle to the hypothesis test discussed in Section yields the following construction for a confidence interval at level l for µ s : 1. construct L p (µ s d) by minimizing with respect to µ b 2. find the value ˆµ s which maximizes L p (µ s d) 3. include all values in the interval for which ln L p (µ s ) ln L p (ˆµ s ) < (l). The value (l) in the last step is found by applying Wilks Theorem to the likelihood ratio test statistic (cf. Section 3.1.1): (l) = 2erf 1 (l) where erf is the error function. theta was run producing pseudo data distributed according to the prediction of the example model setting µ s = 10 and µ b = 20 and determining the lower and upper interval borders for each generated pseudo data distribution. The 11

12 median value of estimated µ s, ˆµ s, lower and upper one-sigma interval borders (where the medians are taken separately over all pseudo experiments) are ˆµ s = The bias in the central is due to the smallness of µ s and a well-known property of the maximum likelihood method. As cross-check, it was confirmed that this bias vanished if scaling µ s and µ b simultaneously by a factor 100. The coverage of the intervals was found to be 68%, as desired Neyman Construction Using the Neyman construction to construct central intervals, one has to determine the test statistic distribution as function of the value of the parameter of interest µ s. Then, for each fixed µ s, the central 68% (95%) of the test statistic are included in a confidence belt. Given a measurement which yields a test statistic value ˆT, the cited interval consists of those values of µ s contained in the belt at this test statistic value. This construction is depicted in Figure 5: for each fixed value of µ s, the band indicate the central 68% and 95% of the test statistic distribution (in this case Z est ), respectively. The interval construction starts at the observed test statistic value ˆT at the y-axis. The central value and 68% C.L. interval are then read from the intersection points of a horizontal line at ˆT with the 68% belt. Likelihood Ratio as Test Statistic As test statistic in the first case, Z est from eq. 9 is used. The 68% and 95% confidence belts are shown in figure 5. This Figure was constructed by throwing 200,000 pseudo experiments where for each pseudo experiment, µ s is drawn randomly from a flat distribution between 0.0 and After throwing the pseudo experiments, the µ s range is divided into 30 bins, and for each bin, the quantiles (0.025, 0.16, 0.5, 0.84, 0.975) of the test statistic distribution are determined. These quantiles define the belts as explained above. For low values of µ s, a considerable fraction of pseudo experiments yield Z est = 0 and the band contains more than 68% or 95% of the Z est values. For µ s = 10, the median test statistic value is ˆT = 3.02 and the expected confidence interval in this case is ˆµ s = (13) Maximum Likelihood Estimate as Test Statistic The maximum likelihood estimate ˆµ s is defined as the value of µ s which maximizes the likelihood function L(µ s, µ b d), if varying both µ s and µ b. This estimate is used as test statistic for the Neyman construction. The confidence belts are shown in Figure 6. The interval in the median case was found to be ˆµ s = and thus gives the same expected interval as if using Z est as test statistic. 12

13 Z est % central belt 95% central belt 6 4 median Z est µ s Figure 5: 68% and 95% confidence level confidence belts of a central interval Neyman construction for the example model using Z est as test statistic (which is equivalent to using a likelihood ratio). 40 ˆµ s median ˆµ 10 s 5 68% central belt 95% central belt µ s Figure 6: 68% and 95% confidence level confidence belts of a central interval Neyman construction for the example model using the maximum likelihood estimate for µ s as test statistic. 13

14 3.2.3 Bayesian Inference: Posterior In Bayesian statistic, the posterior in µ s can be considered the final result of a measurement. Given data d, the posterior in all model parameters (µ s, µ b ) is given by p(µ s, µ b d) = p(d µ s ) π(µ s, µ b ) π(d) (14) where π are the priors. The denominator on the right hand side, π(d), is a normalization factor which does not have to be determined explicitely. In order to make statements about the parameter of interest, µ s, only the marginal distribution of µ s of the full posterior is considered. It is given by p(µ s d) = p(µ s, µ b d)dµ b. This marginal posterior is extracted by a Markov-Chain Monte-Carlo method which creates a Markov Chain of parameter values (µ s, µ b ) distributed according to the posterior 14. The posterior for µ s is shown in Figure 7. As dataset, the template of the model prediction is used directly, i.e., without throwing random pseudo data. The posterior was determined using a chain length of one million and flat priors in µ s and µ b. The run time for this Markov Chain was about 6 seconds. While the posterior in µ s, p(µ s ) can be considered as the final result, some derived quantities can be used to summarize the posterior. In this case, the most probable value and the 68% credible level central interval are considered. The most probable value can be determined robustly by fitting a normal distribution to the peak region of the posterior and taking the mean of the fitted distribution as estimated value. The central 68% credible level interval is illustrated in Figure 7. Using these values, the expected result can be summarized as ˆµ s = Exclusion Exclusion can be handled by methods discussed in Section 3.2, with some minor modifications: The upper end of a 90% C.L. interval from the profile likelihood method can be cited as the 95% C.L. upper limit. Note, however, that the profile likelihood method might perform poorly near parameter boundaries µ s 0 and this is typically the case if you want to calculate an upper limit. In this case, coverage tests should be carried out to check the validity of this method. The Neyman construction remains valid; instead of taking the central 68% of the test statistic distribution as the confidence belt, one would include the upper 95%. The Bayesian result is the marginal posterior in µ s, from which the 95% quantile can be easily derived. 14

15 p(µ s ) % µ s Figure 7: Posterior in µ s for the example model using µ s = 10 and a flat prior in µ s, µ b. The values for µ s from the chain were binned in 60 bins from 0.0 to The y-axis are the number of chain elements in the bin which is proportional to the posterior p(µ s d). The only method discussed here in more detail is the CLs method [6], which can be used to construct upper limits. Unlike other methods, it has the property that a downward fluctuation of the background does not lead to more stringent upper limits. This is seen as a desired property by many physicists, as otherwise, a poor background model which systematically overestimates the background level would yield a better upper limit than a realistic background model. The CLs value for a certain signal s and background b is defined as CLs = 1 p s+b 1 p b (15) where p i is the upper tail of the test statistic distribution for model i, i.e., the probability of observing a test statistic value as least as signal-like as the one observed, assuming model i is true. This definition of CLs is depicted in Figure 8. The 95% upper limit is given by the amount of signal for which CLs as defined in eq. (15) is For this example, Z est is used as test statistic, and the p values for eq. (15) are given by eq. (10). The expected 95% C.L. upper limit is calculated twice, for µ s = 0 and for µ s = 10. For these two cases, the median of the Z est distribution is 0.00 and 3.02, respectively. The pseudo data sample used is the same as in the Neyman construction using Z est in Section As was done there, 30 bins in µ s are created and the test statistic distribution in each bin is used to calculate the p values in eq. (15). The 95% C.L. upper limits are determined by calculating CLs for all bins in µ s, 15

16 d(ts) p b p s +b ˆT B hypothesis S + B hypothesis TS Figure 8: Illustration for the definition of the CLs value. With the test statistic (T S) distributions for the background-only and the signal-plus-background, the CLs value for a given measurement with test statistic value ˆT is defined as 1 p s+b 1 p b. interpolating this dependence linearly and finding the value µ s for which CLs is This yields an expected upper limit of 7.1 in case of no signal. 16

17 4 Including Systematic Uncertainties Systematic uncertainties can be included in the model by introducing additional (nuisance) parameters q into the model which parametrize the effect of the systematic uncertainty on the predicted templates. Within theta, these nuisance parameters are treated no different than other model parameters p. They are given another name here only in order to unambiguously refer to these parameters in the following discussion. Once the uncertainty is included in the model, there are different possibilities to account for them in the methods previously presented. In a Bayesian method, the most natural way would be to include priors for the parameters q and proceed as before, i.e., integrate with repect to q in order to construct the posterior for the parameter of interest or the Bayes factor. For methods which use numerical distributions of the test statistic (such as the Neyman construction, hypothesis test as in Section 3.1.2, CLs method), the pseudo data to calculate the test statistic is generated including the systematic uncertainties by choosing random values for q before drawing a pseudo data distribution from the model and calculating the value of the test statistic. In this case, assumptions about the distribution q in the form of a prior for q have to be made. This method is known as prior-predictive method. 4 The definition of the test statistic is often based on maximizing the likelihood function. The model used to define this likelihood function can be either the model which includes q (including priors for q), or a model which fixes the value of q to values which reproduce the most probable one, i.e., the model used before including the systematic uncertainties. The latter approach is often more robust in practice as the number of parameters to vary during the minimization of the negative log-likelihood is smaller. However, including the dependence on some nuisance parameters for the definition of the test statistic can improve the results as the value of the nuisance parameters can be determined from data simultaneously to the parameter of interest. This is especially true for systematic uncertainties which have a large impact on the background in signal-free regions. In this case, minimization of the negative log-likelihood effectively measures the parameter value q j for this uncertainty which improves the background prediction in the signal region. On the other hand, including a nuisance parameters q j in the model for the likelihood definition which has little impact on the model prediction and thus can hardly be measured from data might even worsen results. Thus, a general advise about whether or not to include the uncertainties in the model definition used for the likelihood function is to start with a model without these uncertainties and include one by one the uncertainties, starting with those which have the largest impact on the result. Then, these uncertainties would only be kept if they improve the expected result. In a simple case, the uncertainty to consider is merely an uncertainty of the rate of a certain process. How such a case is included in theta is discussed first. More generally, an uncertainty affects the whole template, i.e., the template depends on q. This dependence affects not only the rate but also the shape of the template. This case is discussed in the second subsection. 4 In an alternative method, the posterior-predictive method, posteriors for q are derived first in an auxiliary measurement. These posteriors are then used to throw random values for the test statistic generation as discussed. This will not be discussed here. 17

18 4.1 Rate Uncertainties Consider an uncertainty in the example model on the relative normalizations of the background templates in the different channels, i.e., on the relative normalization of t sb,1 and t b,1 (see eqs. (6) and (7)). To include this uncertainty in the model, an additional parameter τ is introduced in the model, which is the ratio of the background expectation in the sideband and the signal region. Then, the model equations (6) and (7) become m sb (µ s, µ b ) = τµ b t sb,1 m s (µ s, µ b ) = µ b t s,1 + µ s t s,2. The absence of any uncertainty corresponds to fixing τ = 1. Assume that by external knowledge (e.g., an auxiliary measurement), τ is known to be τ = 1 ± 0.2. This can be considered in theta by defining D( p) to include a normal distribution for τ (see eq. (5)). As example, the Neyman construction using the maximum likelihood estimate ˆµ s as test statistic from Section is re-evaluated by generating pseudo data where for each pseudo experiment, τ is chosen randomly from a normal distribution around 1 with width 0.2. The model used to calculate the maximum likelihood test statistic fixes τ to 1.The resulting confidence belt using 200,000 pseudo experiments is shown in Figure 9. The expected result (for median value of the test statistic) is ˆµ s = and the interval is larger than without this uncertainty. 4.2 Template Uncertainties In general, a mere rate uncertainty does not suffice to describe the effect of the systematic uncertainty on the expected distribution in an observable. Rather, the whole template is affected. An example would be a bias in the energy measurement which shifts the signal peak of the example model (see Figure 10). The templates shown there represent the estimated one-sigma deviations, i.e., 68% credible intervals. In order to include this effect in the model, a parameter δ is introduced in the model which is used to interpolate between the original template without uncertainties, t s,2, and the templates which include the uncertainty t s,2,+ and t s,2,. This is written as a template function t s,2 (δ) such that t s,2 (0) = t s,2 t s,2 (1) = t s,2,+ t s,2 ( 1) = t s,2,. As the templates affected by uncertainties represent a one-sigma deviation, a reasonable prior distribution for δ is a normal distribution with mean 0 and width 1. Additional desirable properties of a template interpolation are: for all values of δ, all bins should have positive values, and the bin values as function of δ should be continuously differentiable. 18

19 40 ˆµ s median ˆµ 10 s 5 68% central belt 95% central belt µ s Figure 9: 68% and 95% confidence level confidence belts of a central interval Neyman construction for the example model. Pseudo data was generated including a 20% relative uncertainty on the relative background expectation in the sideband and signal region, τ. The test statistic is the maximum likelihood estimate of µ s using a model without the uncertainty on τ. arb t s, 2 t s, 2, + t s, 2, "mass" Figure 10: Signal templates for the example model. t s,2 is the original signal template unaffected by uncertainties (cf. Figure 1), t s,2,± are the signal templates affected by a energy-scale like uncertainty which affects both the shape and the normalization of the template. 19

20 40 ˆµ s median ˆµ 10 s 5 68% central belt 95% central belt µ s Figure 11: 68% and 95% confidence level confidence belts of a central interval Neyman construction for the example model. Pseudo data was generated including the template uncertainty as depicted in Figure 10. The first property ensures that the model always remains meaningful and the evaluation of the negative log-likelihood always yields finite values. The second property is important for stable numerical minimization of the negative loglikelihood, as many algorithms assume a continuous first derivative. There are many different possibilities for a template interpolation with these properties. The one chosen here is t s,2 (δ) = t s,2 ( ) δ ts,2,sign(δ) where the equation holds for each individual bin of the templates involved. For the Neyman construction, pseudo data is generated by choosing a random value for δ from a Gaussian around zero with width one. Then, poisson data is generated from the model prediction for this value of δ. The model used for calculating the maximum likelihood estimate used as test statistic was done using the same model, i.e., including the template interpolation with δ as parameter and the Gaussian prior for δ. The belts calculated from 200,000 pseudo experiments are shown in Figure 11. The expected (median) result of the interval estimation in this case is t s,2 ˆµ s = The runtime of theta was about 5 minutes. 20

21 Figure 12: Overview of the collaboration of some important classes in theta. Rectangles are core classes of theta while the ellipses represent abstract classes which are implemented as plugins. The collaboration of plugin classes depicted here is only an example: theta imposes no restriction on the architexture of plugins. 5 theta Framework Figure 12 gives an overview over the architecture of theta. As depicted there, theta consists of a few core classes which implement central concepts of templatebased modeling, such as the model, data and the negative log-likelihood function (NLLikelihood). Other classes are merely abstract classes in theta; concrete classes are provided by plugins. While theta includes some common plugins, it was specifically designed to enable users to write their own plugins for their needs. Which plugins to use and the configuration parameters for these plugins are specified in a configuration file. The theta main program reads this configuration file and creates the requested plugin instances. This includes setting up the model which contains a number of Functions and HistogramFunctions which represent the coefficients c i,k ( p) and templates t i,k ( p) in equation (2), respectively. The distribution D( p) of a model is represented by a Distribution instance. It can be used for both, generation of random parameter values for pseudo data construction as well as term for the likelihood function. For each pseudo experiment, Data is produced by a DataSource. This can mean throwing random Poisson data according to a model or always passing 21

22 the same Data which was read from a ROOT file. This Data is passed to each configured Producer which has access to the Model and Data. The Producer typically constructs the likelihood function for the Model and the Data (NLLikelihood), calculates some quantities and writes them to a Database. A Database contained in theta writes the products in a SQL table to a sqlite3 file. The only external dependency of the theta core system is Boost [1], a generalpurpose C++ library. This core system becomes useful only through plugins. theta provides plugins for many common use cases, such as the access to ROOT histograms, to write the results to a sqlite3 database, and many more. If no there is no suitable plugin for a particular use case, defining an own plugin is straight-forward and is merely a matter of deriving from the appropriate base class and implementing its purely virtual methods. 5.1 Combination with external Likelihood Functions Combination of different channels is possible by configuring a theta model which includes all channels as different observables. A combination with an external analysis on the likelihood-level is possible by exploting the plugin system and writing a Function plugin which calculates the external negative log-likelihood. This Function can then be used as part of the prior D( p) (cf. eq. (5)) of the model. This allows to either use methods implemented in theta on the external likelihood function or combine the external likelihood function with the likelihood function calculated internally in theta. 5.2 Markov Chains in theta The Metropolis-Hastings Markov-Chain Monte-Carlo algorithm produces a Markov chain which are distributed according to a probability density f(x). Given a point x i within the sequence, the next point in the sequence is found by choosing randomly a proposed point ˆx in the neighborhood of x i. If the probability density at that proposed point is larger than the current one, i.e., if f(ˆx) > f(x i ), the proposal is accepted, i.e., the next point in the chain is ˆx. Otherwise, ˆx is only accepted with probability f(ˆx)/f(x i ). If the proposal is not accepted, the next point in the sequence is x i (again). One crucial point when applying the algorithm is the typical step size of the proposal step. If the step size is too large, the proposed points are too far from the current point x i, the posterior at the proposed point is very small and rejected too often. On the other hand, if the step size is very small, the acceptance rate will be high. In this case, the chain elements behave like a particle in a diffusion process and the covered volume in parameter space is proportional to N for a chain of length N. In theta, the jump kernel is a multivariate normal distribution. Its covariance is determined iteratively from the posterior of average data, i.e., using the average prediction of the model without any randomization. The found width is further scaled to maximize the diffusion speed according to [3] by a factor 2.38 n 22

23 where n is the number of dimensions, i.e., the number of non-fixed parameters. The covariance is determined only once per theta run and used for all pseudo experiments. This provides a considerable speedup compared to methods which determine the jump kernel width for each pseudo experiment. 5.3 Testing Testing is done by evaluating the producers for simple models for which the result is known analytically or from statistic HEP papers. This includes the Likelihood ratio producer for counting experiments, the Profile likelihood interval producer on counting experiments, including tests against the values given in [2] for the on/off problem and the gaussian-mean problem. Also, Bayesian credible intervals for a counting experiment has been checked against analytical results. 23

24 Appendix Two annotated configuration files are given below. The first, exmodel.cfg, defines the example model. The templates in the signal region from eq. 7, t s,1 and t s,2, are saved in a ROOT-file templates.root and called "bkg" and "signal", respectively. The second configuration file, deltanll.cfg, was used to produce the values of the minimized negative log-likelihood function for eq. (8) used in Section as well as for the signal-plus-background distribution of the Z est test statistic in Section Plugins used in this example are: fixed poly, a HistogramFunction which does not depend on any parameters and is defined by a polynomial. root histogram, a HistogramFunction which does not depend on any model parameters and returns the histogram from a ROOT file. mult, a Function which multiplies all parameters in a list. product distribution, a Distribution defined as product of other Distributions. flat distribution, a Distribution which is flat on a given interval. delta distribution, a Distribution to fix a parameter to a given value. deltanll hypotest, a Producer which produces the values of the negativelog-likelihoods appearing on the right hand side of equation (8). model source, a DataSource which throws random Poisson data according to a given model. sqlite database, a Database which writes all data to a single sqlite3 database file. exmodel.cfg: // the names of all model parameters parameters = ( mu s, mu b ); // the observables of the model observables = { // mass variable in the signal region has 100 bins on // the range (0, 500): mass = { range = (0.0, 500.0); nbins = 100; // counting only variable for the sideband, i.e., one bin // on an arbitrary range: sb = { 24

25 range = (0.0, 1.0); nbins = 1; tau = 10.0; // flat template, normalized to tau for the sideband counting part: t sb 1 = { type = fixed poly ; observable = sb ; normalize to ; coefficients = [1.0]; // templates from a root file for the others: t s 1 = { type = root histogram ; filename = templates.root ; histoname = bkg ; normalize to = 1.0; t s 2 = { type = root histogram ; filename = templates.root ; histoname = signal ; normalize to = 1.0; // within the model, the predition is given for each observable by listing, // the terms of the sum in eq. (2). For each term, a // coefficient function and a histogram is specified which correspond // to c ik and t ik in eq. (2). example model = { mass = { background = { coefficient function = { type = mult ; parameters = ( mu b ); histogram s 1 ; signal = { coefficient function = { type = mult ; parameters = ( mu s ); histogram s 2 ; sb = { background = { coefficient function = { type = mult ; parameters = ( mu b ); histogram sb 1 ; 25

26 // as distribution for the parameters, the product of two // flat distributions is used which are defined below. parameter distribution = { type = product distribution ; distributions = b s flat ); // use flat distributions which restrict the // mu parameters to positive values, but do not add an additional // term to the likelihood function. If sampling from these // distributions, they will always return a fixed value // given by fix sample value. This value is also used as // initial guess for likelihood function minimization. // As initial step size for minimization or Markov Chains, // the width parameter is used. mu b flat = { type = flat distribution ; mu b = { range = (0.0, inf ); fix sample value = 20.0; width = 2.0; mu s flat = { type = flat distribution ; mu s = { range = (0.0, inf ); fix sample value = 10.0; width = 1.0; exmodel.cfg // hypotest is a producer which produces random variable // distributions, given data and a model. // The deltanll hypotest produces the two minima of the likelihood functions // using the same model but different parameter distributions, namely the // background only distribution and the // signal plus background distribution. hypotest = { type = deltanll hypotest ; 26

27 name = hypotest ; minimizer = { type = root minuit ; background only distribution = { type = product distribution ; distributions = s b flat ); // as s+b distribution, the distribution as // defined in the model is used: signal plus background distribution model.parameter distribution ; mu s zero = { type = delta distribution ; mu s = 0.0; // main is the setting which glues all together. It will run n events // pseudoexperiments which // 1. sample pseudo data from the data source // 2. call all the producers on the pseudo data, along with model // 3. save the products produced in 2. in output database main = { data source = { type = model source ; name = source ; model model ; //included via exmodel.cfg model model ; producers = ); n events = ; output database = { type = sqlite database ; filename = deltanll hypo.db ; options = { plugin files = (../../ lib/core plugins.so,../../ lib/root.so ); 27

28 References [1] boost C++ libraries. [2] R. D. Cousins, J. T. Linnemann, and J. Tucker. Evaluation of three methods for calculating statistical significance when incorporating a systematic uncertainty into a test of the background-only hypothesis for a Poisson process. Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment, 595(2): , [3] A. Gelman, G. O. Roberts, and W. R. Gilks. Efficient Metropolis Jumping Rules. Bayesian Statistics, 5: , [4] F. James. Statistical Methods in Experimental Physics [5] N. Metropolis, A. W. Rosenbluth, M. N. Rosenbluth, A. H. Teller, and E. Teller. Equation of state calculations by fast computing machines. The Journal of Chemical Physics, 21(6): , [6] A. L. Read. Modified frequentist analysis of search results (the CL s method). (CERN-OPEN ),

Statistics Challenges in High Energy Physics Search Experiments

Statistics Challenges in High Energy Physics Search Experiments Statistics Challenges in High Energy Physics Search Experiments The Weizmann Institute of Science, Rehovot, Israel E-mail: eilam.gross@weizmann.ac.il Ofer Vitells The Weizmann Institute of Science, Rehovot,

More information

Statistical Methods in Particle Physics Lecture 2: Limits and Discovery

Statistical Methods in Particle Physics Lecture 2: Limits and Discovery Statistical Methods in Particle Physics Lecture 2: Limits and Discovery SUSSP65 St Andrews 16 29 August 2009 Glen Cowan Physics Department Royal Holloway, University of London g.cowan@rhul.ac.uk www.pp.rhul.ac.uk/~cowan

More information

E. Santovetti lesson 4 Maximum likelihood Interval estimation

E. Santovetti lesson 4 Maximum likelihood Interval estimation E. Santovetti lesson 4 Maximum likelihood Interval estimation 1 Extended Maximum Likelihood Sometimes the number of total events measurements of the experiment n is not fixed, but, for example, is a Poisson

More information

Physics 403. Segev BenZvi. Credible Intervals, Confidence Intervals, and Limits. Department of Physics and Astronomy University of Rochester

Physics 403. Segev BenZvi. Credible Intervals, Confidence Intervals, and Limits. Department of Physics and Astronomy University of Rochester Physics 403 Credible Intervals, Confidence Intervals, and Limits Segev BenZvi Department of Physics and Astronomy University of Rochester Table of Contents 1 Summarizing Parameters with a Range Bayesian

More information

Systematic uncertainties in statistical data analysis for particle physics. DESY Seminar Hamburg, 31 March, 2009

Systematic uncertainties in statistical data analysis for particle physics. DESY Seminar Hamburg, 31 March, 2009 Systematic uncertainties in statistical data analysis for particle physics DESY Seminar Hamburg, 31 March, 2009 Glen Cowan Physics Department Royal Holloway, University of London g.cowan@rhul.ac.uk www.pp.rhul.ac.uk/~cowan

More information

Lecture 5. G. Cowan Lectures on Statistical Data Analysis Lecture 5 page 1

Lecture 5. G. Cowan Lectures on Statistical Data Analysis Lecture 5 page 1 Lecture 5 1 Probability (90 min.) Definition, Bayes theorem, probability densities and their properties, catalogue of pdfs, Monte Carlo 2 Statistical tests (90 min.) general concepts, test statistics,

More information

An introduction to Bayesian reasoning in particle physics

An introduction to Bayesian reasoning in particle physics An introduction to Bayesian reasoning in particle physics Graduiertenkolleg seminar, May 15th 2013 Overview Overview A concrete example Scientific reasoning Probability and the Bayesian interpretation

More information

Primer on statistics:

Primer on statistics: Primer on statistics: MLE, Confidence Intervals, and Hypothesis Testing ryan.reece@gmail.com http://rreece.github.io/ Insight Data Science - AI Fellows Workshop Feb 16, 018 Outline 1. Maximum likelihood

More information

Statistical Methods in Particle Physics Lecture 1: Bayesian methods

Statistical Methods in Particle Physics Lecture 1: Bayesian methods Statistical Methods in Particle Physics Lecture 1: Bayesian methods SUSSP65 St Andrews 16 29 August 2009 Glen Cowan Physics Department Royal Holloway, University of London g.cowan@rhul.ac.uk www.pp.rhul.ac.uk/~cowan

More information

Statistical Data Analysis Stat 3: p-values, parameter estimation

Statistical Data Analysis Stat 3: p-values, parameter estimation Statistical Data Analysis Stat 3: p-values, parameter estimation London Postgraduate Lectures on Particle Physics; University of London MSci course PH4515 Glen Cowan Physics Department Royal Holloway,

More information

P Values and Nuisance Parameters

P Values and Nuisance Parameters P Values and Nuisance Parameters Luc Demortier The Rockefeller University PHYSTAT-LHC Workshop on Statistical Issues for LHC Physics CERN, Geneva, June 27 29, 2007 Definition and interpretation of p values;

More information

Discovery significance with statistical uncertainty in the background estimate

Discovery significance with statistical uncertainty in the background estimate Glen Cowan, Eilam Gross ATLAS Statistics Forum 8 May, 2008 Discovery significance with statistical uncertainty in the background estimate Introduction In a search for a new type of event, data samples

More information

Statistical Methods for Particle Physics Lecture 4: discovery, exclusion limits

Statistical Methods for Particle Physics Lecture 4: discovery, exclusion limits Statistical Methods for Particle Physics Lecture 4: discovery, exclusion limits www.pp.rhul.ac.uk/~cowan/stat_aachen.html Graduierten-Kolleg RWTH Aachen 10-14 February 2014 Glen Cowan Physics Department

More information

Statistical Methods in Particle Physics

Statistical Methods in Particle Physics Statistical Methods in Particle Physics Lecture 11 January 7, 2013 Silvia Masciocchi, GSI Darmstadt s.masciocchi@gsi.de Winter Semester 2012 / 13 Outline How to communicate the statistical uncertainty

More information

Error analysis for efficiency

Error analysis for efficiency Glen Cowan RHUL Physics 28 July, 2008 Error analysis for efficiency To estimate a selection efficiency using Monte Carlo one typically takes the number of events selected m divided by the number generated

More information

Hypothesis testing (cont d)

Hypothesis testing (cont d) Hypothesis testing (cont d) Ulrich Heintz Brown University 4/12/2016 Ulrich Heintz - PHYS 1560 Lecture 11 1 Hypothesis testing Is our hypothesis about the fundamental physics correct? We will not be able

More information

Topics in Statistical Data Analysis for HEP Lecture 1: Bayesian Methods CERN-JINR European School of High Energy Physics Bautzen, June 2009

Topics in Statistical Data Analysis for HEP Lecture 1: Bayesian Methods CERN-JINR European School of High Energy Physics Bautzen, June 2009 Topics in Statistical Data Analysis for HEP Lecture 1: Bayesian Methods CERN-JINR European School of High Energy Physics Bautzen, 14 27 June 2009 Glen Cowan Physics Department Royal Holloway, University

More information

Journeys of an Accidental Statistician

Journeys of an Accidental Statistician Journeys of an Accidental Statistician A partially anecdotal account of A Unified Approach to the Classical Statistical Analysis of Small Signals, GJF and Robert D. Cousins, Phys. Rev. D 57, 3873 (1998)

More information

Statistical Methods for Discovery and Limits in HEP Experiments Day 3: Exclusion Limits

Statistical Methods for Discovery and Limits in HEP Experiments Day 3: Exclusion Limits Statistical Methods for Discovery and Limits in HEP Experiments Day 3: Exclusion Limits www.pp.rhul.ac.uk/~cowan/stat_freiburg.html Vorlesungen des GK Physik an Hadron-Beschleunigern, Freiburg, 27-29 June,

More information

Bayesian inference. Fredrik Ronquist and Peter Beerli. October 3, 2007

Bayesian inference. Fredrik Ronquist and Peter Beerli. October 3, 2007 Bayesian inference Fredrik Ronquist and Peter Beerli October 3, 2007 1 Introduction The last few decades has seen a growing interest in Bayesian inference, an alternative approach to statistical inference.

More information

Parameter estimation and forecasting. Cristiano Porciani AIfA, Uni-Bonn

Parameter estimation and forecasting. Cristiano Porciani AIfA, Uni-Bonn Parameter estimation and forecasting Cristiano Porciani AIfA, Uni-Bonn Questions? C. Porciani Estimation & forecasting 2 Temperature fluctuations Variance at multipole l (angle ~180o/l) C. Porciani Estimation

More information

Statistical Methods for Particle Physics (I)

Statistical Methods for Particle Physics (I) Statistical Methods for Particle Physics (I) https://agenda.infn.it/conferencedisplay.py?confid=14407 Glen Cowan Physics Department Royal Holloway, University of London g.cowan@rhul.ac.uk www.pp.rhul.ac.uk/~cowan

More information

Some Topics in Statistical Data Analysis

Some Topics in Statistical Data Analysis Some Topics in Statistical Data Analysis Invisibles School IPPP Durham July 15, 2013 Glen Cowan Physics Department Royal Holloway, University of London g.cowan@rhul.ac.uk www.pp.rhul.ac.uk/~cowan G. Cowan

More information

Modern Methods of Data Analysis - WS 07/08

Modern Methods of Data Analysis - WS 07/08 Modern Methods of Data Analysis Lecture VII (26.11.07) Contents: Maximum Likelihood (II) Exercise: Quality of Estimators Assume hight of students is Gaussian distributed. You measure the size of N students.

More information

Statistics for Particle Physics. Kyle Cranmer. New York University. Kyle Cranmer (NYU) CERN Academic Training, Feb 2-5, 2009

Statistics for Particle Physics. Kyle Cranmer. New York University. Kyle Cranmer (NYU) CERN Academic Training, Feb 2-5, 2009 Statistics for Particle Physics Kyle Cranmer New York University 91 Remaining Lectures Lecture 3:! Compound hypotheses, nuisance parameters, & similar tests! The Neyman-Construction (illustrated)! Inverted

More information

Statistical Methods for Particle Physics Lecture 1: parameter estimation, statistical tests

Statistical Methods for Particle Physics Lecture 1: parameter estimation, statistical tests Statistical Methods for Particle Physics Lecture 1: parameter estimation, statistical tests http://benasque.org/2018tae/cgi-bin/talks/allprint.pl TAE 2018 Benasque, Spain 3-15 Sept 2018 Glen Cowan Physics

More information

Some Statistical Tools for Particle Physics

Some Statistical Tools for Particle Physics Some Statistical Tools for Particle Physics Particle Physics Colloquium MPI für Physik u. Astrophysik Munich, 10 May, 2016 Glen Cowan Physics Department Royal Holloway, University of London g.cowan@rhul.ac.uk

More information

Statistics and Data Analysis

Statistics and Data Analysis Statistics and Data Analysis The Crash Course Physics 226, Fall 2013 "There are three kinds of lies: lies, damned lies, and statistics. Mark Twain, allegedly after Benjamin Disraeli Statistics and Data

More information

Bayesian Methods for Machine Learning

Bayesian Methods for Machine Learning Bayesian Methods for Machine Learning CS 584: Big Data Analytics Material adapted from Radford Neal s tutorial (http://ftp.cs.utoronto.ca/pub/radford/bayes-tut.pdf), Zoubin Ghahramni (http://hunch.net/~coms-4771/zoubin_ghahramani_bayesian_learning.pdf),

More information

CMS Internal Note. The content of this note is intended for CMS internal use and distribution only

CMS Internal Note. The content of this note is intended for CMS internal use and distribution only Available on CMS information server CMS IN 2003/xxxx CMS Internal Note The content of this note is intended for CMS internal use and distribution only August 26, 2003 Expected signal observability at future

More information

A Bayesian Approach to Phylogenetics

A Bayesian Approach to Phylogenetics A Bayesian Approach to Phylogenetics Niklas Wahlberg Based largely on slides by Paul Lewis (www.eeb.uconn.edu) An Introduction to Bayesian Phylogenetics Bayesian inference in general Markov chain Monte

More information

Statistics for the LHC Lecture 2: Discovery

Statistics for the LHC Lecture 2: Discovery Statistics for the LHC Lecture 2: Discovery Academic Training Lectures CERN, 14 17 June, 2010 indico.cern.ch/conferencedisplay.py?confid=77830 Glen Cowan Physics Department Royal Holloway, University of

More information

Introductory Statistics Course Part II

Introductory Statistics Course Part II Introductory Statistics Course Part II https://indico.cern.ch/event/735431/ PHYSTAT ν CERN 22-25 January 2019 Glen Cowan Physics Department Royal Holloway, University of London g.cowan@rhul.ac.uk www.pp.rhul.ac.uk/~cowan

More information

Physics 403. Segev BenZvi. Numerical Methods, Maximum Likelihood, and Least Squares. Department of Physics and Astronomy University of Rochester

Physics 403. Segev BenZvi. Numerical Methods, Maximum Likelihood, and Least Squares. Department of Physics and Astronomy University of Rochester Physics 403 Numerical Methods, Maximum Likelihood, and Least Squares Segev BenZvi Department of Physics and Astronomy University of Rochester Table of Contents 1 Review of Last Class Quadratic Approximation

More information

Recent developments in statistical methods for particle physics

Recent developments in statistical methods for particle physics Recent developments in statistical methods for particle physics Particle Physics Seminar Warwick, 17 February 2011 Glen Cowan Physics Department Royal Holloway, University of London g.cowan@rhul.ac.uk

More information

STA 4273H: Statistical Machine Learning

STA 4273H: Statistical Machine Learning STA 4273H: Statistical Machine Learning Russ Salakhutdinov Department of Computer Science! Department of Statistical Sciences! rsalakhu@cs.toronto.edu! h0p://www.cs.utoronto.ca/~rsalakhu/ Lecture 7 Approximate

More information

RooStatsCms: a tool for analyses modelling, combination and statistical studies

RooStatsCms: a tool for analyses modelling, combination and statistical studies RooStatsCms: a tool for analyses modelling, combination and statistical studies D. Piparo, G. Schott, G. Quast Institut für f Experimentelle Kernphysik Universität Karlsruhe Outline The need for a tool

More information

Strong Lens Modeling (II): Statistical Methods

Strong Lens Modeling (II): Statistical Methods Strong Lens Modeling (II): Statistical Methods Chuck Keeton Rutgers, the State University of New Jersey Probability theory multiple random variables, a and b joint distribution p(a, b) conditional distribution

More information

Introduction to Likelihoods

Introduction to Likelihoods Introduction to Likelihoods http://indico.cern.ch/conferencedisplay.py?confid=218693 Likelihood Workshop CERN, 21-23, 2013 Glen Cowan Physics Department Royal Holloway, University of London g.cowan@rhul.ac.uk

More information

arxiv: v1 [physics.data-an] 2 Mar 2011

arxiv: v1 [physics.data-an] 2 Mar 2011 Incorporating Nuisance Parameters in Likelihoods for Multisource Spectra J. S. Conway University of California, Davis, USA arxiv:1103.0354v1 [physics.data-an] Mar 011 1 Overview Abstract We describe here

More information

Constructing Ensembles of Pseudo-Experiments

Constructing Ensembles of Pseudo-Experiments Constructing Ensembles of Pseudo-Experiments Luc Demortier The Rockefeller University, New York, NY 10021, USA The frequentist interpretation of measurement results requires the specification of an ensemble

More information

Quantile POD for Hit-Miss Data

Quantile POD for Hit-Miss Data Quantile POD for Hit-Miss Data Yew-Meng Koh a and William Q. Meeker a a Center for Nondestructive Evaluation, Department of Statistics, Iowa State niversity, Ames, Iowa 50010 Abstract. Probability of detection

More information

arxiv: v1 [hep-ex] 9 Jul 2013

arxiv: v1 [hep-ex] 9 Jul 2013 Statistics for Searches at the LHC Glen Cowan Physics Department, Royal Holloway, University of London, Egham, Surrey, TW2 EX, UK arxiv:137.2487v1 [hep-ex] 9 Jul 213 Abstract These lectures 1 describe

More information

Statistical Methods for Particle Physics Lecture 3: systematic uncertainties / further topics

Statistical Methods for Particle Physics Lecture 3: systematic uncertainties / further topics Statistical Methods for Particle Physics Lecture 3: systematic uncertainties / further topics istep 2014 IHEP, Beijing August 20-29, 2014 Glen Cowan ( Physics Department Royal Holloway, University of London

More information

Second Workshop, Third Summary

Second Workshop, Third Summary Statistical Issues Relevant to Significance of Discovery Claims Second Workshop, Third Summary Luc Demortier The Rockefeller University Banff, July 16, 2010 1 / 23 1 In the Beginning There Were Questions...

More information

Statistical Data Analysis Stat 5: More on nuisance parameters, Bayesian methods

Statistical Data Analysis Stat 5: More on nuisance parameters, Bayesian methods Statistical Data Analysis Stat 5: More on nuisance parameters, Bayesian methods London Postgraduate Lectures on Particle Physics; University of London MSci course PH4515 Glen Cowan Physics Department Royal

More information

Advanced Statistical Methods. Lecture 6

Advanced Statistical Methods. Lecture 6 Advanced Statistical Methods Lecture 6 Convergence distribution of M.-H. MCMC We denote the PDF estimated by the MCMC as. It has the property Convergence distribution After some time, the distribution

More information

Practical Statistics part II Composite hypothesis, Nuisance Parameters

Practical Statistics part II Composite hypothesis, Nuisance Parameters Practical Statistics part II Composite hypothesis, Nuisance Parameters W. Verkerke (NIKHEF) Summary of yesterday, plan for today Start with basics, gradually build up to complexity of Statistical tests

More information

Statistical Tools in Collider Experiments. Multivariate analysis in high energy physics

Statistical Tools in Collider Experiments. Multivariate analysis in high energy physics Statistical Tools in Collider Experiments Multivariate analysis in high energy physics Lecture 5 Pauli Lectures - 10/02/2012 Nicolas Chanon - ETH Zürich 1 Outline 1.Introduction 2.Multivariate methods

More information

If we want to analyze experimental or simulated data we might encounter the following tasks:

If we want to analyze experimental or simulated data we might encounter the following tasks: Chapter 1 Introduction If we want to analyze experimental or simulated data we might encounter the following tasks: Characterization of the source of the signal and diagnosis Studying dependencies Prediction

More information

Statistical Methods for Particle Physics

Statistical Methods for Particle Physics Statistical Methods for Particle Physics Invisibles School 8-13 July 2014 Château de Button Glen Cowan Physics Department Royal Holloway, University of London g.cowan@rhul.ac.uk www.pp.rhul.ac.uk/~cowan

More information

MCMC notes by Mark Holder

MCMC notes by Mark Holder MCMC notes by Mark Holder Bayesian inference Ultimately, we want to make probability statements about true values of parameters, given our data. For example P(α 0 < α 1 X). According to Bayes theorem:

More information

32. STATISTICS. 32. Statistics 1

32. STATISTICS. 32. Statistics 1 32. STATISTICS 32. Statistics 1 Revised September 2009 by G. Cowan (RHUL). This chapter gives an overview of statistical methods used in high-energy physics. In statistics, we are interested in using a

More information

SAMSI Astrostatistics Tutorial. More Markov chain Monte Carlo & Demo of Mathematica software

SAMSI Astrostatistics Tutorial. More Markov chain Monte Carlo & Demo of Mathematica software SAMSI Astrostatistics Tutorial More Markov chain Monte Carlo & Demo of Mathematica software Phil Gregory University of British Columbia 26 Bayesian Logical Data Analysis for the Physical Sciences Contents:

More information

Markov Chain Monte Carlo

Markov Chain Monte Carlo Department of Statistics The University of Auckland https://www.stat.auckland.ac.nz/~brewer/ Emphasis I will try to emphasise the underlying ideas of the methods. I will not be teaching specific software

More information

Irr. Statistical Methods in Experimental Physics. 2nd Edition. Frederick James. World Scientific. CERN, Switzerland

Irr. Statistical Methods in Experimental Physics. 2nd Edition. Frederick James. World Scientific. CERN, Switzerland Frederick James CERN, Switzerland Statistical Methods in Experimental Physics 2nd Edition r i Irr 1- r ri Ibn World Scientific NEW JERSEY LONDON SINGAPORE BEIJING SHANGHAI HONG KONG TAIPEI CHENNAI CONTENTS

More information

Monte Carlo in Bayesian Statistics

Monte Carlo in Bayesian Statistics Monte Carlo in Bayesian Statistics Matthew Thomas SAMBa - University of Bath m.l.thomas@bath.ac.uk December 4, 2014 Matthew Thomas (SAMBa) Monte Carlo in Bayesian Statistics December 4, 2014 1 / 16 Overview

More information

arxiv: v1 [physics.data-an] 7 Mar 2012

arxiv: v1 [physics.data-an] 7 Mar 2012 RooStats for Searches Grégory Schott, on behalf of the RooStats team KIT, Institut für Experimentelle Kernphysik, Karlsruhe, Germany arxiv:1203.1547v1 [physics.data-an] 7 Mar 2012 1 Introduction Abstract

More information

Statistics for Particle Physics. Kyle Cranmer. New York University. Kyle Cranmer (NYU) CERN Academic Training, Feb 2-5, 2009

Statistics for Particle Physics. Kyle Cranmer. New York University. Kyle Cranmer (NYU) CERN Academic Training, Feb 2-5, 2009 Statistics for Particle Physics Kyle Cranmer New York University 1 Hypothesis Testing 55 Hypothesis testing One of the most common uses of statistics in particle physics is Hypothesis Testing! assume one

More information

32. STATISTICS. 32. Statistics 1

32. STATISTICS. 32. Statistics 1 32. STATISTICS 32. Statistics 1 Revised September 2007 by G. Cowan (RHUL). This chapter gives an overview of statistical methods used in High Energy Physics. In statistics, we are interested in using a

More information

Stat 5101 Lecture Notes

Stat 5101 Lecture Notes Stat 5101 Lecture Notes Charles J. Geyer Copyright 1998, 1999, 2000, 2001 by Charles J. Geyer May 7, 2001 ii Stat 5101 (Geyer) Course Notes Contents 1 Random Variables and Change of Variables 1 1.1 Random

More information

Asymptotic formulae for likelihood-based tests of new physics

Asymptotic formulae for likelihood-based tests of new physics Eur. Phys. J. C (2011) 71: 1554 DOI 10.1140/epjc/s10052-011-1554-0 Special Article - Tools for Experiment and Theory Asymptotic formulae for likelihood-based tests of new physics Glen Cowan 1, Kyle Cranmer

More information

Parametric Techniques Lecture 3

Parametric Techniques Lecture 3 Parametric Techniques Lecture 3 Jason Corso SUNY at Buffalo 22 January 2009 J. Corso (SUNY at Buffalo) Parametric Techniques Lecture 3 22 January 2009 1 / 39 Introduction In Lecture 2, we learned how to

More information

Bayesian Regression Linear and Logistic Regression

Bayesian Regression Linear and Logistic Regression When we want more than point estimates Bayesian Regression Linear and Logistic Regression Nicole Beckage Ordinary Least Squares Regression and Lasso Regression return only point estimates But what if we

More information

Lecture 3. G. Cowan. Lecture 3 page 1. Lectures on Statistical Data Analysis

Lecture 3. G. Cowan. Lecture 3 page 1. Lectures on Statistical Data Analysis Lecture 3 1 Probability (90 min.) Definition, Bayes theorem, probability densities and their properties, catalogue of pdfs, Monte Carlo 2 Statistical tests (90 min.) general concepts, test statistics,

More information

PoS(ACAT2010)057. The RooStats Project. L. Moneta CERN, Geneva, Switzerland K. Belasco. K. S. Cranmer. S.

PoS(ACAT2010)057. The RooStats Project. L. Moneta CERN, Geneva, Switzerland   K. Belasco. K. S. Cranmer. S. The RooStats Project CERN, Geneva, Switzerland E-mail: Lorenzo.Moneta@cern.ch K. Belasco Princeton University, USA K. S. Cranmer New York University, USA S. Kreiss New York University, USA A. Lazzaro CERN,

More information

LECTURE NOTES FYS 4550/FYS EXPERIMENTAL HIGH ENERGY PHYSICS AUTUMN 2013 PART I A. STRANDLIE GJØVIK UNIVERSITY COLLEGE AND UNIVERSITY OF OSLO

LECTURE NOTES FYS 4550/FYS EXPERIMENTAL HIGH ENERGY PHYSICS AUTUMN 2013 PART I A. STRANDLIE GJØVIK UNIVERSITY COLLEGE AND UNIVERSITY OF OSLO LECTURE NOTES FYS 4550/FYS9550 - EXPERIMENTAL HIGH ENERGY PHYSICS AUTUMN 2013 PART I PROBABILITY AND STATISTICS A. STRANDLIE GJØVIK UNIVERSITY COLLEGE AND UNIVERSITY OF OSLO Before embarking on the concept

More information

2D Image Processing (Extended) Kalman and particle filter

2D Image Processing (Extended) Kalman and particle filter 2D Image Processing (Extended) Kalman and particle filter Prof. Didier Stricker Dr. Gabriele Bleser Kaiserlautern University http://ags.cs.uni-kl.de/ DFKI Deutsches Forschungszentrum für Künstliche Intelligenz

More information

Leïla Haegel University of Geneva

Leïla Haegel University of Geneva Picture found at: http://www.ps.uci.edu/~tomba/sk/tscan/pictures.html Leïla Haegel University of Geneva Seminar at the University of Sheffield April 27th, 2017 1 Neutrinos are: the only particle known

More information

32. STATISTICS. 32. Statistics 1

32. STATISTICS. 32. Statistics 1 32. STATISTICS 32. Statistics 1 Revised April 1998 by F. James (CERN); February 2000 by R. Cousins (UCLA); October 2001, October 2003, and August 2005 by G. Cowan (RHUL). This chapter gives an overview

More information

Multivariate statistical methods and data mining in particle physics

Multivariate statistical methods and data mining in particle physics Multivariate statistical methods and data mining in particle physics RHUL Physics www.pp.rhul.ac.uk/~cowan Academic Training Lectures CERN 16 19 June, 2008 1 Outline Statement of the problem Some general

More information

Bayesian analysis in nuclear physics

Bayesian analysis in nuclear physics Bayesian analysis in nuclear physics Ken Hanson T-16, Nuclear Physics; Theoretical Division Los Alamos National Laboratory Tutorials presented at LANSCE Los Alamos Neutron Scattering Center July 25 August

More information

Statistics of Small Signals

Statistics of Small Signals Statistics of Small Signals Gary Feldman Harvard University NEPPSR August 17, 2005 Statistics of Small Signals In 1998, Bob Cousins and I were working on the NOMAD neutrino oscillation experiment and we

More information

Discovery Potential for the Standard Model Higgs at ATLAS

Discovery Potential for the Standard Model Higgs at ATLAS IL NUOVO CIMENTO Vol.?, N.?? Discovery Potential for the Standard Model Higgs at Glen Cowan (on behalf of the Collaboration) Physics Department, Royal Holloway, University of London, Egham, Surrey TW EX,

More information

Wald s theorem and the Asimov data set

Wald s theorem and the Asimov data set Wald s theorem and the Asimov data set Eilam Gross & Ofer Vitells ATLAS statistics forum, Dec. 009 1 Outline We have previously guessed that the median significance of many toy MC experiments could be

More information

17 : Markov Chain Monte Carlo

17 : Markov Chain Monte Carlo 10-708: Probabilistic Graphical Models, Spring 2015 17 : Markov Chain Monte Carlo Lecturer: Eric P. Xing Scribes: Heran Lin, Bin Deng, Yun Huang 1 Review of Monte Carlo Methods 1.1 Overview Monte Carlo

More information

A Convolution Method for Folding Systematic Uncertainties into Likelihood Functions

A Convolution Method for Folding Systematic Uncertainties into Likelihood Functions CDF/MEMO/STATISTICS/PUBLIC/5305 Version 1.00 June 24, 2005 A Convolution Method for Folding Systematic Uncertainties into Likelihood Functions Luc Demortier Laboratory of Experimental High-Energy Physics

More information

Confidence Limits and Intervals 3: Various other topics. Roger Barlow SLUO Lectures on Statistics August 2006

Confidence Limits and Intervals 3: Various other topics. Roger Barlow SLUO Lectures on Statistics August 2006 Confidence Limits and Intervals 3: Various other topics Roger Barlow SLUO Lectures on Statistics August 2006 Contents 1.Likelihood and lnl 2.Multidimensional confidence regions 3.Systematic errors: various

More information

Parametric Techniques

Parametric Techniques Parametric Techniques Jason J. Corso SUNY at Buffalo J. Corso (SUNY at Buffalo) Parametric Techniques 1 / 39 Introduction When covering Bayesian Decision Theory, we assumed the full probabilistic structure

More information

Lecture 2. G. Cowan Lectures on Statistical Data Analysis Lecture 2 page 1

Lecture 2. G. Cowan Lectures on Statistical Data Analysis Lecture 2 page 1 Lecture 2 1 Probability (90 min.) Definition, Bayes theorem, probability densities and their properties, catalogue of pdfs, Monte Carlo 2 Statistical tests (90 min.) general concepts, test statistics,

More information

STAT 425: Introduction to Bayesian Analysis

STAT 425: Introduction to Bayesian Analysis STAT 425: Introduction to Bayesian Analysis Marina Vannucci Rice University, USA Fall 2017 Marina Vannucci (Rice University, USA) Bayesian Analysis (Part 2) Fall 2017 1 / 19 Part 2: Markov chain Monte

More information

Two Early Exotic searches with dijet events at ATLAS

Two Early Exotic searches with dijet events at ATLAS ATL-PHYS-PROC-2011-022 01/06/2011 Two Early Exotic searches with dijet events at ATLAS University of Toronto, Department of Physics E-mail: rrezvani@physics.utoronto.ca This document summarises two exotic

More information

Confidence intervals and the Feldman-Cousins construction. Edoardo Milotti Advanced Statistics for Data Analysis A.Y

Confidence intervals and the Feldman-Cousins construction. Edoardo Milotti Advanced Statistics for Data Analysis A.Y Confidence intervals and the Feldman-Cousins construction Edoardo Milotti Advanced Statistics for Data Analysis A.Y. 2015-16 Review of the Neyman construction of the confidence intervals X-Outline of a

More information

Advanced event reweighting using multivariate analysis

Advanced event reweighting using multivariate analysis Advanced event reweighting using multivariate analysis D Martschei, M Feindt, S Honc, J Wagner-Kuhr Institut für Experimentelle Kernphysik - Karlsruhe Institute of Technology KIT, DE E-mail: martschei@ekp.uni-karlsruhe.de

More information

Advanced statistical methods for data analysis Lecture 1

Advanced statistical methods for data analysis Lecture 1 Advanced statistical methods for data analysis Lecture 1 RHUL Physics www.pp.rhul.ac.uk/~cowan Universität Mainz Klausurtagung des GK Eichtheorien exp. Tests... Bullay/Mosel 15 17 September, 2008 1 Outline

More information

Brandon C. Kelly (Harvard Smithsonian Center for Astrophysics)

Brandon C. Kelly (Harvard Smithsonian Center for Astrophysics) Brandon C. Kelly (Harvard Smithsonian Center for Astrophysics) Probability quantifies randomness and uncertainty How do I estimate the normalization and logarithmic slope of a X ray continuum, assuming

More information

CPSC 540: Machine Learning

CPSC 540: Machine Learning CPSC 540: Machine Learning MCMC and Non-Parametric Bayes Mark Schmidt University of British Columbia Winter 2016 Admin I went through project proposals: Some of you got a message on Piazza. No news is

More information

The lmm Package. May 9, Description Some improved procedures for linear mixed models

The lmm Package. May 9, Description Some improved procedures for linear mixed models The lmm Package May 9, 2005 Version 0.3-4 Date 2005-5-9 Title Linear mixed models Author Original by Joseph L. Schafer . Maintainer Jing hua Zhao Description Some improved

More information

A Calculator for Confidence Intervals

A Calculator for Confidence Intervals A Calculator for Confidence Intervals Roger Barlow Department of Physics Manchester University England Abstract A calculator program has been written to give confidence intervals on branching ratios for

More information

Statistical Methods for Particle Physics Lecture 2: statistical tests, multivariate methods

Statistical Methods for Particle Physics Lecture 2: statistical tests, multivariate methods Statistical Methods for Particle Physics Lecture 2: statistical tests, multivariate methods www.pp.rhul.ac.uk/~cowan/stat_aachen.html Graduierten-Kolleg RWTH Aachen 10-14 February 2014 Glen Cowan Physics

More information

CosmoSIS Webinar Part 1

CosmoSIS Webinar Part 1 CosmoSIS Webinar Part 1 An introduction to cosmological parameter estimation and sampling Presenting for the CosmoSIS team: Elise Jennings (Fermilab, KICP) Joe Zuntz (University of Manchester) Vinicius

More information

Investigation of Possible Biases in Tau Neutrino Mass Limits

Investigation of Possible Biases in Tau Neutrino Mass Limits Investigation of Possible Biases in Tau Neutrino Mass Limits Kyle Armour Departments of Physics and Mathematics, University of California, San Diego, La Jolla, CA 92093 (Dated: August 8, 2003) We study

More information

Stat 516, Homework 1

Stat 516, Homework 1 Stat 516, Homework 1 Due date: October 7 1. Consider an urn with n distinct balls numbered 1,..., n. We sample balls from the urn with replacement. Let N be the number of draws until we encounter a ball

More information

Statistical Methods for Particle Physics Lecture 3: Systematics, nuisance parameters

Statistical Methods for Particle Physics Lecture 3: Systematics, nuisance parameters Statistical Methods for Particle Physics Lecture 3: Systematics, nuisance parameters http://benasque.org/2018tae/cgi-bin/talks/allprint.pl TAE 2018 Centro de ciencias Pedro Pascual Benasque, Spain 3-15

More information

Hypothesis Testing - Frequentist

Hypothesis Testing - Frequentist Frequentist Hypothesis Testing - Frequentist Compare two hypotheses to see which one better explains the data. Or, alternatively, what is the best way to separate events into two classes, those originating

More information

Relevance Vector Machines for Earthquake Response Spectra

Relevance Vector Machines for Earthquake Response Spectra 2012 2011 American American Transactions Transactions on on Engineering Engineering & Applied Applied Sciences Sciences. American Transactions on Engineering & Applied Sciences http://tuengr.com/ateas

More information

Confidence Distribution

Confidence Distribution Confidence Distribution Xie and Singh (2013): Confidence distribution, the frequentist distribution estimator of a parameter: A Review Céline Cunen, 15/09/2014 Outline of Article Introduction The concept

More information

Statistics for the LHC Lecture 1: Introduction

Statistics for the LHC Lecture 1: Introduction Statistics for the LHC Lecture 1: Introduction Academic Training Lectures CERN, 14 17 June, 2010 indico.cern.ch/conferencedisplay.py?confid=77830 Glen Cowan Physics Department Royal Holloway, University

More information

Development of Stochastic Artificial Neural Networks for Hydrological Prediction

Development of Stochastic Artificial Neural Networks for Hydrological Prediction Development of Stochastic Artificial Neural Networks for Hydrological Prediction G. B. Kingston, M. F. Lambert and H. R. Maier Centre for Applied Modelling in Water Engineering, School of Civil and Environmental

More information

Lecture 5: Bayes pt. 1

Lecture 5: Bayes pt. 1 Lecture 5: Bayes pt. 1 D. Jason Koskinen koskinen@nbi.ku.dk Photo by Howard Jackman University of Copenhagen Advanced Methods in Applied Statistics Feb - Apr 2016 Niels Bohr Institute 2 Bayes Probabilities

More information