cornelia parker colder dark matter

118
Cornelia Parker Colder Dark Matter Introduction to Carlos Mana Astrofísica y Física de Partículas CIEMAT

Upload: leal

Post on 09-Jan-2016

44 views

Category:

Documents


1 download

DESCRIPTION

Cornelia Parker Colder Dark Matter. Introduction to. Monte Carlo. Carlos Mana Astrofísica y Física de Partículas CIEMAT. Monte Carlo. stochastic process. problem. solution. Theory of Probability and Statistics. What is the Monte Carlo method ?. numerical method. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Cornelia Parker   Colder Dark Matter

Cornelia Parker Colder Dark Matter

Introduction to

Carlos Mana Astrofísica y Física de PartículasCIEMAT

Page 2: Cornelia Parker   Colder Dark Matter

numerical method

…or simulate it in a computer

Outcome

What is the Monte Carlo method ?

What kind of problems can we tackle ?

Magic Box?,…,more information?...

incapability?

What do we get ?

problemDesign theexperimen

t

Why Monte Carlo ?

Theory of Probability and Statistics

stochastic process

solution

problem

Monte Carlo

How does it work ?

Do it

Particle physics, Bayesian inference,…

Page 3: Cornelia Parker   Colder Dark Matter

A bit of

history… 1777 : G. Louis Leclerc

(Compte de Buffon)

“Essai d’arithmetique morale”; Supplement a l’Histoire Naturelle, Vol 4, 1777.

 

l

dPcut

2

 

Calculated the probability that a needle (of length d)thrown randomly on an array of parallel bands (of width l d) cuts the dividing lines among the bands

He actually did the experiment as a cross-check.

 

Page 4: Cornelia Parker   Colder Dark Matter

1886 : P. S. De Laplace

“Theorie Analitique des Probabilités”.

Points out that the experiment of Buffon could be used to estimate the from a random process (... although with a large uncertainty).

1901 : W. Thomson (Lord Kelvin) 

Used a random sampling to evaluate (“try”?) some integrals related to the

Kinetic Theory of Gasses.

His sampling consists on picking up numbered papers from a well stirred hat.

… but he was more worried about the biases induced from not being well stirred,

the effect of the static electricity,…

12~

throws

cuts

N

N

l

d

Page 5: Cornelia Parker   Colder Dark Matter

1908 : W. S. Gosset (Student) 

“Probable error of a Correlation Coefficient”; Biometrika 6, 302 (1908). 

He was interested in the distribution of the statistic for small samples. For this:

1)    Calculated the first 4 moments of the distribution of and found that they were the same as those for the Pearson’s curve of type III (2).

Assumed (correctly) that this was the distribution followed by ; 

2)  Showed that the statistics and were not correlated and assumed (again correctly) that they were independent;

  3)   From 1) and 2), he derived (simple integral) the distribution followed by ; 

4) He did a table of the Distribution Function for sample sizes n=4 and n=10 checking that for n=10 there was a good agreement with the Normal Distribution;

 

s

xt

x 2s

2s

2s

t

)(tFn

N

iixN

x1

12

1

2 )(1

xxN

sN

ii

Finally, he checked experimentally the assumed hypothesis with a random sampling. For this, he measured the height and middle finger length of 3000 prisoners grouping them in 750 samples of size n=4. The empiric distribution, based on the 750 experimental measurements, was in very good agreement (Pearson´s 2 test) with his tables.

Page 6: Cornelia Parker   Colder Dark Matter

1940’s : J. von Neuman, S. Ulam, N. Metropolis, E. Fermi, ...

1930’s : E. Fermi Used random samplings to study the diffusion and transport of the recentlydiscovered neutrons and its interactions with condensed matter.

Developed several techniques of random sampling (method that they “Monte Carlo”) to study different problems related to the atomic bomb in Los Álamos (using the ENIAC); in particular, to analyse the transport of neutrons at to estimate the eigenvalues of the Schrodinger’s equation.

J. von Neuman and the ENIAC

Page 7: Cornelia Parker   Colder Dark Matter

Example: Estimation of (… a la Laplace)

Probability that a draw falls inside the circumference 4)(

)( S

C

C

S

X {Point falls inside the circumference}

trialsNevent

4

),|(~ NxBiX

)2/1,2/1|(~ nNnBe

N

n4~

… for large N:

N

6.1)~(

100 83 3.32 0.15031000 770 3.08 0.0532

10000 7789 3.1156 0.0166100000 78408 3.1363 0.0052

1000000 785241 3.141 0.0016

Throws (N)  Accepted (n) N

n4~

21

~)~4(~

N

The dependence of the uncertainty with is a general feature of the Monte Carlo estimations regardless the number of dimensions of the problem

N1

Important and General Feature of Monte Carlo estimations:

Page 8: Cornelia Parker   Colder Dark Matter

Need sequences of random numbers

Basis of Monte Carlo simulations

Get a sequence

 

of random numbers

 

nzzz ,..., 21

Get a sampling of size n from a

stochastic process

 

generate sequences of (pseudo-)random numbers on a computer

…or simulate it on a computer

Design theexperimen

t

Do it

1,0|~ xUnX D

Do not do the experiment but….

Page 9: Cornelia Parker   Colder Dark Matter

n

j

kjk x

nm

1

1

5002.01 m

0833.02 sam 0025.01 sam

0003.0

2029.12 sam

5000.0

1210833.02

0.01

562.12

1,0xUn

kj

kn

jjk xx

knc

1

1

00076.0),( 1 ii xx

00096.0),( 2 ii xx

00010.0),( 3 ii xx

Sampling moments:

Sample size: 106 events

Page 10: Cornelia Parker   Colder Dark Matter

TricksNormal DistributionM(RT)2 (Markov

Chains)Gibbs Sampling,….

 

Great! But life is not uniform…

Usually a combination of

them

Inverse Transform

Aceptance-Rejection (“Hit-Miss”)

“Importance Sampling”,…

 

How?

We can generate pseudo-random sequences

 

kzzz ,..., 21 )1,0(~ zUnZwith

Physics, Statistics,… we want

to generate sequences from ),...,,( 21 nxxxp

Page 11: Cornelia Parker   Colder Dark Matter

Method 1: Inverse Transform

We want to generate a sample of )(~ xpX

yxdFyFXPyXFPyYPyF

)|(

0

1

1

)|()|()|(

1,0:)( XXFY How is distributed?

)1,0(xUn ~)|( XFY

Y

)1,0(~ uUnui)(1 YFX )(1 ii uFx

n)

)(~,..., 21 xpxxx n

i) Sample )1,0(~ xUnY

ii) Transform

Algorithm

Page 12: Cornelia Parker   Colder Dark Matter

Examples: Sampling of

xexp )( xexF 1)(

)1,0(~) uUnui i

iii

uuFxii

ln)() 1

)(~ xExX

Sampling of )()( ),0[

121

212 xexxp x

)1,0(~) uUnui i

2

1

1

1 ln1

)|()

iii uuFxii θ

),(~ 21 xWeX

)1(xEx

…some fun…

)(1)( ),0[

21 xexF x

)7.1,2.0(xWe

Page 13: Cornelia Parker   Colder Dark Matter

4) If and

Proble

m:

)1,0(~ xUnX

1) Generate a sample :

nxxx ,..., 21610n

)(2

3)(~ ]1,1[

2 xxxpX I21

11)1,0(~

xxCaX

2) Get for each case the sampling distribution of

m

kkm X

mY

1

