0
$\begingroup$

Let's say I have a code which does coin toss at 25% win probability.

  1. If I run this code n number of times in the same system it will yield ~25% win.
  2. If I run this code on n devices (once each) will the result be ~25%.

n = very large number.

Are my assertions right?

Edit:My key doubt was, since computers use pseudo random numbers (which are based on a seed), will this affect this assertion (especially #2)

$\endgroup$
3
  • $\begingroup$ Probability works in exactly the same way, regardless of what is being analyzed. This is the power of mathematics. $\endgroup$ – Yuval Filmus Nov 11 '20 at 16:09
  • $\begingroup$ Since all computer random numbers are "pseudo" and based on seeds, could this have a different effect was my question. $\endgroup$ – Codevalley Nov 11 '20 at 16:39
  • $\begingroup$ If all the seeds are the same, the expectation will still be 25%, but the variance will be huge. $\endgroup$ – Yuval Filmus Nov 11 '20 at 16:40
1
$\begingroup$

Yes - this is a consequence of the Law of Large Numbers. https://en.wikipedia.org/wiki/Law_of_large_numbers

Yes - it still holds for pseudorandom number generators if they are any good.

Seed each PRNG independently.

$\endgroup$
2
  • $\begingroup$ Probably I missed the key component of my question. Will "pseudo random generator" impact the result, since it is seed based. $\endgroup$ – Codevalley Nov 11 '20 at 16:42
  • $\begingroup$ @Codevalley, I edited my answer. $\endgroup$ – D.W. Nov 11 '20 at 16:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.