質問

what do you guys think will be the outcome if a program is coded to simulate a coin flip where there is a 50% of the coin landing either heads or tails when the results are looked at; Mainly will there be a higher % of the coin flips landing heads when the previous 10 flips were tails and vice versa?

役に立ちましたか?

解決

This really depends on what mechanism is being used to generate the random numbers. If, say, a linear congruential generator is used...

... then clearly any given generated number is dependent on the one that preceded. The quality of the output also depends on what parameters are used in conjunction with the mechanism (e.g. if a small value was used for "m" in the above method, the quality would be poor... or if your seed value was highly predictable).

Despite the fact that computers only generate pseudo-random numbers, some algorithms satisfy the tests for statistical randomness (i.e. have no discernible patterns) and can be used safely.

If you are that concerned about the randomness of your generated numbers, you should look into the actual method being used to generate them within your specific context. For more information, take a look at Wikipedia.

他のヒント

If you program it correctly, the chance of landing on either side of the coin should be equal(50%), regardless of previous flips...

The probability of heads/tails is always 50% on any given toss. The probability of getting x heads (or any specified combination of heads/tails) in a row is 0.5^x (because each toss is independent of the others).

I'm I am understanding you correctly, you are asking if there will be more "heads" results or "tails" results if a program is written to give each option a 50% chance?

Statistically, if you run the program a number of times, each side will average out and you'll have an equal number of heads and tails results. (Depending on your language of choice, you may have to seed the randomizer to guarantee true randomness.)

I suppose that it depends on the goodness of the pseudo-random number generator. On only ten flips, the results may be meaningless... But if you have a good algorithm to generate pseudo-random number, and you extend this experiment with n try where "n" is a significantly large large, the probability still remain 0.5 (50%). This because the statistic has no memory

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top