1

}50,20,10,5,2{m

3) Discuss the sampling distribution of in connection with the Law of Large Numbers and the Central Limit Theorem

mY

]1,0[1

n

kkn UW)1,0(~ xUnX How is

distributed? nn WZ log

5) If ),0(~ kxGaX kHow is distributed?

mn

nn XX

XZ

6) If ),|(~ ii xGaX i

iXY

(assumed to be independent random quantities)

How is distributed?

Page 14: Cornelia Parker   Colder Dark Matter

)1,0(~ xUnX )(2

3)(~ ]1,1[

2 xxxpX I

21

11)1,0(~

xxCaX

Page 15: Cornelia Parker   Colder Dark Matter

For discrete random

quantities 00 )0( pXPF

101 )1( ppXPF

2102 )2( pppXPF

...,2,1,0k

0p 1p 2p

0F 1F 2F0 1

kpkXpX )(~

…………………

)1,0(~ uUnuikxi

n

) )(~,..., 21 xpxxx n

i) Sample )1,0(~ xUnU

ii) Find

Algorithm

kik FuFk 1

Page 16: Cornelia Parker   Colder Dark Matter

Example: Sampling of )|(~ XPoX

)1(!

)(

kXPkk

ekXP

k

)1,0(~) uUnui i

1)) kk pk

paii

kkk pFFb 1)

kik FuF 1

0kfrom until

k

50,000 events

)2(kPo

ep0

Sampling of nNn

n

NNXBiX

1),|(~

),|1(1

1),|(

NnXP

n

nNNnXP

)1,0(~) uUnui i

11

1))

nn p

n

nNpaii

nnn pFFb 1)

Np 10

nin FuF 1

0nfrom until

50,000 events

)5.0,10(nBi

n

Page 17: Cornelia Parker   Colder Dark Matter

Even though discrete distributions can be sampled this way,… usually one can find more efficient algorithms…

)1,0|(~ uUnui

]1,0[1

n

kkn UW

1)log()(

1)|(~

n

nnn wn

nwpW

a

nxn dxxe

naW

log

1

)(

1)(P

ea )1()1(

)(1

0

nXm

eeWn

m

m

n PoP

i) generate

ii) multiply them

iii) deliver

nn uuw 1ewn

and go to i) while

)|(~1 xPonx

)|(~ XPoX

)1,0|(~ uUnU i

Example:

Page 18: Cornelia Parker   Colder Dark Matter

Generalization to n dimensions … trivial but …

)()(),...,(),...,(),...,,( 1112212111121 xFxxFxxxFxxxFxxxF nnnnnnn

)()(),...,(),...,(),...,,( 1112212111121 xpxxpxxxpxxxpxxxp nnnnnnn

… but if not ...

and

there are ways to decompose the pdf and some are easier to sample than

others

!n

n

iiin xFxxxF

121 )(),...,,(

n

iiin xpxxxp

121 )(),...,,(

if are independentkX

Page 19: Cornelia Parker   Colder Dark Matter

Example

: 1,0;,0;exp2),(~),(

yxy

xyxpYX

ydxyxpypy 2),()(0

x

u

x duu

exdyyxpxp 2

1

0

2),()(

)()(),( ypxpyxp yx not independent Conditional

Densities:

Marginal

Densities:

y

yx

ypyxp

yxpy

exp

)(),(

)(

y

xyxFx exp1)(

easy

dificu

lt 2)( yyFy

)()|(),( ypyxpyxp y )()|(),( xpxypyxp x

Page 20: Cornelia Parker   Colder Dark Matter

Properties:

Direct and efficient in the sense that

Useful for many distributions of interest

)1,0(~ uUnui )(~ xpxi

on

e on

e

(Exponential, Cauchy, Weibull,

Logistic,…) )( xF…but in general, difficult to invert

numeric approximations are slow,

Page 21: Cornelia Parker   Colder Dark Matter

Method 2: Acceptance-Rejection

“Hit-Miss”J. Von Neuman,

1951

k

dzdzdzdzzzg 21

2121 )|,(

),( 21 ZZZ2) Consider a two-dimensional random

quantityuniformly distributed in the

domain k,0, ; that is:

)|(max xp

)|( xp

a b

k

0

))|(,( xpyx k,0,

,, ba kxp ,0)|(max,0

1) Enclose the pairs in a domain

such that:and

],[ baX X Sample )(~ xpX

)|(max)|(0 xpxp

3) Which is the conditional distribution

? ))|(( 21 xpZxZP

(not necessarily hypercube)

Page 22: Cornelia Parker   Colder Dark Matter

)|(max xp

)|( xp

a b

k

0

accepted

rejected

)(xF

11],[1

11],[1

)|(

0

2211

)|(

0

2211

)()|(

)()|(

)|,(

)|,(

1

1

dzzzp

dzzzp

dzzzgdz

dzzzgdz

ba

x

ba

zp

zpx

))|((

))|(,(

22

21

xpZP

xpZxZP))|(( 21 xpZxZP

)(~ xpXn)

i) Sample

ii) Get

Algorithm

1Z ),(~ 11 zUnz i

2Z ),0(~ 22 kzUnz iand

if )( 12 ii zpz accept ii zx 1and go back to

i) if )( 12 ii zpz reject ii zx 1

)(~,..., 21 xpxxx n

Page 23: Cornelia Parker   Colder Dark Matter

Example

: 1,0;1),|( 11 xxxbaxp ba

),(~ baxBeX

density:

(pedagogical; low efficiency)

Covering adjusted for maximum efficiency:

2

11

max )2(

)1()1(),|2

1(),(max

ba

ba

ba

bababa

axpbaxp

),( yx

),(max,01,0,0, baxpk

generated in the domain

(normalisatio

n: ),(,1

0

baBedxbaxp …not needed

Page 24: Cornelia Parker   Colder Dark Matter

i) Sample )1,0(~ xUnxi

ii) Accept-Reject n) )),(,0(~ baxpmaxyUnyi

if ),( baxpy ii

),( baxpy ii if

accept ix

reject ixand go to i)

7.5;3.2 ba

3864.0gen

accff n

ne

),(max)( baxp

016791.0)()(

gen

acc

n

ndxxp

X

Algorithm

1000000accn2588191genn

)000013.0(

01678944.0)7.5,3.2( Be

)7.5,3.2|(xBe

),(max,01,0 baxp

Page 25: Cornelia Parker   Colder Dark Matter

… you may hear about weighted events ???

We can do the rejection as follows:

i) Assign a weight to each generated pair

)1,0(~ uUnui

ii) Acceptance-rejection

ii wu accept if

10 iw

reject if ii wu

Obviously, events with a larger weight are more likely to be accepted

After step ii), all weights are: 01

if rejected

if accepted

kxp ,0)|(max,0

),( ii yx

ix

ix

k

xpw ii

)(

Sometimes, it is interesting not to apply step ii) and keep the weights

n

ii

n

iiip

wwwxgw

xgdxxpxgx

11

