A muon-decay experiment records decay times in the window
PHYSICS · Multi-part · Fermi University Physics · Scientific Practice & Experimental Methods · Computational Physics · Data analysis and model fitting in the laboratory
Error, Chance and the Machine, Ch Markov-chain Monte Carlo
Problem
A muon-decay experiment records N=1000 decay times in the window 0≤t≤T=10μs. A fraction b of the recorded times are stray signals, uniform on the window, so one recorded time has density f(t∣τ,b)=(1−b)τ(1−e−T/τ)e−t/τ+Tb, where τ is the mean life. Generate the data with NumPy's default generator (PCG64), seed 1, τ=2.197μs and b=0.05: draw u = rng.random(1000) and then v = rng.random(1000). Event i is a stray signal if ui<b, and then ti=Tvi. Otherwise ti=−τln[1−vi(1−e−T/τ)]. Take the prior π(τ,b) flat on 0<τ≤20μs and 0≤b≤1.
((a)) Write lnL(τ,b) and the target p(τ,b∣t). Explain why the prior needs the upper limit on τ.
((b)) Sample the target by random-walk Metropolis with separate Gaussian steps sτ and sb, rejecting any proposal outside the box. Tune the steps with pilot runs of 5000 steps from (2.2μs,0.05), seed 7, until the acceptance lies between 0.3 and 0.5. Report the acceptance for the steps (0.15μs,0.03).
((c)) With those steps, run four chains from (τ0,b0)=(1.0μs,0.30), (6.0μs,0.02), (4.0μs,0.60) and (2.0μs,0.90), PCG64 seeds 100 to 103. Each chain discards 2000 steps and keeps 20000; draw xi = rng.standard_normal((n_total, 2)) and then u = rng.random(n_total). Report the acceptance, the posterior mean and standard deviation of τ and of b, the Monte Carlo error of the mean of τ from 20 batch means per chain (combine the four chains in quadrature and divide by four), the effective sample size of τ, and R^ for both parameters.
((d)) Generate the data again with b=0 (same seed) and fit τ alone, with one chain from τ0=2.0μs, step 0.19μs, 1000 steps discarded and 50000 kept, seed 11. Compare the posterior standard deviation with the Cramér-Rao value of Chapter 6 for τ=2.197μs and N=1000. Say why the standard deviation of τ in part (c) is larger.
((e)) Chapter 6 found that the mean of a windowed record without background is 2.090μs, 4.85 per cent below τ. Find the expected sample mean of the times in part (c), and say what it shows about agreeing with τ by the naive mean.