Random number generator

  • Thread starter Mr Peanut
  • Start date
  • #1
30
0

Main Question or Discussion Point

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?
 

Answers and Replies

  • #2
mathman
Science Advisor
7,797
429
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.
 
  • #3
Borek
Mentor
28,398
2,800
I wonder if you can't invert Box–Muller transform. Not that I have an idea how...
 
  • #4
30
0
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
 
  • #5
jbunniii
Science Advisor
Homework Helper
Insights Author
Gold Member
3,394
180
If you have two independent Gaussian random variables [itex]x[/itex] and [itex]y[/itex] and you define a complex Gaussian r.v. [itex]z[/itex] such that

[tex]z = x + iy[/tex]

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

Thus

[tex]\theta = \arctan(y,x)[/tex]

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

Related Threads on Random number generator

  • Last Post
Replies
12
Views
5K
  • Last Post
Replies
2
Views
7K
  • Last Post
Replies
11
Views
9K
Replies
0
Views
1K
Replies
1
Views
3K
Replies
1
Views
3K
Replies
5
Views
2K
Replies
5
Views
1K
Replies
26
Views
4K
Top