;1

)()(

iw

Page 26: Cornelia Parker   Colder Dark Matter

And suddenly…

)(max xpk

Many times we do not know and start with an initial guess )(max xp 1k

After having generated events in the domain tN

we find a value

1,0, k

1)|(| kxp m mx

incorrect estimation of

(e.g.: usual case for matrix element for n-dimensional final states)

)|( xp

a b

1k

0

mx

Don't throw away all

generated events…

Page 27: Cornelia Parker   Colder Dark Matter

The pairs ),( yx have been generated in

with constant density so with 21 )()( k

NN

k

N ett

1

1

2

kk

NN te

we have to generate:

additional pairs

),( yx

… in the domain 21,, kk

with the pseudo-distribution

12 )|( kxpk m

1,0, k

)(11 xkxpxg kxp 1

22 ,0, k … and proceed with

Page 28: Cornelia Parker   Colder Dark Matter

Properties:

Easy to implement and generalize to n

dimensions Efficiency

)( xparea under

1fe

1fe is equivalent to the Inverse Transform method

The better adjusted the covering is, the higher is the efficiency

area covering

domain # generated events # accepted events

gen

accf N

Nedxxp

X

)()()(

k,0, covering domain

)|(max xp

)|( xp

a b

k

0

accepted

rejected

Page 29: Cornelia Parker   Colder Dark Matter

Straight forward generalisation to n dimensions

i) Generate n+1 distributed random

quantities

ii) Accept or reject k)

)|,...,,( ))2)1 niiii xxxpy

if accept

reject if not and go back to i)back to i)

Algorithm:

...)()(~);,...,,( 2)2

1)1))2)1 xUnxUnyxxx i

niii

),0()(... ) kyUnxUn nn

),...,,( ))2)1 niii xxx

)( xUn

Page 30: Cornelia Parker   Colder Dark Matter

Cover the toroid by a

parallelepiped: Points inside a toroid of radius ),( oi rr 0,0,0centred at

iioioioioi rrrrrrrrrr ,)(),()(),(

Algorithm: i) Generate ))(),((~ oioii rrrrxUnx

ii) Reject if n)

)0,0,0,,(),,(),...,,,(),,,( 222111 ionnn rrTzyxzyxzyx

222 )( oiii rryx

otherwise accept

And go back

to i)

(pedagogical; low efficiency) 3D Example:

))(),((~ oioii rrrryUny ),(~ iii rryUnz

222 )( oiii rryx or or 222

1220

2 ))(( iiii ryxrz

),,( iii zyx

ir 0,0,0

or

Page 31: Cornelia Parker   Colder Dark Matter

000,5acceptedN786,10generatedN

4636.0generated

accepted

N

N128ipedparallelepV

61,034,59 ipedoparallelepftoroid VeV

218,59toroidV

3;1 oi rr

knowing that: we can

estimate:

20

20

2

8

2

ii

if

rrr

rr

ipedparallelepvolume

toroidvolumee

Page 32: Cornelia Parker   Colder Dark Matter

),( yx ),( zx ),( zy

(3,1

,0)

(3,2

1)

Problem 3D:

,,,, rmln

,,, mlln YrR

mlnrP ,,,,

sin, 22

,2

, rYrR mlln

Sampling of Hidrogen atom wave functions

Evaluate the energy using Virial Theorem

(3,2

,0)

VT 21

nnVE 2

1

r

erV

1

4)(

0

2

Page 33: Cornelia Parker   Colder Dark Matter

02

)2/(/2)()( 2/

nn

n

n

nf

nnHVSV

e

n-dimensional sphere of radius centred at

Example in n-dimensions:

Problems with low efficiency

1r )0,...,0,0(

ii) Aceptance-rejection:

i) Sample

if accept as inner point of the sphere

or

over the surface

if reject the n-tuple and go back to

i)

1,11,1~,, ))1))1 nnii xUnxUnxx

2)2)22)12 niii xxxy

y

x

y

x nii

))1

,,

))1 ,, nii xx 12 y

12 y

(problem for convergence of estimations,…)

Page 34: Cornelia Parker   Colder Dark Matter

Why do we have low efficiency? Most of the samplings are done in

regions of the domain of the random quantity with low probablity

Example:

Generate values of xuniformly in 1,0x

]1,0[;1

)(~

xee

xpX x

Sampling of

… do a more clever sampling…

usually used in combination with “Importance

Sampling”

ee

xFx

11

)(xe

exp

1)(

Page 35: Cornelia Parker   Colder Dark Matter

Example of inefficiencies: Usual problem in Particle Physics…

231111 2)|,,,()|,,()|,,( qnjjnjjnn dmpppqdqppdpppd

)|,(||)2(

12

4

pppdiMF

d nnfi

ii) Acceptance-rejection on

i) Sample phase-space variables

2|| fiiM

)|,( 1 pppd nn

]|[| 2fiiMEiii) Estimate cross-section

Problem: Simple and usually inefficient generation of n-body phase-space

sample of events with dynamics of the process

Page 36: Cornelia Parker   Colder Dark Matter

21121211 1

)|,()|,,()|,,( qnnnn dmppqdqppdpppd

21222232121 2)|,()|,,()|,,( qnnnn dmqpqdqppdqppd 1p

p

12 1)( mMmmm pqn

4p

np

2p

2q

1q

23 12)( mmmmm qqn

n

kiik mS

)( 223 12SmuSm qq

)1,0(~1 Unu

)1,0(~2 Unu

11

6212

||

)2(4

1)|,( d

m

ppppd

p

and then weight each event…

2

0

2/1 ),,(1

n

k q

qknqT

k

kk

m

mmmW

+ Lorentz boosts to overall centre of mass system

])(][)([),,( 2222 zyxzyxzyx

1q

3p

np

2p

3p

kqqnk mmmmmkk

1)( 1

)(11 kqkkq SmuSm

kk

)( 112 01SmuSm qq

nqpq mmMmn

10;In rest-frame: p

)1,0(~Unuk

2,,1 nk for the intermediate states

…but , cuts,…!2|| fiiM

Page 37: Cornelia Parker   Colder Dark Matter

Method 3: Importance Sampling

Sample

)(~ xpX

)( xp1) Express as )()()( 21 xhxgcxp

Xxxhxg ;0)()( 21 0c

)( 2xh probability density

dxxhxgc )()( 21 )()( 21 xdHxgc

dxxp )(

2) Consider a sampling of

and apply the acceptance-rejection algorithm to

)( 1xg)(~ 2xhX

How are the accepted values distributed?

0)( 2 xh

)(

)()(

21

xh

xpxg

In particular:

Page 38: Cornelia Parker   Colder Dark Matter

xdxp

xdxp

xdxgxh

xdxgxhxx

)(

)(

)()(

)()(

12

12

)|(

2

)|(

2

1

1

1

1

)|(1

)|(1

)|(

)|(,

xg

x xg

dyxdxh

dyxdxh

xgYP

xgYxXP

YX

)()()( YX

i) Sample )(~ 2xhxiii) Apply Acceptance-

Rejection to

Algorithm

)( 1xg

)()()( 21 xhxgcxp sample drawn from

nxxx ,..., 21

…but how do we choose )( 2xh ?

)|(| 1xgYxXP

)|( xF

Page 39: Cornelia Parker   Colder Dark Matter

Take as “close” as possible to

… ways ...

Easiest choice: )(1

],[2 xab

xh ba1

… is just the aceptance – rejection procedure

Easy to invert so we can apply the Inverse Transform Method

We would like to choose so that, instead of sampling uniformly the whole domain , we sample with higher probability from those regions where is “more important”

x)( 2xh

)( xp

)( 2xh )( xp

will be ”as flat as possible” (“flatter” than ) and we shall have a high efficiency when applying the acceptance-rejection

)(

)()(

21

xh

xpxg )( xp

Page 40: Cornelia Parker   Colder Dark Matter

Example

: )(1),|( ]1,0[

11 xxxbaxp ba 1

),(~ baxBeX

density:

7.5;3.2 ba

1111

11

11

1),|(

nmnm

ba

xxxx

xxbaxp

5][;2][ bnam

21 ; nbma

]1][1[ 1121 nm xxxx

dxd

),|( nmxdBed

1) We did “standard” acceptance-

rejection 2) “Importance

