Creating Equal Probability Random Values with a Hardware Random Number Generator

Click For Summary

Discussion Overview

The discussion revolves around methods for generating random values with equal probability using a hardware random number generator. Participants explore the characteristics of different probability distributions, particularly focusing on uniform distribution and the implications of transforming Gaussian-distributed values.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant describes their method of using a hardware random number generator that outputs Gaussian-distributed values and seeks to transform these into a uniform distribution.
  • Another participant identifies the technical term for a distribution where every value has an equal probability of occurring as a uniform distribution.
  • Some participants express that the proposed method of transforming Gaussian values by multiplying and truncating digits may be reasonable, while noting the need for clarification on handling negative values.
  • A participant suggests the possibility of inverting the Box–Muller transform as an alternative approach, although they admit uncertainty about the implementation.
  • Another participant introduces the concept of complex Gaussian random variables and discusses how the phase of such variables can be uniformly distributed, linking it to the broader topic of random value generation.

Areas of Agreement / Disagreement

Participants generally agree on the identification of uniform distribution as the desired outcome but express differing views on the effectiveness and reasoning behind the proposed transformation method. The discussion remains unresolved regarding the best approach to achieve equal probability in random values.

Contextual Notes

There are limitations in the discussion regarding the handling of negative values in the transformation process and the specifics of implementing the Box–Muller transform inversion. Additionally, the mathematical steps involved in achieving a uniform distribution from Gaussian values are not fully explored.

Who May Find This Useful

This discussion may be useful for individuals interested in random number generation, probability theory, and the practical applications of hardware random number generators in computational contexts.

Mr Peanut
Messages
30
Reaction score
0
I've been experimenting with a hardware random number generator. My circuit amplifies transistor noise and converts it to a digital output. My program (.Net) reads the output into an array of double precision values. My voltages range from -7 to 7 (well within the range of my ADC) and have 16 bit precision. The array of voltages distributes in a Gaussian fashion centered over zero. I want a distribution that has equal probability of every value’s occurrence.
One method I am toying multiplies each value by 1000 then drops all the digits that are greater than 1, eg 10.7823432... becomes 0.23432...
Using this method I get a distribution that appears to be random with equal probability for each value. Two questions:

1) What is the technical term for a distribution of random values where every value has an equal probability of occurring?

2) Is my method for obtaining this set of numbers reasonable?
 
Physics news on Phys.org
1) Uniform distribution. You didn't say what you did for - numbers.

2) Pretty reasonable, since Gaussian would be close to flat in a narrow interval around 0.
 
I wonder if you can't invert Box–Muller transform. Not that I have an idea how...
 
mathman said:
1) You didn't say what you did for - numbers.

I should have said I multiply by 1000 then form a new number (retaining the sign) by using only the decimal point and the numerical characters to the right of the decimal point.

-10.7823432... becomes -0.23432
 
If you have two independent Gaussian random variables x and y and you define a complex Gaussian r.v. z such that

z = x + iy

then the phase of z is uniformly distributed over (-\pi,\pi). This is because the pdf of z is circularly symmetric (depends only on |z|).

Thus

\theta = \arctan(y,x)

is uniform over (-\pi,\pi), assuming you use the 4-quadrant arctangent
 

Similar threads

  • · Replies 30 ·
2
Replies
30
Views
5K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 41 ·
2
Replies
41
Views
5K
  • · Replies 2 ·
Replies
2
Views
3K