Gamma Random Variate Generator
Generates independent Gamma(α, θ) random variates using Marsaglia and Tsang's fast rejection method.
Investigate the continuous Gamma distribution family, demonstrate Erlang waiting times as sums of independent exponential variates, establish the Chi-Squared distribution as a specialized Gamma model, and verify degrees-of-freedom variance scaling. Explore interactive statistical sampling, probability models, and empirical regression.
Ready to sample with DoF k = 1.0.
Adjust DoF k, 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.
The Gamma distribution is restricted strictly to non-negative real support (x > 0) and cannot model negative observations. The empirical regression of sample variance against degrees of freedom k confirms the theoretical scaling Var(X) = 2k with slope m = 2.0000 and R² = 1.000000.
Generates independent Gamma(α, θ) random variates using Marsaglia and Tsang's fast rejection method.
Simulates the sum of k independent Exponential(λ) waiting times to construct Erlang-k distributions.
Squares and aggregates k independent standard Gaussian variates to generate Chi-Squared χ²(k) variates.
Computes empirical shape α̂ and scale θ̂ estimators via maximum likelihood and method of moments.
Compares empirical distribution percentiles against theoretical χ² critical values across multiple degrees of freedom.
Performs linear regression of variance versus degrees of freedom k to confirm the theoretical factor m = 2.000.
Investigate the continuous Gamma distribution family, demonstrate Erlang waiting times as sums of independent exponential variates, establish the Chi-Squared distribution as a specialized Gamma model, and verify degrees-of-freedom variance scaling. Standardized parameter settings: 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 dof.
Set degrees of freedom k = 1 on the control interface, initializing the generator to evaluate the base Chi-Squared distribution χ²(1).
Draw 50,000 standard normal variates Z_i ~ N(0, 1), square each variate X = Z_i^2, and verify that the resulting empirical distribution matches the Gamma(1/2, 2) density.
Set integer shape k = 3 and sum three independent Exponential(1.0) arrival intervals. Verify that the convolution reproduces the Erlang-3 distribution.
Record the empirical mean E[X] = k and sample variance Var(X) = 2k on the digital laboratory notebook dashboard.
Increment the degrees of freedom parameter across standardized integer steps k ∈ {1, 2, 3, 4, 5, 6}, logging the corresponding sample variances.
Fit a linear regression model y = mx to the coordinate pairs (x = k, y = Var(X)). Confirm that empirical slope m = 2.0000 validates the fundamental scaling law Var(χ²(k)) = 2k.
Points are your recorded observations. The solid regression line validates Gamma & Chi-Squared Family mathematical scaling.
| # | Degrees of Freedom Parameter k (dof) | Theoretical Distribution Variance Var(X) (Var(X)) | Degrees of Freedom k | Distribution Variance Var(X) | Remove |
|---|
No readings yet. Execute a statistical trial and record it.