Sampling”

Page 41: Cornelia Parker   Colder Dark Matter

21

21

)()}(max{

21

21

xf

21 1)( xxxf

1,0x

]1][1[),|( 1121 nm xxxxbaxp

2.1) Generate ),(~ nmxBeX)1,0(~ xUnU k

),1(~)log(1

mxGaUYm

kkm

),(~ nmxBe

YY

YZ

nm

m

2.2) Acceptance-Rejection

on )(xf concave on

)5,2(xBe

)1,0(xUn )5,2(xBe

)7.5,3.2(xBe

)1,0(xUn

21

1max )}(max{|

xfx

1,0 21

Page 42: Cornelia Parker   Colder Dark Matter

)7.5,3.2(xBe

acceptance-rejection Importance Sampling

3864.0eff

max)7.5,3.2( feffBe

016791.0000013.0

9279.0eff

0167912.00000045.0

1077712genn 1000000accn2588191genn 1000000accn

01678944.0)7.5,3.2( Be

)5,2()7.5,3.2( max BefeffBe

Page 43: Cornelia Parker   Colder Dark Matter

)|()|(1

xpaxpm

iii

Each density

1;0 i

ii aa

m

ii

m

iii adxxpadxxp

11

1)|()|(

has a relative weight

)|( xpi ia

Sample )|(~ xpX i

with

probability ii ap … thus, more often from those with larger

weight

Idea:

Normalisation:

Method 4: Decomposition

0)|( xpi

xx

mi ,1

Decompose the p.d.f as a sum of simpler densities

(… trick)

Page 44: Cornelia Parker   Colder Dark Matter

i) Generate to select with probability )1,0(~ uUnui

)(~ xpX i

n)

ii) Sample

Algorithm

)|( xpi ia

Note: Sometimes the p.d.f. can not be easily integrated…

iii Iaw

)|( xpi… normalisation unknown ...

Evaluate the normalisation integrals

(numeric integration) and asign eventually a weight to each event

iI during the generation process

Page 45: Cornelia Parker   Colder Dark Matter

Example: 1)(1 xg

]1,1[;18

3)(~ 2 xxxpX

21)(1 xpnormalisatio

n

)(4

1)(

4

3)( 21 xpxpxp

i)

Generate )1,0(~ uUnui

43iu 1

43 iuii) Sample

from: 2

2 )( xxp

15% of the times 75% of the times

Algorithm:2

2 )( xxg 23)(

2

2xxp

21)( xxp

constxp )(1

constxp )(1

22 )( xxp

Page 46: Cornelia Parker   Colder Dark Matter

Generalisation:

Extend )(1

xgm

ii

dyyg )(to a continuous

family and consider

as a marginal density: )|( xp

yy

dyypyxpdyyxpxp )|(),()|,()|(

Algorithm:i) Sample )|(~ ypyi

ii) Sample n)

),(~ ii yxpx

Structure in bayesian analysis

)()|()|( xpxp

Experimental resolution

)|( xpobs

y

),|( yxR )|( yptheo dy

Page 47: Cornelia Parker   Colder Dark Matter

Standardisation

X

Z

but...

22

2

1)1,0(~

zezNZ

ZX

ii) Central Limit Theorem:

i) Inverse Transform: is not an elementary function

entire function series expansion convergent but inversion slow,…

iii) Acceptance - Rejection: not efficient although…

iv) Importance Sampling: easy to find good approximations

12

1

6i

iUZ)1,0(~ uUnU i

Sometimes, going to higher dimensions helps: in two dimensions…

)(zF

The Normal Distribution 2

2

2)(

2

1),(~

x

exNX

1)(;0][;]6,6[ ZVZEZ )1,0(~ zNZapprox

Page 48: Cornelia Parker   Colder Dark Matter

i) Consider two independent random quantities

)1,0(~, 21 xNXX 2

2212

1

21 21

),(xx

exxp

),(),( 21 RXX

sin2 RX

ii) Polar

Transformation: )()(

2

1),( 2

2

prprerpr

iii) Marginal Distributions:

…trivial inversion

2

2

0

2

1),()(r

r edrprF

2

),()(0

drrpF

Inverse Transform in two

dimensions

),( R

cos1 RX

)2,0[),0[

independe

nt

Page 49: Cornelia Parker   Colder Dark Matter

n

)

i) Generate

ii) Invert and to get

Algorithm )1,0(~, 21 uUnuu

22 u 1ln2 ur

)(rFr )(F

)1,0(~, 21 xNxx

111 2cos)ln(2 uux 112 2sen)ln(2 uux

iii) Obtain as

(independent)

Page 50: Cornelia Parker   Colder Dark Matter

Sampling from Conditional Densities

),,,,,(~),( 21212121 xxNXXStandardisatio

n

i

iii

XW

)(),|()|,( 11221 wpwwpwwp

)1,0|())1(,|( 12

1212 wNwwN

)1,0|(~1

22

122 zN

WWZ

)1,0|(~)( 111 zNWZ

)1( 2

212

11

2

1

2

1

zz

z

x

x

)1,0(~, 21 zNzzi) Generate

ii)

Example: 2-dimensional Normal random quantity

Page 51: Cornelia Parker   Colder Dark Matter

n-dimensional Normal Density … different ways

nnV

TCCV

Factorisation Theorem:(Cholesky)

symmetric and positive definedif

C unique, lower triangular and with positive diagonal elements

such that

niVV

C ii 1;

11

11

nijC

CCVC

jj

j

kjkikij

ij

1;

1

1

niCVCi

kikiii

1;2

11

1

21

take ),(~ VμxX N

such that

if

C),(~ I0yY N

CYμX and

since it is triangular inferior matrix

ijCij ;0

111 CCVT )()( 111 μxCμxCμxVμx TT

Page 52: Cornelia Parker   Colder Dark Matter

Algorithm:

0) Determine matrix C Vfrom

i) Generate n independent random quantities

each as

nzzz ,...,, 21

)1,0(~ zNzi

ii) Get

n

jjijii zx

1

C),(~ Vμxx N

)(1 μxCz

zCμx n)

2221

2121

V 111

1111

V

VC

211

2121

C

VC

012 C

22 1

21

2212222 CVC

222

1

1

0

C

