34
1 Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09 Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09 Statistische Methoden der Datenanalyse Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009

Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

  • Upload
    others

  • View
    7

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

1Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09

Statistische Methoden der Datenanalyse

Kapitel 1: Fundamentale Konzepte

Professor Markus Schumacher

Freiburg / Sommersemester 2009

Page 2: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

2Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09

Data analysis in particle physics

Observe events of a certain type

Measure characteristics of each event (particle momenta,number of muons, energy of jets,...)

Theories (e.g. SM) predict distributions of these propertiesup to free parameters, e.g., a, GF, MZ, as, mH, ...

Some tasks of data analysis:

Estimate (measure) the parameters;

Quantify the uncertainty of the parameter estimates;

Test the extent to which the predictions of a theoryare in agreement with the data.

Prof. Markus Schumacher Prediscussion for Lecture on

Page 3: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

3Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09Lecture 1 page 3

Dealing with uncertainty

In particle physics there are various elements of uncertainty:

theory is not deterministic

quantum mechanics

random measurement errors

present even without quantum effects

things we could know in principle but don‟t

e.g. from limitations of cost, time, ...

We can quantify the uncertainty using PROBABILITY

Prof. Markus Schumacher Prediscussion for Lecture on Statistical Data Analysis Uni. Siegen / SS08

Page 4: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

4Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09Lecture 1 page 4

A definition of probability

Consider a set S with subsets A, B, ...

Kolmogorovaxioms (1933)

From these axioms we can derive further properties, e.g.

Prof. Markus Schumacher Prediscussion for Lecture on Statistical Data Analysis Uni. Siegen / SS08

Page 5: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

5Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09Lecture 1 page 5

Conditional probability, independence

Also define conditional probability of A given B (with P(B) ≠ 0):

E.g. rolling dice:

Subsets A, B independent if:

If A, B independent,

N.B. do not confuse with disjoint subsets, i.e.,

Prof. Markus Schumacher Prediscussion for Lecture on Statistical Data Analysis Uni. Siegen / SS08

Page 6: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

6Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09Lecture 1 page 6

Interpretation of probability

I. Relative frequencyA, B, ... are outcomes of a repeatable experiment

cf. quantum mechanics, particle scattering, radioactive decay...

II. Subjective probabilityA, B, ... are hypotheses (statements that are true or false)

• Both interpretations consistent with Kolmogorov axioms.• In particle physics frequency interpretation often most useful,

but subjective probability can provide more natural treatment of non-repeatable phenomena:

systematic uncertainties, probability that Higgs boson exists,...

Prof. Markus Schumacher Prediscussion for Lecture on Statistical Data Analysis Uni. Siegen / SS08

Page 7: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

7Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09Lecture 1 page 7

Bayes’ theorem

From the definition of conditional probability we have,

and

but , so

Bayes‟ theorem

First published (posthumously) by theReverend Thomas Bayes (1702−1761)

An essay towards solving a problem in thedoctrine of chances, Philos. Trans. R. Soc. 53(1763) 370; reprinted in Biometrika, 45 (1958) 293.

Prof. Markus Schumacher Prediscussion for Lecture on Statistical Data Analysis Uni. Siegen / SS08

Page 8: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

8Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09Lecture 1 page 8

The law of total probability

Consider a subset B of the sample space S,

B ∩ Ai

Ai

B

S

divided into disjoint subsets Ai

