Random Walk Metropolis Proposal Engine
Generates candidate states Y = X_t + ε with symmetric Gaussian proposal distribution q(Y | X_t) ~ N(X_t, σ_prop^2).
Implement the Metropolis-Hastings Markov Chain Monte Carlo (MCMC) algorithm, construct Gaussian random walk proposals, evaluate acceptance probability ratios, verify detailed balance, and quantify Monte Carlo error attenuation. Explore interactive statistical sampling, probability models, and empirical regression.
Ready to sample with Iterations N = 10.0.
Adjust Iterations N, then execute statistical trial.
Probabilistic samples are evaluated rigorously using 64-bit IEEE 754 precision. Residuals reflect ordinary least-squares regression across successive observations. Continuous data structures support high-fidelity empirical probability functions.
Random walk Metropolis can become trapped in local modes when sampling from multi-modal distributions with deep valleys. The log-log regression of Monte Carlo standard error against sample size confirms the square-root convergence law with slope m = -0.5000 and R² = 1.000000.
Generates candidate states Y = X_t + ε with symmetric Gaussian proposal distribution q(Y | X_t) ~ N(X_t, σ_prop^2).
Evaluates the unnormalized acceptance probability α(X_t, Y) = min(1, [p(Y) q(X_t | Y)] / [p(X_t) q(Y | X_t)]).
Logs accepted states X_{t+1} = Y and repeated states X_{t+1} = X_t to construct the Markov sample chain.
Calculates lag-k autocorrelation ρ_k and integrated autocorrelation time τ_int to evaluate effective sample size (ESS).
Tracks chain trajectories from dispersed starting points to identify stationarity and discard initialization transient.
Performs linear regression of ln(SE) versus ln(N) to confirm the square-root convergence rate α = -0.500.
Implement the Metropolis-Hastings Markov Chain Monte Carlo (MCMC) algorithm, construct Gaussian random walk proposals, evaluate acceptance probability ratios, verify detailed balance, and quantify Monte Carlo error attenuation. Standardized parameter settings: 10.0, 20.0, 40.0, 80.0, 160.0, 320.0 samples.
Set target density to standard normal p(x) ∝ e^(-x^2/2) with proposal standard deviation σ_prop = 1.0 on the MCMC interface.
Initialize chain at X_0 = 5.0. Draw proposal Y ~ N(X_t, 1.0) and accept with probability α = min(1, p(Y)/p(X_t)). Record 2,000 steps.
Inspect trace plot trajectory as X_t migrates from extreme start X_0 = 5.0 down into the high-density target region around 0. Discard initial 500 burn-in steps.
Compute empirical acceptance rate, verifying that for Gaussian proposals σ_prop ≈ 1.0, acceptance rate aligns with optimal Roberts-Gelman efficiency (~44%).
Increment MCMC sample sizes across standardized geometric steps N ∈ {10, 20, 40, 80, 160, 320}, recording empirical Monte Carlo standard error SE.
Fit a linear regression model y = mx + b to coordinates (x = ln(N), y = ln(SE)). Confirm that empirical slope m = -0.5000 validates N^(-1/2) convergence.
Points are your recorded observations. The solid regression line validates Metropolis-Hastings MCMC mathematical scaling.
| # | MCMC Sample Iteration Count N (samples) | Empirical Monte Carlo Standard Error SE(θ̂) (Std Error SE) | Log Sample Size ln(N) | Log Monte Carlo Standard Error ln(SE) | Remove |
|---|
No readings yet. Execute a statistical trial and record it.