zCμx )1,0(~, 21 zNzz

Example: 2-dimensional Normal random quantity

Page 53: Cornelia Parker   Colder Dark Matter

Example: Interaction of photons with matter

(Compton scattering)

Page 54: Cornelia Parker   Colder Dark Matter

Rayleigh (Thomson)

Pairs e+e-

Photoelectric

Photonucle

ar Absorptio

n

Compton

Interaction of Interaction of photons with photons with

mattermatter

Page 55: Cornelia Parker   Colder Dark Matter

Photon beam

Carbon

Iron

Photographic film

Radiography

Page 56: Cornelia Parker   Colder Dark Matter

x

eIxI 0)(

x

ints eNxNNxN 1)()( 00

x

intsint eN

xNxF 1)()(

0

x0

Photon beam

Probability to interact after travelling distance x

,0;

1)( xexp

x

int

)(xE

“Mean Free Path”

1) Where do we have the first/next interaction?

)(xN0N

dxeN

dxxNxNdxxpdxxxP

xintsints

intint

1)()()(),(

0

“Beer-Lambert law”

Page 57: Cornelia Parker   Colder Dark Matter

Get the “mean free path”

1 mol of (Z,A)

In normal conditions:

NA atoms : A grams

(gr/cm3) 3cmatoms

A

N A

gr1

atomsA

N A

= cross-section

= “probability of interaction” with atom expressed in cm2

paresComptont

x

int exF1)(

)1,0(~ uUnu cmux ln

… Inverse Transform

Generate distance until the next interaction

in 1 cm3 …

in there are

cmN

A

At

Page 58: Cornelia Parker   Colder Dark Matter

220 )21(

31)21ln(

21

)21ln(1

21)1(21

4)(

aa

aa

aaa

aaa

E Thomson

freeatomic ee

)()( 0 EZEt

cmNEZ

A

A)]([ 0

freeeatomatom

In this example, we shall simulate only the Compton process so I took the “Mean Free Path” for Compton Interaction

1

1

dxdxd

Page 59: Cornelia Parker   Colder Dark Matter

paresComptont t

ComptonComptonp

t

pairspairsp

)1,0(~ uUnu

pairsCompton ppF 2

ComptonpF 1

pairsComptoni ppF

2) What kind of process?

1nF

1Fu

21 FuF

Compton

pairs

Page 60: Cornelia Parker   Colder Dark Matter

3) Compton Interaction

easy:

)cos1(11

aE

Ein

out

e

inE

outE

e

in

m

Ea ,0

0 1 inout EEmaxE

a21

1

a

EEminE

inout

21

Perturbative expansion in Relativistic Quantum

Mechanics

)(8

3xf

dxd Thomson

22410665.0665.0 cmbarnThomson

)1(1

)1(1

)1(1

1)(

222

2 xaxa

xxa

xf

1,1cos x

2,0(integrated)

2 variables (8-2-4) ,

Page 61: Cornelia Parker   Colder Dark Matter

)()(1)()2(

1)(21

12

xfxfxfx

xg

nn xaxf

)1(1

1)(

)()()()()( 321 xgxfxfxfxf

easy to invert… Inverse Transform

“fairly flat”… Acceptance-rejection

0)( xfn

0)( xg

)1(1

)1(1

)1(1

1)(

222

2 xaxa

xxa

xf

3.1) Generate polar angle for the outgoing photon ()

straight-forward acceptance-rejection very inefficient...

very complicated to apply inverse transform…

Use: Decomposition + inverse transform + acceptance-rejection

1,1cos x

Page 62: Cornelia Parker   Colder Dark Matter

)()()()()( 331 xgxfxfxfxf

)(1

)( xfw

xp ii

i

1

1

)( dxxfw ii

1

1

1)( dxxpi2233 )1(

2

bab

w

)1(2222

ba

w

ba

w ln1

1

ab 21

)()()()( 332211 xgxpwxpwxpw

)()()()( 332211 xgxpxpxpwT 321 wwwwT

T

ii w

w

1321

)()()( xfxgxhwT

Probability Densities

… we have everything...

)()()()()( 331 xgxfxfxfxf

Page 63: Cornelia Parker   Colder Dark Matter

1) Sample

b

xaxF

ln)1(1ln

1)(1

axbb

xF21

)(21

)(2

2

1

)()1(

)1(41

)( 2

2

3 xbb

aaxF

)1,0(~ uUnu

aba

xu

g

1

auba

bxg 21)1( 2

21

)1(41

1

uaa

bbxg

Inverse transform

x

ii dsspxF1

)()(

acceptance-rejection ),0(~ MguUnu

)(xgmaxgM

)( gxgu

211)1(

bbb

xg

)( gxgu

accept

reject

gx

gx

)1,0(~ uUnu

1u

211 u

u 21

)(~ 1 xpxg

)(~ 3 xpxg

)(~ 2 xpxg

Decomposition

)()()()(~ 332211 xgxpxpxpwX Tg

Page 64: Cornelia Parker   Colder Dark Matter

e

0,0, inE

gggout xE ),(acos,

gwith respect to the direction of incidence of the photon !! …

rotation

)1(1 g

inout

xa

EE

2-body kinematics

a

EE inoute

11

ae

12cot

tan

)2,0(~ Ung

)(~ xfxg

… for the electron:

cosx

in

out

E

E

N

e e

Page 65: Cornelia Parker   Colder Dark Matter

100,000 generated photons

MeV1inE

)26.2,12,6(: 3 cmgrAZ C

)87.7,85.55,26(: 3 cmgrAZ Fe

trajectory of one

photon

Page 66: Cornelia Parker   Colder Dark Matter

END OF FIRST PARTEND OF FIRST PART

To come: Markov Chain Monte Carlo (Metropolis, Hastings, Gibbs,…)Examples: Path Integrals in Quantum Mechanics

Bayesian Inference

Page 67: Cornelia Parker   Colder Dark Matter

),|(~ pnkBiX

)(1 kXPk

knk ppk

npnkXP

)1(),|(

nk ,,2,1,0

121 ,,, n π

1;01

1

n

iii

11

45.0

10

binsn

p

n

nk ,,1,0

Method 5: Markov Chain Monte Carlo

Page 68: Cornelia Parker   Colder Dark Matter

knkXP ;111

11)(

121 ,,, nddd

Nd

Nd

Nd n

n121)0(

1)0(

2)0(

1)0( ,,,,,, π

)111,,1( nkUnD

N=100,000 generated

Ndn

ii

1

1

First step done: We have already the N=100,000 events

kkXP )(

Second step: re-distribute them moving each event from its present bin to a different (or the same) one to get eventually a sampling from

number of bins = 11

Sample probability vector

HOW?

Page 69: Cornelia Parker   Colder Dark Matter

),|( pnjXP In one step: an event in bin i goes to bin j with probability

… But this is equivalent to sample from ),|( pnkBi

Sequentially: At every step of the evolution, we move all events from the bin where they are to a new bin (may be the same) with a migration probability

populations step

probability vector

)1(1

)1(2

)1(1

)1( ,,,

in

iii π

)(1

)(2

)(1

)( ,,, in

iii π

)1(1

)1(2

)1(1 ,,,

i

nii ddd

)(i

)1( i

)0(1

)0(2

)0(1 ,,, nddd )0( )0(

1)0(

2)0(

1)0( ,,, n π

)(

1)(

2)(

1 ,,, in

ii ddd

)|()()( ijajiPij P

Page 70: Cornelia Parker   Colder Dark Matter

kkkk PπPπPππ )0(2)2()1()(

Pππ )0()1( 2)0()1()2( PπPππ

)0(π

nnnn

n

n

ppp

ppp

ppp

21

22221

11211

P

Transition Matrix among states

Goal: Find a Transition Matrix N ,,, 21 π)0(πthat allows us to go from to

nnP

Transition Matrix is a Probability Matrix

n

j

n

jij jiPp

11

1)( the probability to go from state i to whatever some other state is 1

Markov Chain with transition matrix P

)1( iπ )(iπ )( ijπdepends upon and not on

Transitions among states of the system

Page 71: Cornelia Parker   Colder Dark Matter

irreducible : all the states of the system comunicate among themselves

recurrent : being at one state, we shall return to it with

and ergodic: that is, the states of the system are

Remainder: If the Markov Chain is…

1ppositive: we shall go to it in after a finite number of steps

aperiodic: the system is not trapped cycles

i) There is a unique stationary distribution with (unique fix vector)

