Testing random

MRAB python at mrabarnett.plus.com
Tue Jun 16 20:42:03 EDT 2015


On 2015-06-17 00:45, Thomas 'PointedEars' Lahn wrote:
> Ned Batchelder wrote:
>
>> On Tuesday, June 16, 2015 at 6:01:06 PM UTC-4, Thomas 'PointedEars' Lahn
>> wrote:
>>> Your programmatic "proof", as all the other intuitive-empirical "proofs",
>>> and all the other counter-arguments posted before in this thread, is
>>> flawed. As others have pointed out at the beginning of this thread, you
>>> *cannot* measure or calculate probability or determine randomness
>>> programmatically (at least not with this program).
>>
>> You *can* estimate probability with a program, which is what is happening
>> here.
>
> No.  Just no.
>
>>> I repeat: Probability is what relative
>>> frequency (which you can measure) *approaches* for *large* numbers.  100
>>> is anything but large, to begin with.
>>
>> The number of trials in this program is not 100, it is 1 million.  You
>> seem uninterested in trying to understand.
>
> It still would _not_ a measure or a calculation of *probability*.  So much
> for “uninterested in trying to understand”.
>
>>> What is "large" depends on the experiment, not on the experimentator.
>>> And with independent events, the probability for getting zero does not
>>> increase because you have been getting non-zeros before.  It simply does
>>> not work this way.
>>
>> Again, if you look at the code, you'll see that we are not talking about
>> the probability of getting a zero on the next roll.  We are talking about
>> the probability of getting no zeros in an N-roll sequence.  I have no idea
>> how you have misunderstood this for so long.
>
> You do not understand that it boils down to the same problem.  The
> probability of only having sons is _not_ greater than that of having
> sons and one daughter or vice-versa.  And for that it does _not_ matter
> how many children you have *because* it does _not_ matter how many
> children you had before.  The probability for a boy or a girl is *always*
> the same.  You are _not_ due for a boy if you have many girls, and not for a
> girls if you have many boys.  But that is precisely what your flawed logic
> is implying.
>
> Learn probability theory, and use a dictionary in Python when you want to
> count random hits.
>
I think that different people are talking about different things in
this thread. You're talking about the probability of each event, while
everybody else is talking about the probability of certain combinations
of events.

If you have, say, two children, the possibilities are:

	boy, boy
	boy, girl
	girl, boy
	girl, girl

The probability of each boy or girl is 1/2.

The probability of only boys is 1/4 and of a son and a daughter is 1/4
+ 1/4 = 1/2.

Therefore, the probability of having only boys is less than the
probability of having a son and a daughter.




More information about the Python-list mailing list