page_title: Low-discrepancy sequence
section_title: Random numbers
hierarchical_section_title: Low-discrepancy sequence / Construction of low-discrepancy sequences / Random numbers
caption_attribution_description: English: Coverage of the unit square. Left for additive subrandom numbers with c = 0.5545497..., 0.308517... Right for random numbers. From top to bottom. 10, 100, 1000, 10000 points.
context_page_description: In mathematics, a low-discrepancy sequence is a sequence with the property that for all values of N, its subsequence x₁, ..., xN has a low discrepancy.
  Roughly speaking, the discrepancy of a sequence is low if the proportion of points in the sequence falling into an arbitrary set B is close to proportional to the measure of B, as would happen on average in the case of an equidistributed sequence. Specific definitions of discrepancy differ regarding the choice of B and how the discrepancy for every B is computed and combined.
  Low-discrepancy sequences are also called quasirandom sequences, due to their common use as a replacement of uniformly distributed random numbers.
  The "quasi" modifier is used to denote more clearly that the values of a low-discrepancy sequence are neither random nor pseudorandom, but such sequences share some properties of random variables and in certain applications such as the quasi-Monte Carlo method their lower discrepancy is an important advantage.
context_section_description: Sequences of quasirandom numbers can be generated from random numbers by imposing a negative correlation on those random numbers. One way to do this is to start with a set of random numbers  on  and construct quasirandom numbers  which are uniform on  using:
   for  odd and  for  even.
  A second way to do it with the starting random numbers is to construct a random walk with offset 0.5 as in:
  That is, take the previous quasirandom number, add 0.5 and the random number, and take the result modulo 1.
  For more than one dimension, Latin squares of the appropriate dimension can be used to provide offsets to ensure that the whole domain is covered evenly.
caption: Coverage of the unit square. Left for additive quasirandom numbers with c = 0.5545497..., 0.308517... Right for random numbers. From top to bottom. 10, 100, 1000, 10000 points.