πPπ

ii) Starting at any arbitrary state , the sequence

tends asymptotically to the fix vector iii)

)0(π

,,,, )0()1()()0()1()0( nnn PπPππPπππ

N

N

N

nlim

21

21

21

P

πPπ π

Page 72: Cornelia Parker   Colder Dark Matter

A sufficient condition (not necessary) for to be a fix vector of is that P

ways to choose the Probability Transition Matrix π

the Detailed Balance relation is satisfied jijiji )()( PP

πPPPPπ

N

iiNi

N

iii

N

iii

112

11 ,,,

N

ikkik

N

iiki

11

PP Nk ,,2,1

Why? πPπ It assures that

Page 73: Cornelia Parker   Colder Dark Matter

After specifying according to the

Accept the migration with probability

populations step )(

1)(

2)(

1)( ,,, i

niii

π)(i )(1

)(2

)(1 ,,, i

nii ddd

For each event at bin choose a candidate bin 11,...,1ito go (j) among the 11 possible ones as

ii) ji Accept the migration with probability ijaii ija1

For

all

the

11

bins

probability vector(state of the system)

)11,1|(kUndisc

)1(1

)1(2

)1(1

)1( ,,,

in

iii π )1(1

)1(2

)1(1 ,,,

i

nii ddd )1( i

Procedure to follow

i)

ijij ajiP )()(PDetailed Balance

condition

Page 74: Cornelia Parker   Colder Dark Matter

ππ )(i

ilim

)|()|( jiaija ji i

j

i

jji ija

,1min)|( 1,1min)|(

j

ijia

1,1min)|(

i

jji ija

j

i

j

ijia

,1min)|(

jijiji )()( PP

How do we take so that

jijjijijiiji aa )()( PP

),,,(lim 1010)( pppi

i ππ)|( ijaaij

Page 75: Cornelia Parker   Colder Dark Matter

For instance, at step t …

7i

2j

)11,1( jUnD

For an event in bin

)1,0(~ uUnu 026.0u

026.0026.0)6(

)1(,1min)27(

7

272

XP

XPaa

Move event to bin 2

Choose a bin j to go as

026.0u Leave event in bin 7

6j .147.1)6(

)5(,1min)67(

7

676

XP

XPaa

Move event to bin 6

45.0

10

p

n

67

27

Page 76: Cornelia Parker   Colder Dark Matter

After 20 steps…

)45.0,10|(~ pnkBiX

Page 77: Cornelia Parker   Colder Dark Matter

5.4][ NXE

475.2)1(][ NXV

k k

kkKL p

ppppD ~log]~|[

Convergence?

Watch for trends, correlations, “good mixing”,…

Page 78: Cornelia Parker   Colder Dark Matter

Still Freedom to choose the Transition Matrix

Basis for Markov Chain Monte Carlo simulation

Detailed Balance Condition P

Trivial election: jij )(P ijji

Select a new state migrating events from one bin to another with probability kkXP )(

ijij aijq )()(P

Simple probability to choose a new possible bin j for an event that is

at bin i

probability to accept the proposed new bin j for an event at bin i taken in such a way that the Detailed Balance Condition is satisfied

jijiji )()( PP

Page 79: Cornelia Parker   Colder Dark Matter

Metropolis-Hastings algorithm

)(

)(,1

ijq

jiqmina

i

jij

1)(

)(,1

jiq

ijqmina

ji

iji

)(

)(

)(

)(,1

ijq

jiq

ijq

jiqmina

i

j

i

jij

)(

)()()(

ijq

jiqijqaijq

i

jiiji

jijj ajiqjiq )()( jij )(P

iji )(P

)()( jqijq

but better as close as possible to desired distribution for high acceptance probability

1)( iji ajiq

Can take: )()( jiqijq (not symmetric), even

If symmetric: )()( jiqijq

Page 80: Cornelia Parker   Colder Dark Matter

Metropolis algorithm

i

jij mina

,1)()( jiqijq

(symmetric)

For absolute continuous distributions

Probability density function )|( θx

)()|()( xxxxxx aqp

)|()|(

)|()|(,1min)(

xxθx

xxθxxx

q

qa

Xxx ,

)|(~ θxX

Page 81: Cornelia Parker   Colder Dark Matter

)1()( 3 sss

)2,4(~ xBeX

)()()( ssassqssp

sssq 2)( )1,0()( sUnssq

)1()1(

,1)( 3

3

ssss

minssa

)1()1(

,1)( 2

2

ssss

minssa… and after 20 steps..

Example:

step=1

Metropolis-Hastings

Metropolis

)1,0(~ xUnX

step=0

step=1

Page 82: Cornelia Parker   Colder Dark Matter

2) Generate a proposed new value from the distribution

),|(),|( )1()1( xxxx tt qq(symmetric)

),|(),|( )1()1( xxxx tt qq

)|(

)|(,1min),(

)1()1(

θx

θxxx

tta

),|(

),|(

)|(

)|(,1min),(

)1(

)1(

)1()1(

t

t

tt

q

qa

xx

xx

θx

θxxx

3) Accept the new value with probability

x

x

4) If accepted, set xx )(t )1()( tt xx Otherwise, set

1) At step , choose an admissible arbitrary state

)0(x 0)|(; )0()0( θxx x

1tt

0t

In practice, we do not proceed as in the previous examples, (meant for illustration)

Once equilibrium reached…

1) Need some initial steps to reach “equilibrium” (stable running conditions)

2) For samplings, take draws every few steps to reduce correlations (if important)

Metropolis Metropolis-Hastings

different steps different samplings from “same” distribution

(not symmetric)

Page 83: Cornelia Parker   Colder Dark Matter

Sencillo y potente... Esencialmente cualquier densidad independientemente del número de

dimensiones, complejidad analítica,...

Muestreo “correcto” asintóticamente

Necesarias pasadas (sweeps) previos de termalización para

aproximarnos al límite asintótico

Cambios de configuración dependen de:

Normalización no es importante

Propiedades :

Correlaciones entre diferentes estados … aun asi, única solución en

muchos casos...

)()(

)()(

ssqs

ssqsr

Page 84: Cornelia Parker   Colder Dark Matter

So… How can we get a sampling with

Method 5: Markov Chain Monte Carlo with Gibbs Sampling

Some (“many”) times, we do not have the explicit expression of the p.d.f. …

For instance, usual case in Bayesian Inference…

nxx ,1 )(~ xpX

if we do not know the explicit form of ? )(xp

Page 85: Cornelia Parker   Colder Dark Matter

2) Sample the n-dimensional random quantity from the conditional distributions

121

213

312

321

,,,/

,,/

,,,/

,,,/

nn

n

n

n

xxxxp

xxxxp

xxxxp

xxxxp

Conditionals have usually, simpler expressions

nXXX ,,, 21 X nxxxp ,,, 21

nn dxdxxxxpxpX 22111 ),,,()(~

Basic Idea:

X

1) Consider the problem in a space with more dimensions

marginal density

)(~ 11 xpXWe want a sampling of

Page 86: Cornelia Parker   Colder Dark Matter

Consider:

nxxxxq ,,,, 321

2) The conditional densities

121

213

312

321

,,,/

,,/

,,,/

,,,/

nn

n

n

n

xxxxq

xxxxq

xxxxq

xxxxq

