Random Number Generator

In summary, the conversation discusses two biased random number generators and how to best determine which one was used through observation. The best observation is the number of times a 1 appears in the generated sequence, with a probability of 0.5 for both guessing correctly before and after the observation.
  • #1
Kreizhn
743
1

Homework Statement


Say you have two biased random number generators that will spit out the numbers 1, 2, 3. They're both biased: the first one has a distribution of [itex] (\frac{1}{2}, \frac{1}{3}, \frac{1}{6} ) [/itex] and the second one has a distribution of [itex] (\frac{1}{2}, \frac{1}{2}, 0 ) [/itex]. Now let's say that somebody flips a fair coin (50/50 odds), if heads then they use the first number generator, if tails the second.

Write down an observation (as a set of indicator functions), such that the observation has only two possible outcomes, and that gives you the best chance of guessing which generator was used. What is the possibility of guessing correctly both before and after the observation.


Homework Equations



The probability distribution of a 1,2,or 3 appearing is simply
[tex]\rho = \displaystyle \frac{1}{2} \rho_1+ \frac{1}{2} \rho_2 [/tex]
[tex]= \displaystyle \frac{1}{2} \left( \frac{1}{2}, \frac{1}{3}, \frac{1}{6} \right) + \frac{1}{2} \left( \frac{1}{2} , \frac{1}{2}, 0 \right) [/tex]
[tex]= \displaystyle \frac{1}{12} \begin{pmatrix} 6 \\ 5 \\ 1 \end{pmatrix} [/tex]

The Attempt at a Solution



Again, really not sure how to proceed.
 
Physics news on Phys.org
  • #2
Any help would be greatly appreciated. My guess is that the best observation would be the number of times a 1 appears in the sequence of numbers generated by the random number generator. If the first generator was used, then the probability of observing a 1 would be \frac{1}{2}. If the second generator was used, then the probability of observing a 1 would be \frac{1}{2}. Thus, the probability of guessing correctly before the observation is 0.5 and the probability of guessing correctly after the observation is also 0.5.
 

What is a Random Number Generator?

A Random Number Generator (RNG) is a computer program or device that produces a sequence of numbers or symbols that cannot be predicted.

How does a Random Number Generator work?

A Random Number Generator works by using a mathematical algorithm to generate a sequence of random numbers. The algorithm takes a starting number, known as a seed, and applies a series of calculations to it to produce the next number in the sequence. The process repeats, with each new number being used as the seed for the next calculation, creating a seemingly random sequence.

What is the purpose of a Random Number Generator?

The purpose of a Random Number Generator is to provide a source of unpredictability and randomness in various applications. It is commonly used in gambling and gaming, statistical sampling, cryptography, and other fields where true randomness is necessary.

Are all Random Number Generators truly random?

No, not all Random Number Generators are truly random. Some generators use pseudo-random algorithms, which means that their sequences can be predicted if the seed is known. True random number generators use a source of randomness, such as atmospheric noise or radioactive decay, to produce truly unpredictable numbers.

How are Random Number Generators tested for accuracy?

Random Number Generators are tested for accuracy by subjecting them to statistical tests. These tests analyze the sequence of numbers produced by the generator and check for patterns or biases that would indicate the numbers are not truly random. If a generator passes these tests, it is considered to be accurate and reliable.

Similar threads

  • Calculus and Beyond Homework Help
Replies
9
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
482
  • Calculus and Beyond Homework Help
Replies
1
Views
180
  • Calculus and Beyond Homework Help
Replies
5
Views
929
  • Calculus and Beyond Homework Help
Replies
2
Views
526
  • Calculus and Beyond Homework Help
Replies
8
Views
197
  • Calculus and Beyond Homework Help
Replies
5
Views
255
Replies
23
Views
1K
  • Calculus and Beyond Homework Help
Replies
7
Views
546
Back
Top