Skip to content
ExtendedSource checked

Cranley-Patterson Rotation

Randomizes low-discrepancy samples by adding a random offset modulo one.

Quick Facts

Compact metadata for implementation and discovery.

Category
Randomness & Sampling
Difficulty
Advanced
Family
Quasi-Monte Carlo Randomization
Tier
Extended
Status
Verified
Review
Source Checked
Sources
1
Formulas
1
Relationships
2
Code example
Ready
Visualization
Ready

Overview

Cranley-Patterson rotation preserves low-discrepancy structure while reducing deterministic artifacts and enabling randomized error estimates.

Core Concepts

random shiftmodulo onelow discrepancysample randomization

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(dimensions)

Average

O(samples * dimensions)

Worst

O(samples * dimensions)

Space

O(dimensions)

When to Use

  • Use when monte Carlo simulation needs random shift.
  • Use when the input matches the assumptions behind quasi-Monte Carlo Randomization.

When Not to Use

  • Avoid when independence, reproducibility, or distribution quality cannot be checked.
  • Avoid when a simpler algorithm gives the required result with less setup.

What It Does

  • Randomizes low-discrepancy samples by adding a random offset modulo one
  • Uses random shift and modulo one to guide the work.
  • Produces samples.

Use Cases

  • Monte Carlo simulation
  • Randomized algorithms
  • Sampling distributions

Inputs

  • Random source
  • Distribution or weights
  • Sample count

Outputs

  • Samples
  • Estimated statistic
  • Randomized selection

Key Formulas (1)

Rotated sample

xrotated = (x + shift) mod 1
x_rotated = (x + shift) mod 1

Applies the same random offset to every sample coordinate.

Pseudocode

  1. 1.Prepare the inputs and state needed for Cranley-Patterson Rotation.
  2. 2.Apply the random shift step while the stopping condition has not been met.
  3. 3.Update intermediate state and discard invalid candidates.
  4. 4.Return samples.

Canonical Example

Input
Cranley-Patterson Rotation input with a small representative case
Output
Samples
Explanation
Cranley-Patterson Rotation applies random shift to produce samples.

Implementation Notes

  • Expose seed handling when reproducibility is important.
  • Keep the random shift step separate enough to test independently.

Common Pitfalls

  • Using a biased random source can quietly invalidate downstream estimates.
  • Forgetting to check edge cases can make Cranley-Patterson Rotation look correct on only ideal inputs.

Interactive Mechanism Walkthrough

Iterative Convergence & State Trajectory

Plot generated samples against the target distribution or domain.

Cranley-Patterson Rotation mechanism walkthrough step 1 of 4x₀x₁x₂x*
Step 1 of 4: Prepare the inputs and state needed for Cranley-Patterson Rotation.
randomness-sampling-mechanism

Notes

Cranley-Patterson Rotation should be used with the assumptions and tradeoffs of quasi-Monte Carlo Randomization in mind.

Sources (1)

What each reference supports for this entry.

Monte Carlo Statistical Methods

Book

Monte Carlo reference for randomized lattice rules and Cranley-Patterson rotation of low-discrepancy samples.

Explore Next

Good next jumps from the relationship graph, ranked for useful discovery.

Often paired withHalton Sequence

It can reduce structured artifacts in deterministic sample sets.

Often paired withSobol Sequence

Cranley-Patterson rotation can randomize low-discrepancy samples.

Tags

Randomness & SamplingQuasi Monte CarloLow-DiscrepancySampling