3) An arbitrary initial state Z))0(,),0(),0(( 21 nxxx

1) The probability density function

(usually less than n are needed)

)()|()( xxxxxx aqp

First, sampling from conditional densities:

Page 87: Cornelia Parker   Colder Dark Matter

4) Sampling of the random quantities at

1tstep

nkX k ,,1;

Z ))1(,),1(),1(( 21 txtxtx n

tstep )(txk kX

)1(,),1(),(,),(),(/ 1121 txtxtxtxtxxq nkkk

Generate a possible new value of

from the conditional density

t 1t

Propose a change of the system from

)1(,),1(),1(),(,),(),( 1121 txtxtxtxtxtxs nkkk

)1(,),1(),(),(,),(),( 1121 txtxtxtxtxtxs nkkk the state

the state

to

tstep

Page 88: Cornelia Parker   Colder Dark Matter

At the end of step

Desired density nxxxp ,,, 21

Acceptance factor

)1(,),1(),1(),(,),(),(

)1(,),1(),(),(,),(),(

1121

1121

txtxtxtxtxtxp

txtxtxtxtxtxp

nkkk

nkkk

Metropolis-Hastings:

),1min()( ssa

nxxx ,,, 21 nxxxp ,,, 21

the sequences

regardless the starting sampling

so we shall accept the change with probability

)1(,),1(),(,),(),(/)(

)1(,),1(),(,),(),(/)1(

1121

1121

txtxtxtxtxtxq

txtxtxtxtxtxq

nkkk

nkkk

will converge towards the stationary p.d.f

Z))(,),(),(( 21 txtxtx nt

Z))0(,),0(),0(( 21 nxxx

But his is just Metropolis-Hastings… Gibbs algorithm…

Page 89: Cornelia Parker   Colder Dark Matter

)1(,),1(),(,),(),(/

)1(,),1(),(,),(),(/

1121

1121

txtxtxtxtxxp

txtxtxtxtxxq

nkkk

nkkk

)1(,),1(),(,),(),(

)1(,),1(),1(),(,),(),(

)1(,),1(),(,),(),(/)1(

)1(,),1(),(,),(),(/)1(

1121

1121

1121

1121

txtxtxtxtxp

txtxtxtxtxtxp

txtxtxtxtxtxp

txtxtxtxtxtxq

nkk

nkkk

nkkk

nkkk

)1(,),1(),(,),(),(

)1(,),1(),(),(,),(),(

)1(,),1(),(,),(),(/)(

)1(,),1(),(,),(),(/)(

1121

1121

1121

1121

txtxtxtxtxp

txtxtxtxtxtxp

txtxtxtxtxtxp

txtxtxtxtxtxq

nkk

nkkk

nkkk

nkkk

11)( ssa

Take as conditional densities to generate a proposed value the desired conditional densities

So we accept the “proposed” change with probability

Gibbs Algorithm:

acceptance factor:

))2

)1

)1)12

)11 ,,,,,,,, m

nmm

n xxxxxx

After enough steps to erase the effect of the initial values in the samplings and to achieve a good approximation to the asymptotic limit, we shall have sequences

),,,(~ 21 nxxxp

Page 90: Cornelia Parker   Colder Dark Matter

152.0,101.0,262.0,273.0,211.0)0( x

1)0( k

kx

112

11

0 21

)(

)()|(

nn

kk

xxxp

αx

5,4,3,2,1α

)|(~ αxX Di

n

kkx

1

1

0k

]1,0[kx

k

k 0

5n

11 )1(),|( nkkkkkk xSxsxp α

},,,...,,{ 11121 nkkk xxxxxs

n

kjj

jk xS1

),|(~1 nk

k

kk zBe

S

xz

Example:

Page 91: Cornelia Parker   Colder Dark Matter

)|(~ xStX

2

12

1)|(

xxp

;

)(

0

1

duue u

Problem: Gibbs sampling from conditionals

Sampling of

1) Introduce a new randon quantity U

considering that

and sample from andXU | UX |

2) Do it for the particular case

5

0][ XE

667.1][ 2 XE

)5|(~ xStX

Page 92: Cornelia Parker   Colder Dark Matter

Quantum Mechanics

Page 93: Cornelia Parker   Colder Dark Matter

paths

txSi

iiff txDtxtxK e )(),,()(

Path Integral formulation of Q.M. (R.P. Feynman)

f

i

t

t

dttxxLtxS ;,

Probability Amplitude

Local Lagrangians (additive actions)

dxtxtxKtxtxKtxtxK iiffiiff ,,,,,, Chapman-

Kolmogorov

n

infn

ttEi

iiff xxtxtxK e ifn )()(),,()(

Feynman-Kac Expansion Theorem

ifiiiffffff ttdxtxtxtxKtx ;,,,,Propagator

),( ii tx

),( ff tx

)(tx

)(

)()()(

)(

txD

txDtxAA

ee

txSi

txSi

Expected Value of an operator xA

Page 94: Cornelia Parker   Colder Dark Matter

)()(21

;, 2 txVtxmtxxL

ittei 2

it Wick Rotation

f

i

dttxVtxmitxS

)]([)(2

1 2

One Dimensional Paticle

n

infn

E

iiff xxxxK e ifn )()(),,()( Feynman-Kac

expansion theorem

0 if xx0i

nnn

E

f e fnK )0()0()0,0,0(

)0()0( 11

1 e fE

Page 95: Cornelia Parker   Colder Dark Matter

),,,(exp),,( 1011

11

NN

x

N

x

Niiff xxxSdxdxAtxtxKN

N

jj

jjNN xV

xxmxxxS

1

2

110 )(

21

,,,

Discretised time

1

1

)]([N

jjN dxAtxD

intt 0

finn tt

1t2t

1nt2nt

1it

it

1x2x

ix

1ix2nx

1nx

nttn 0

),,,(exp

),,,(exp),,,(

10

1

1

1010

1

1

NN

N

jj

NNN

N

jj

xxxSdx

xxxSxxxAdx

A

Page 96: Cornelia Parker   Colder Dark Matter

),,,(exp

),,,(exp),,,(

10

1

1

1010

1

1

NN

N

jj

NNN

N

jj

xxxSdx

xxxSxxxAdx

A

),,,(exp),,,( 1010 NNN xxxSxxxp

),,,,( )(1

1

)(10 N

kN

N

k

k xxxxAAtray

(importance sampling)

Goal: generat

e trayN as

and estimate

Very comlpicated

Markov Chain Monte Carlo

Page 97: Cornelia Parker   Colder Dark Matter

2)(21

)( txktxV

N

jj

jjNN xk

xxmxxxS

1

2

2

110 2

,,,

Harmonic Potential

0)(0 intxx

0)( finN txx

1,,1; Njx j

10,10jx

25.02000N

1000termN3000trayN 1000utilN

0 finin xx0int

finn tt

1t2t

1nt2nt

1it

it

1x2x

ix

1ix2nx

1nx

Parameters

)( continuot)( NN fin

To isolate fundamental state

Termalisation and correlations

Page 98: Cornelia Parker   Colder Dark Matter

1) Generate initial trajectory

3) Repeat 2)

),,,,( )0(1

)0(10 NN xxxx

2) Sweep over 11 ,, Nxx

N-1

vece

s )10,10(~ xUnx j

),,,,,(exp)( 10 NjNjj xxxxSxxP

),,,,,(exp)( 10 NjNjj xxxxSxxP

)(

)(,1)(

jj

jjjj xxP

xxPminxxa

),(),(exp,1 1111 jjjNjjjN xxxSxxxSmin

1000termN times

3000trayN4) Repeat 2) times and take one trajectory out of