such that [i Ai = S,

→ law of total probability

Bayes‟ theorem becomes

Prof. Markus Schumacher Prediscussion for Lecture on Statistical Data Analysis Uni. Siegen / SS08

Page 9: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

9Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09Lecture 1 page 9

An example using Bayes’ theorem

Suppose the probability (for anyone) to have AIDS is:

← prior probabilities, i.e.,before any test carried out

Consider an AIDS test: result is + or -

← probabilities to (in)correctlyidentify an infected person

← probabilities to (in)correctlyidentify an uninfected person

Suppose your result is +. How worried should you be?

Prof. Markus Schumacher Prediscussion for Lecture on Statistical Data Analysis Uni. Siegen / SS08

Page 10: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

10Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09Lecture 1 page 10

Bayes’ theorem example (cont.)

The probability to have AIDS given a + result is

i.e. you‟re probably OK!

Your viewpoint: my degree of belief that I have AIDS is 3.2%

Your doctor‟s viewpoint: 3.2% of people like this will have AIDS

← posterior probability

Prof. Markus Schumacher Prediscussion for Lecture on Statistical Data Analysis Uni. Siegen / SS08

Page 11: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

11Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09

Frequentist Statistics − general philosophy

In frequentist statistics, probabilities are associated only withthe data, i.e., outcomes of repeatable observations (shorthand: ).

Probability = limiting frequency

Probabilities such as

P (Higgs boson exists), P (0.117 < as < 0.121),

etc. are either 0 or 1, but we don‟t know which.

The tools of frequentist statistics tell us what to expect, underthe assumption of certain probabilities, about hypothetical

repeated observations.

The preferred theories (models, hypotheses, ...) are those for which our observations would be considered „usual‟.

Page 12: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

12Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09Lecture 1 page 12

Bayesian Statistics − general philosophy

In Bayesian statistics, use subjective probability for hypotheses:

posterior probability, i.e., after seeing the data

prior probability, i.e.,before seeing the data

probability of the data assuming hypothesis H (the likelihood)

normalization involves sum over all possible hypotheses

Bayes‟ theorem has an “if-then” character: If your priorprobabilities were p (H), then it says how these probabilities

should change in the light of the data.

No general prescription for priors (subjective!)

Page 13: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

13Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09Lecture 1 page 13

Random variables and probability density functions

A random variable is a numerical characteristic assigned to an element of the sample space; can be discrete or continuous.

Suppose outcome of experiment is continuous value x

→ f(x) = probability density function (pdf)

Or for discrete outcome xi with e.g. i = 1, 2, ... we have

x must be somewhere

probability mass function

x must take on one of its possible values

Page 14: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

14Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09Lecture 1 page 14

Cumulative distribution function

Probability to have outcome less than or equal to x is

cumulative distribution function

Alternatively define pdf with

Page 15: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

15Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09

Mean, median and mode

e.g.: Maxwells‟s velocity distribution

Page 16: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

16Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09Prof. Markus Schumacher Chapter 2: Fundamenal

Obtaining PDF from Histograms

pdf = histogram with

infinite data sample,

zero bin width,

normalized to unit area

Page 17: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

17Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09

Multivariate distributions

Outcome of experiment charac-

terized by several values, e.g. an

n-component vector, (x1, ... xn)

joint pdf

Normalization:

Page 18: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

18Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09

Marginal pdf

Sometimes we want only pdf of some (or one) of the components:

→ marginal pdf

x1, x2 independent if

i

Page 19: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

19Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09Lecture 1 page 19

Marginal pdf (2)

Marginal pdf ~ projection of joint pdf onto individual axes.

Page 20: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

20Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09

Conditional pdf

Sometimes we want to consider some components of joint pdf as constant. Recall conditional probability:

→ conditional pdfs:

Bayes‟ theorem becomes:

Recall A, B independent if

→ x, y independent if

Page 21: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

21Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09

Conditional pdfs (2)

E.g. joint pdf f(x,y) used to find conditional pdfs h(y|x1), h(y|x2):

Basically treat some of the r.v.s as constant, then divide the joint pdf by the marginal pdf of those variables being held constant so

that what is left has correct normalization, e.g.,

Page 22: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

22Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09

WDF für zwei Variablen mit Abhängigkeit

Page 23: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

23Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09Prof. Markus Schumacher Chapter 2: Fundamenal

2.4 Functions of a random variable

A function of a random variable is itself a random variable.

Suppose x follows a pdf f(x), consider a function a(x).

What is the pdf g(a)?

dS = region of x space for whicha is in [a, a+da].

For one-variable case with uniqueinverse this is simply

Page 24: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

24Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09Prof. Markus Schumacher Chapter 2: Fundamenal

Mapping the x and a spaces

probability in a-space g(a)da

equals one in x-space f(x)dS

figure from Lutz Feld

Page 25: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

25Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09

Mapping the x and a spaces

Page 26: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

26Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09

Mapping the x and a spaces: two „branches“

Page 27: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

27Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09Prof. Markus Schumacher Chapter 2: Fundamenal

Functions without unique inverse

If inverse of a(x) not unique, include all dx intervals in dSwhich correspond to da:

Example:

Page 28: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

28Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09Prof. Markus Schumacher Chapter 2: Fundamenal

Functions of more than one r.v.

Consider r.v.s and a function

dS = region of x-space between (hyper)surfaces defined by

Page 29: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

29Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09

Functions of more than one r.v. (2)

Example: r.v.s x, y > 0 follow joint pdf f(x,y),

consider the function z = xy. What is g(z)?

(Mellin convolution)

Page 30: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

30Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09Prof. Markus Schumacher Chapter 2: Fundamenal

More on transformation of variables

Consider a random vector with joint pdf

Form n linearly independent functions

for which the inverse functions exist.

Then the joint pdf of the vector of functions is

where J is the

Jacobian determinant:

For e.g. integrate over the unwanted components.

Page 31: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

31Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09G. Cowan

Lectures on Statistical Data Analysis

Lecture 1 page 31

Expectation values

Consider continuous r.v. x with pdf f (x).

Define expectation (mean) value as

Notation (often): ~ “centre of gravity” of pdf.

For a function y(x) with pdf g(y),

(equivalent)

Variance:

Notation:

Standard deviation:

s ~ width of pdf, same units as x.

Page 32: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

32Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09

Covariance and correlation

Define covariance cov[x,y] (also use matrix notation Vxy) as

Correlation coefficient (dimensionless) defined as

If x, y, independent, i.e.,

, then

→ x and y, „uncorrelated‟

N.B. converse not always true.

Page 33: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

33Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09

Correlations

Page 34: Statistische Methoden der Datenanalyse Kapitel 1 ......Kapitel 1: Fundamentale Konzepte Professor Markus Schumacher Freiburg / Sommersemester 2009 Prof. M. Schumacher Stat Meth. der

34Prof. M. Schumacher Stat Meth. der Datenanalyse Kapi,1: Fundamentale Konzepten Uni. Freiburg / SoSe09

Korrelationen