开发者

4 randomly pulled cards at least one would be ace

Please help me my c++ program that I don't know how to write. Question is as below.

There is a well mixed deck of 32 cards. Method o开发者_如何学Pythonf statistical tests to obtain the probability of an event that of the 4 randomly pulled charts at least one would be ace. Compare the value of the error of calculating the probability of the true error (the true probability value is approximately equal to 0.432). Vary the number of experiments n.


What are the odds of not drawing an ace in one draw?

In four successive draws?

What are the odds that that doesn't happen?


From what I understand of your question, you have already calculated the odds of drawing the ace, but now need a program to prove it.

  1. Shuffle your cards.
  2. Draw 4 cards.
  3. Check your hand for the presence of an ace.

Repeat these steps n times, where n is the number of test you need to make. Your final, "proven" probability is a/n, where a is the number of times an ace came up.

Of course, given the nature of randomness, there's no way to ensure that your results will be near the mathematical answer, unless you have the time available to make n equal to infinity.


Unfortunately I need to 'answer' rather than comment as I would wish because my rep is not high enough to allow me to do so.

There is information missing which will make it impossible to be sure of providing a correctly functioning program.

Most importantly coming to your problem from a mathematical /probability background : I need to know for sure how many of the reduced deck of 32 cards are aces!

Unfortunately this sentence :

Method of statistical tests to obtain the probability of an event that of the 4 randomly pulled charts at least one would be ace.

is mathematical goobledygook!

You need to correctly quote the sentences given to you in your assignment. Those sentences hold vital information on which depends what the c++ program is to simulate!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