3

trajectories 1000utilN 0,,,,0 110 NN xxxx

Generación de trayectorias

Page 99: Cornelia Parker   Colder Dark Matter

Virial Theorem

)(21

xVxT

2

21

xkVT

2)(21

)( txktxV

2xkVTE

1)(

4)(

22

atxa

txV

443 2

242

axx

aE

axa

VT 4

Harmonic Potential

Quartic Potential

Page 100: Cornelia Parker   Colder Dark Matter

486.00

2

0 xE

5.00

exactE

Page 101: Cornelia Parker   Colder Dark Matter

5a

1)(

4)(

22

atxa

txV

25.09000N

668.044

3 2

0

2

0

420

axx

aE

Quartic Potential

697.00

exactE

Page 102: Cornelia Parker   Colder Dark Matter

Bayesian Inference

Page 103: Cornelia Parker   Colder Dark Matter

θφθθxφxφ dppp )|()|()()|(

θφθθx

φθθxxφθ

dpp

ppp

)|()|(

)|()|(),|(

φθφφθθxθxy ddppypp )()|()|()|()|(

)()|()|()|(),,,( φφθθxθφθxy ppypp

θφ

parameter(s) of interest

nuisance parameter(s)

Usually:

)()|()|(),,( φφθθxφθx ppp Parametric inference

Predictive inference

Last comment… Bayesian inference…

Model to describe data )|( θxp

Page 104: Cornelia Parker   Colder Dark Matter

(In either case… )

nxxx 21

n 21

nxxx 21

n

iiiixp

1

)()|(

)()|()|(1

n

iiii pxp

)()|(),( xx pp

n

iixp

1

)()|(

n 21

nxxx 21

)()|()|(),,( φφθθxφθx ppp

)()|(),( θθxθx pp

One experiment (same conditions)

Results from isolated experiments ( ndependent)

Parameters come from a common “super-population” governed by hyperparameters

}{ 21 n φ φ

)()|()( φφθθ

Page 105: Cornelia Parker   Colder Dark Matter

),|(~ iiii NnBiX

n

i

nNi

ni

iiip1

)1(~),|( θNn

n

i

bnNi

ani ba

babababappbap iii

1

11

)()(

)()1(),(~),(),|(),|()|,,,( θθNnNθn

),|(~ baBe ii },{ baφ

n

i i

iii

ba

ba

baN

bnNanbabap

1 )()(

)(

)(

)()(),(~),|,( Nn

ba,

n

i iii

ibnNi

ani bnNan

baNbap iii

1

11

)()(

)()1(~),,,|( Nnθ

),|(),,,|( bnNanBeNnbap iiiiiii

),(,),,(),,( 12211 NxNxNx nexperimental sample

model

prior with hyperparameters

Page 106: Cornelia Parker   Colder Dark Matter

115 Z=2 events

97 candidates of 3He

18 candidates of 4He

15.0)3|4( P

80.0)4|4( P

85.0)3|4(1)3|3( PP

20.0)4|4(1)4|3( PP

Page 107: Cornelia Parker   Colder Dark Matter

115 Z=2 events 97 candidates of

3He 18 candidates of

4He15.0)3|4( P

80.0)4|4( P85.0)3|4(1)3|3( PP

20.0)4|4(1)4|3( PP

Page 108: Cornelia Parker   Colder Dark Matter

Probability to have a nucleus identified as 3He

Probability that nucleus is 3He )3(P

10)4()4|3()3()3|3( aaPPPP

33 )1(~)),(|( 433nNnnnNnp

baBbap

ba

,

)1(),|(

11

baBbaNbanp

bnNan

,

)1(),()|,,,(

11

3

33

baB

bnNanBbaNnbapba

,

,),(),|,(~, 33

3

bnNanBNbanp

bnNan

33

11

3 ,

)1(),,,|(~

33

i) Generate

ii) Generate

iii) Get1

0

a

a

Page 109: Cornelia Parker   Colder Dark Matter

)|(~ xStX

2

12

1)|(

xxp

),|(~ uGaU

1

)(),|(

ueup u

12

1)(),|,(

ueuxp ux

2

1)( xx

2

1

)(

0

1

duue u

0

1)(

)(

1)|(

xduuexp ux

)),(|(~| xuGaXU

)2,0|(~| uxNUX

Example: Simple drawing from conditionals

)5|(~ xStXBeta=3 - addition property of

Gamma

Page 110: Cornelia Parker   Colder Dark Matter

BAYESIAN UNFOLDING

Page 111: Cornelia Parker   Colder Dark Matter

)(inObs

Observed Distribution: Number of events observed at bin i

Data (distorted by resolution, backgrounds, acceptances,…)

Unknown True Distribution

)21)(( 2xxp

Page 112: Cornelia Parker   Colder Dark Matter

H1: We know (can simulate) the effect of the resolution on the true distribution (or backgrounds, acceptances, etc)

0) Start drawing a sample of events from a initial distribution [the closer to the “true” one the better] and simulate the effect of the resolution

From step 0) we get:

)( jnC

)(inE

),( jin

Cause: events generated in bin j

Effect: events observed at bin i

Migration: number of events produced in bin j and observed at bin i

Page 113: Cornelia Parker   Colder Dark Matter

1) Determine the probability that an event that has been produced (generated) in bin j ends (is observed) at bin i

binsn

i

jinS1

1 ),(1

),()(

S

jinCEP jiEC

1)(1

binsn

ijiEC CEP All the events produced in bin j

have to end up at some bin

This probability depends only on the effects of the resolution, etc…

)(1 jiEC CEP

Page 114: Cornelia Parker   Colder Dark Matter

2) Determine the probability of the “cause” (at this moment, the one we generated at step 0); uniform in this example

binsn

i

jinS1

1 ),(

binsn

jC

CjC

jn

jnCP

1

)(

)()(

)(1 jiEC CEP

)(2 jC CP

Page 115: Cornelia Parker   Colder Dark Matter

3) Determine the probability of the “effect” (event observed at bin i) by the Theorem of Total Probability

binsn

jjCjiECiE CPCEPEP

1

)()()(

)(1 jiEC CEP

)(2 jC CP

)(3 iE EP

Page 116: Cornelia Parker   Colder Dark Matter

4) Determine the probability that the “cause” is j having observed the “effect” at i (event was produced at j and observed at i) with Bayes’s Theorem

)(

)()()(

iE

jCjiEC

ijCE EP

CPCEPECP

)(1 jiEC CEP

)(2 jC CP

)(3 iE EP

)(4 ijCE ECP

Page 117: Cornelia Parker   Colder Dark Matter

)(inObs5) We have observed events at bin i

binsn

iijCEObsjC ECPinCn

1

)()()(ˆ

The number of events tha we assign to the “cause” j is:

)(1 jiEC CEP

)(2 jC CP

)(3 iE EP

)(4 ijCE ECP

thus, the probability assigned to the “cause” j is:

binsn

ijC

jCjC

Cn

CnCP

1

)(ˆ

)(ˆ)(ˆ

)(ˆjC CP

)(ˆ)5 jC Cn

Page 118: Cornelia Parker   Colder Dark Matter

)(1 jiEC CEP

)(2 jC CP

)(3 iE EP

)(4 ijCE ECP

)(ˆjC CP

)(ˆ)5 jC Cn

Keep iterating until we “see” (Q2,KL,…) no significant changes in the distribution of

)(ˆ jC Cn

6) Iterations