P
Pat
I am a C++ beginner, please give me some suggestion on the following
question.
Given n balls. The probability pi is the chance to choose ball i. Sum of pi
is 1.
I want to run 10000 independent trials in selecting the ball, and simulate
the expected number of each ball to be choosen.
I have no idea how to implement the probability drawing step. Could you give
me some hints?
Thanks.
Pat
question.
Given n balls. The probability pi is the chance to choose ball i. Sum of pi
is 1.
I want to run 10000 independent trials in selecting the ball, and simulate
the expected number of each ball to be choosen.
I have no idea how to implement the probability drawing step. Could you give
me some hints?
Thanks.
Pat