Standard Normal Sampling Generator
Generates independent random Gaussian variates using the Box-Muller transformation or Ziggurat algorithm.
Implement non-parametric kernel density estimation, examine the bias-variance trade-off in bandwidth selection, and verify Silverman's rule of thumb scaling h_opt ∝ N^(-1/5). Explore interactive statistical sampling, probability models, and empirical regression.
Ready to sample with Sample Size N = 20.0.
Adjust Sample Size 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.
Fixed-bandwidth KDE applies uniform smoothing everywhere, causing local oversmoothing or undersmoothing. The empirical regression of ln(h_opt) versus ln(N) yields a gradient of m = -0.2000, exactly matching the theoretical exponent α = -0.200 with R² = 1.000000.
Generates independent random Gaussian variates using the Box-Muller transformation or Ziggurat algorithm.
Computes standardized bell-shaped kernel weighting K((x - X_i)/h) for smoothing discrete sample points.
Integrates squared bias and sample variance to quantify global reconstruction error across candidate bandwidths.
Calculates asymptotic optimal bandwidth h_opt = (4σ^5 / 3N)^(1/5) using sample standard deviation and interquartile range.
Executes unbiased least-squares cross-validation (LSCV) over candidate bandwidths h ∈ [0.05, 1.50].
Performs linear regression on ln(h_opt) versus ln(N) to confirm the theoretical -1/5 (-0.200) scaling exponent.
Implement non-parametric kernel density estimation, examine the bias-variance trade-off in bandwidth selection, and verify Silverman's rule of thumb scaling h_opt ∝ N^(-1/5). Standardized parameter settings: 20.0, 40.0, 80.0, 160.0, 320.0, 640.0 samples.
Set sample size N = 20 from a standard Gaussian target distribution N(0, 1) and specify an evaluation grid of 500 linearly spaced evaluation points spanning x ∈ [-4, +4].
For each grid point x, evaluate the kernel density estimate f̂_h(x) = (1/Nh) ∑ K((x - X_i)/h) across a sweep of test bandwidths h from 0.05 to 1.50.
Determine the optimal bandwidth h_opt that balances peak smoothing against variance suppression, comparing empirical minima with Silverman's theoretical rule of thumb.
Calculate the natural logarithm of sample size x = ln(20) = 2.9957 and natural logarithm of optimal bandwidth y = ln(h_opt) = -0.200 · 2.9957 + 0.8000 = 0.2009. Record the trial.
Repeat trials for sample sizes N ∈ {20, 40, 80, 160, 320, 640}, observing the progressive contraction of optimal bandwidth and suppression of boundary ripple.
Fit a linear regression line to the logged coordinates (ln(N), ln(h_opt)) in the laboratory notebook. Confirm an empirical slope of m = -0.2000, proving the N^(-1/5) convergence law.
Points are your recorded observations. The solid regression line validates Kernel Density & Bandwidth mathematical scaling.
| # | Sample Size N (samples) | Optimal Bandwidth h_opt (bandwidth) | Natural Log of Sample Size ln(N) | Natural Log of Optimal Bandwidth ln(h_opt) | Remove |
|---|
No readings yet. Execute a statistical trial and record it.