Quote:
quote:
That is, the coin is not balanced (since for a "fair" coin and a "fair" toss, we would expect p(heads) to be 1/2.)
|
no this is not the concept.we dont want the p(head),we want
P(The number of our coin turns out head in our erxperiments) surely the p(head)=1/2 all the time...
also I confirm your algorithm but what about if we want exact answers?
meanwhile consider a circumstance we want
all situations not only one situation I think its better not to work with
rand() in our algorithm
we should work with
permutations for getting exact answers
in my opinion it could be a better idea.
(take a look at my previous post)
(I dont know again where is the original poster & what happend to him!)
--------------------------------------------
Mehdi.:)