Inverting gives the quantile function
Consequently, inverse transform sampling uses with uniform on . The quartiles are , and .[ref]
The first and third quartiles are about and , so the central half of the probability spans about of the unit interval. Under a uniform distribution, its width would be .
The symmetric probability distribution gives . The angle representation gives a short calculation of the second moment:
Use to evaluate the integral. A uniform distribution on has variance ; the larger variance quantifies the greater spread toward the ends.
More generally, for a nonnegative integer , the beta function yields
For this is one; for it reproduces the values above. The central binomial coefficient thus appears in an exact moment calculation for a continuous probability distribution.
Exponential-logarithmic distribution Created 2026-10-25 Updated 2026-10-31
For , and , this probability density function has cumulative distribution function . Differentiating gives the density, while the endpoint limits are zero and one. Its quantile function is for , enabling inverse transform sampling.
Expanding the denominator as a geometric series gives
Termwise integration, justified by the monotone convergence theorem, and the gamma function integral yield raw moments . Thus the polylogarithm expresses its mean, variance and higher moments. Here is the complement of the series parameter ; parameter conventions must be checked when comparing formulas.
Laplace prior for sparse images Created 2026-10-05 Updated 2026-10-18
Independent centered Laplace distributions for pixel intensities give the prior distribution
This prior favors small intensities through its sharp peak at zero, while its tails permit isolated appreciable pixels. Its negative log density is an L1 norm penalty, so with a Gaussian likelihood a maximum a posteriori estimate minimizes a sum of squared residuals plus that penalty. A draw from this continuous prior has no exactly zero coordinate with positive probability; sparsity of a maximizing estimate and concentration of prior mass near zero are different statements. The product prior also does not encode spatial contiguity. Inverse transform sampling produces each coordinate from an independent uniform distribution by for and otherwise, ignoring the probability-zero endpoints.
Conditioning a Pareto distribution on exceeding a threshold changes its minimum while preserving its shape parameter. For and , the definition of conditional probability gives
Equivalently, for ,
The ratio to the threshold has the same Pareto distribution at every admissible threshold.[ref] For the chosen , , only of outcomes exceed 20, but among those outcomes the probability of exceeding 40 is again . When , the same identity gives conditional expectation .
This multiplicative scaling differs from the additive memoryless property of an exponential distribution. Indeed has exponential distribution of rate , because for . Thus logarithms turn multiplication into addition and explain the scaling property. Conversely, if has uniform distribution on , inverse transform sampling gives .
The excess conditional on has survival function for . In the generalized Pareto distribution convention , this means and . Here the excess starts at zero; the original Pareto distribution starts at .
For a continuous strictly increasing cumulative distribution function and a uniform distribution on , monotonicity gives
Thus each transformed draw has distribution function . This is inverse transform sampling. The conclusion extends to discontinuous or non-strictly increasing by its quantile function : right continuity gives exactly when . Independent uniforms produce independent transformed draws, but marginal uniformity alone does not establish independence.
If “uniformly distributed sequence” instead means deterministic equidistribution, the empirical fraction of is the empirical fraction of and tends to . That is an empirical distribution statement, not a claim that the deterministic sequence consists of independent random variables.
One method applies inverse transform sampling to the standard normal cumulative distribution function: , followed by for mean and standard deviation . Numerical approximations to are needed, and the endpoints must be avoided.
A convenient alternative is the Box-Muller transform. From independent uniforms set
The radial probability density function is for , and the angle is independently uniform on . Dividing their joint density by the polar-coordinate Jacobian determinant gives
Thus the outputs are independent standard normal distribution draws. Apply to obtain other normal means and variances. With finite pseudorandom number generators, this is an approximation to the ideal independent-uniform model; poor dependence in the input stream is not cured by the transform.
Integration of the Laplace distribution probability density function gives
Solving these two equations for gives
Generate one uniform and return this piecewise expression. The branches agree at and the inverse transform sampling proof establishes the target law without any rejection step.
Use the quantile function for , so a strictly increasing CDF is not required. For any real , the quantile event agrees, up to endpoint null sets, with . Hence
Thus has distribution function and probability density function . This proves inverse transform sampling, including a probability density function with intervals on which the CDF is constant.
For , the proposal CDF is . Therefore inverse transform sampling with gives
Equivalently, put , which is also uniform, and use . This equivalent parametrization matches the uniforms used in the final estimator.
Integrating the Pareto distribution proposal yields for . For an independent uniform random variable , solve to obtain the inverse transform sampling rule
Equivalently because is also uniformly distributed. In implementation choose strictly between zero and one so that the inverse is finite.
For an invertible continuous cumulative distribution function, monotonicity gives
Thus each transformed observation has the desired distribution. More generally use the quantile function ; the same event identity proves inverse transform sampling even when there are atoms. Independent uniform inputs give independent transformed samples; mere uniform marginal distributions do not imply independence between different samples.
One route is inverse transform sampling: if is the standard normal cumulative distribution function, then has the normal distribution with mean and variance .
Alternatively the Box-Muller transform uses two independent uniform inputs :
To verify this, set and . The radial density is for , and the angle is independent and uniform. Their joint density is . Changing to Cartesian coordinates divides by the Jacobian determinant , giving
This factors into two standard normal densities, proving both normality and independence. Then provides the required means and variances. Implementations must avoid the zero input to the logarithm; ideal continuous uniforms hit it with probability zero.
For rate , return
For , , so has the exponential distribution of rate . This is inverse transform sampling; using is equivalent. Uniform draws at exact endpoints can be excluded, since those events have probability zero under the ideal continuous law.
For , integrating the Weibull distribution probability density function gives
The inverse transform sampling method takes uniform on and solves . Hence
Since is also uniform, is an equivalent implementation. For any , the resulting event has probability , verifying its distribution.
Substitute , with , when integrating the target density. Since , its cumulative distribution function is
Inverting gives the arcsine distribution sampler
The inverse transform sampling proof in the root solution shows that it has the required probability density function. Use successive independent uniforms for successive samples. A draw at the endpoint one can be discarded if values strictly inside the support are desired; this event has probability zero under the ideal continuous uniform distribution.
For define the generalized inverse, or quantile function, by
It is finite because the cumulative distribution function tends to zero and one at the two infinities. Monotonicity and right continuity of give the key equivalence
For the forward implication, choose points in the defining set approaching its infimum from above. Right continuity gives , and then monotonicity gives whenever . The reverse implication follows immediately because then belongs to the defining set. Consequently, for a continuous uniform distribution draw ,
This proves inverse transform sampling for discontinuous as well as continuous distribution functions.
There is a minor endpoint defect in the printed codomain. The true quantile endpoint at probability one is , which equals for an unbounded-above normal distribution. Thus it need not be real at one. Use the extended-real value there, or assign an arbitrary finite value at this single probability level. Since , either choice gives the same sampled distribution; the latter supplies a real-valued version on all of . The endpoint has no effect on the inverse-transform law.
For rejection sampling, choose a proposal probability density function that can be sampled and a finite constant with wherever the target has positive mass. Generate independent pairs , with of density and uniform. Accept if ; otherwise discard the pair and repeat with fresh independent draws. At points where both densities vanish the acceptance rule may be defined arbitrarily. For any measurable set ,
Thus one trial accepts with probability , and the conditional density given acceptance is . More explicitly, summing over the index of the first accepted proposal gives
The probability of never accepting is zero, since , and the expected number of proposals is . The algorithm terminates almost surely and samples the target density exactly.
For a constant-rate Poisson process, let be the waiting time from a spike to the next spike. By independent increments, there is no spike in an interval of length with probability . Hence, for ,
Its density is , so the interspike intervals are independent exponential distributions with mean . If is uniform on , inverse transform sampling gives . Repeatedly add independent draws to the current spike time to simulate a constant-rate spike train.
For a prescribed time-dependent nonnegative rate , use an Inhomogeneous Poisson process. Conditional on the present event at , its next waiting time has survival probability
Thus its conditional CDF is minus that expression for . Define the cumulative intensity . For each new independent uniform draw, set and solve
This transforms independent unit-rate exponential intervals in integrated-intensity time into physical spike times. Use a generalized inverse when the rate vanishes on an interval: no spikes are placed in a flat part of . On a finite simulation window, stop when the next intensity target exceeds the available . If the total future intensity is finite, a target beyond it means that no further spike occurs.
Numerically, integrate the known rate and invert the accumulated integral, or integrate exactly across piecewise-constant rate bins. Drawing an exponential interval using only is not exact when the rate changes during the interval. The Poisson model also omits the neuronal refractory period and other spike-history effects.
A good pseudorandom number generator for Monte Carlo integration should have approximately uniform outputs, a period much longer than the intended run, and negligible detectable dependence both serially and in higher-dimensional tuples. It should be fast, reproducible from a seed, portable enough to reproduce a calculation, and numerically precise enough for the required tail probabilities. Values strictly inside avoid singularities in logarithmic inverse transform sampling. Separate simulations also need well-separated streams or seeds, rather than accidentally identical streams. A pseudorandom number generator is deterministic; these properties mean that it imitates independent uniform distributions sufficiently well for the application, not that its outputs are literally independent.
For rate , the exponential distribution has cumulative distribution function on . Inverse transform sampling gives ; since is also uniform, an equivalent answer is
For , , verifying the exponential distribution directly.
The centered Laplace distribution with density can be obtained by multiplying by an independent sign taking and with equal probabilities. Alternatively, its inverse transform sampling formula uses just one uniform variate:
The first branch inverts the negative half of the cumulative distribution function and the second branch inverts the positive half. Add a location parameter if a noncentered Laplace distribution is wanted.
Correct uniformity is essential for each marginal distribution, and independence is essential for independent samples and for the sign construction. For example, setting every equal to a single uniform gives uniform marginals but identical transformed draws. Likewise, choosing a sign from the same uniform used for the magnitude can change the Laplace distribution unless the one-uniform inverse above is used.
Choose a proposal probability density function and a finite envelope constant such that wherever the target has positive density. A rejection sampling trial draws and, independently, ; accept when
otherwise repeat with fresh independent draws. For any measurable set ,
In particular , so the conditional accepted density is . More explicitly, summing over the possible first accepted trial gives
Thus the algorithm terminates almost surely and its output has exactly the requested law.
The envelope constant satisfies and is the expected number of proposal trials for one output, by the geometric distribution of the waiting time. This is the quantity often called the rejection rate . The actual probability of rejecting a particular proposal is , and the expected number of rejections before one acceptance is ; these conventions should not be conflated.
To generate a standard normal distribution, first generate its absolute value, whose half-normal distribution density is
With the given exponential distribution proposal, the density ratio is
Its maximum is at , hence the normal rejection sampling with an exponential envelope constant is
Draw and a fresh uniform ; accept when . An accepted has density . Independently choose a sign, positive or negative with probability , and output with that sign and magnitude . On either half-line its density is , proving the normal output law.
To optimize the rejection rate, differentiate
Its derivative is , negative before one and positive after one; equivalently its second derivative is . Thus
The rejection probability is consequently about .
To use only uniforms, apply inverse transform sampling: for an independent ,
has survival probability for . Use a second independent uniform for acceptance, and, after acceptance, a third independent uniform to choose the sign. Repeat with fresh uniforms after any rejection. No exponential generator is then needed.