Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #92207 > unrolled thread
| Started by | Cecil Westerhof <Cecil@decebal.nl> |
|---|---|
| First post | 2015-06-07 08:27 +0200 |
| Last post | 2015-06-07 11:04 -0400 |
| Articles | 20 on this page of 80 — 22 participants |
Back to article view | Back to comp.lang.python
Testing random Cecil Westerhof <Cecil@decebal.nl> - 2015-06-07 08:27 +0200
Re: Testing random Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-07 12:40 +0200
Re: Testing random Chris Angelico <rosuav@gmail.com> - 2015-06-07 21:51 +1000
Re: Testing random Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-07 17:51 +0200
Re: Testing random Chris Angelico <rosuav@gmail.com> - 2015-06-08 02:25 +1000
Re: Testing random Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-07 18:36 +0200
Re: Testing random Chris Angelico <rosuav@gmail.com> - 2015-06-08 02:44 +1000
Re: Testing random Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-07 20:23 +0200
Re: Testing random Chris Angelico <rosuav@gmail.com> - 2015-06-08 04:52 +1000
Re: Testing random Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-07 21:41 +0200
Re: Testing random Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2015-06-07 22:08 +0300
Re: Testing random Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-07 21:29 +0200
Re: Testing random random832@fastmail.us - 2015-06-07 15:44 -0400
Re: Testing random Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-07 22:09 +0200
Re: Testing random random832@fastmail.us - 2015-06-07 16:41 -0400
Re: Testing random Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-07 22:59 +0200
Re: Testing random Steven D'Aprano <steve@pearwood.info> - 2015-06-08 11:26 +1000
Re: Testing random random832@fastmail.us - 2015-06-07 21:34 -0400
Re: Testing random Chris Angelico <rosuav@gmail.com> - 2015-06-08 11:42 +1000
Re: Testing random MRAB <python@mrabarnett.plus.com> - 2015-06-08 02:49 +0100
Re: Testing random random832@fastmail.us - 2015-06-07 21:57 -0400
Re: Testing random Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2015-06-08 10:40 +0300
Re: Testing random Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-10 19:03 +0200
Re: Testing random sohcahtoa82@gmail.com - 2015-06-10 10:52 -0700
Re: Testing random Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2015-06-10 23:00 +0300
Re: Testing random Ian Kelly <ian.g.kelly@gmail.com> - 2015-06-10 12:02 -0600
Re: Testing random Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-12 23:32 +0200
Re: Testing random alister <alister.nospam.ware@ntlworld.com> - 2015-06-12 21:46 +0000
Re: Testing random random832@fastmail.us - 2015-06-12 17:52 -0400
Re: Testing random Ian Kelly <ian.g.kelly@gmail.com> - 2015-06-12 16:00 -0600
Re: Testing random Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-13 00:09 +0200
Re: Testing random sohcahtoa82@gmail.com - 2015-06-12 15:55 -0700
Re: Testing random random832@fastmail.us - 2015-06-12 18:57 -0400
Re: Testing random Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-06-13 08:53 +0100
Re: Testing random random832@fastmail.us - 2015-06-10 14:26 -0400
Re: Testing random Ned Batchelder <ned@nedbatchelder.com> - 2015-06-07 14:21 -0700
Re: Testing random Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-16 21:18 +0200
Re: Testing random random832@fastmail.us - 2015-06-16 16:23 -0400
Re: Testing random Ned Batchelder <ned@nedbatchelder.com> - 2015-06-16 13:48 -0700
Re: Testing random Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-16 23:57 +0200
Re: Testing random sohcahtoa82@gmail.com - 2015-06-16 15:30 -0700
Re: Testing random Ian Kelly <ian.g.kelly@gmail.com> - 2015-06-16 16:58 -0600
Re: Testing random Laura Creighton <lac@openend.se> - 2015-06-17 11:28 +0200
Re: Testing random Ned Batchelder <ned@nedbatchelder.com> - 2015-06-16 16:26 -0700
Re: Testing random Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-17 01:45 +0200
Re: Testing random sohcahtoa82@gmail.com - 2015-06-16 17:36 -0700
Re: Testing random Chris Angelico <rosuav@gmail.com> - 2015-06-17 11:01 +1000
Re: Testing random Ethan Furman <ethan@stoneleaf.us> - 2015-06-16 18:32 -0700
Re: Testing random Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-06-17 09:41 +0100
Re: Testing random Grant Edwards <invalid@invalid.invalid> - 2015-06-17 14:04 +0000
Re: Testing random Ian Kelly <ian.g.kelly@gmail.com> - 2015-06-17 09:01 -0600
Re: Testing random MRAB <python@mrabarnett.plus.com> - 2015-06-17 01:42 +0100
Re: Testing random Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-17 08:53 +0200
Re: Testing random Christian Gollwitzer <auriocus@gmx.de> - 2015-06-17 09:22 +0200
Re: Testing random Chris Angelico <rosuav@gmail.com> - 2015-06-17 17:28 +1000
Re: Testing random Tim Golden <mail@timgolden.me.uk> - 2015-06-17 08:30 +0100
Re: Testing random Cecil Westerhof <Cecil@decebal.nl> - 2015-06-17 11:57 +0200
Re: Testing random Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-06-17 01:36 +0000
Re: Testing random Laura Creighton <lac@openend.se> - 2015-06-17 12:33 +0200
Re: Testing random Steven D'Aprano <steve@pearwood.info> - 2015-06-17 22:47 +1000
Re: Testing random Laura Creighton <lac@openend.se> - 2015-06-17 15:50 +0200
Re: Testing random Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-06-17 01:35 +0000
Re: Testing random Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2015-06-17 07:41 +0300
Re: Testing random Steven D'Aprano <steve@pearwood.info> - 2015-06-08 11:11 +1000
Re: Testing random Ian Kelly <ian.g.kelly@gmail.com> - 2015-06-07 11:07 -0600
Re: Testing random Chris Angelico <rosuav@gmail.com> - 2015-06-08 03:20 +1000
Re: Testing random "C.D. Reimer" <chris@cdreimer.com> - 2015-06-07 10:36 -0700
Re: Testing random Steven D'Aprano <steve@pearwood.info> - 2015-06-08 04:28 +1000
Re: Testing random Chris Angelico <rosuav@gmail.com> - 2015-06-08 04:40 +1000
Re: Testing random Steven D'Aprano <steve@pearwood.info> - 2015-06-08 04:24 +1000
Re: Testing random Jonas Wielicki <jonas@wielicki.name> - 2015-06-07 12:41 +0200
Re: Testing random Steven D'Aprano <steve@pearwood.info> - 2015-06-07 22:52 +1000
Re: Testing random Steven D'Aprano <steve@pearwood.info> - 2015-06-07 23:06 +1000
Re: Testing random Peter Otten <__peter__@web.de> - 2015-06-07 15:35 +0200
Re: Testing random Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-07 18:36 +0200
Re: Testing random Peter Otten <__peter__@web.de> - 2015-06-07 18:48 +0200
Re: Testing random Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-07 22:15 +0200
Re: Testing random Steven D'Aprano <steve@pearwood.info> - 2015-06-08 11:35 +1000
Re: Testing random Christian Gollwitzer <auriocus@gmx.de> - 2015-06-07 14:53 +0200
Re: Testing random Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-06-07 11:04 -0400
Page 3 of 4 — ← Prev page 1 2 [3] 4 Next page →
| From | sohcahtoa82@gmail.com |
|---|---|
| Date | 2015-06-16 15:30 -0700 |
| Message-ID | <5e767961-9a7c-4c70-a821-c66d79675ebf@googlegroups.com> |
| In reply to | #92703 |
On Tuesday, June 16, 2015 at 3:01:06 PM UTC-7, Thomas 'PointedEars' Lahn wrote:
> Ned Batchelder wrote:
>
> > [...]
> > This is done empirically, by producing `nseq` sequences of
> > `nrolls` rolls of the die. Each sequence is examined to
> > see if it has a zero. The total number of no-zero
> > sequences divided `nseq` is the probability.
>
> No, it is not. It is the relative frequency for *this* number of trials and
> *this* run of the experiment.
>
> > """
> > no_zeros = 0
> > for _ in xrange(nseq):
> > seq = die_rolls(nrolls)
> > if not any_zeros(seq):
> > no_zeros += 1
> > return float(no_zeros)/nseq
> >
> > for n in range(10, 101, 10):
> > # Calculate the probability of getting no zeros by trying
> > # it a million times.
> > prob = probability_of_no_zero(n, 1000000)
> > print "n = {:3d}, P(no zero) = {:.8f}".format(n, prob)
> >
> >
> >
> > Running this gives:
> >
> > $ pypy testrandom.py
> > n = 10, P(no zero) = 0.34867300
> > n = 20, P(no zero) = 0.12121900
> > n = 30, P(no zero) = 0.04267000
> > n = 40, P(no zero) = 0.01476600
> > n = 50, P(no zero) = 0.00519900
> > n = 60, P(no zero) = 0.00174100
> > n = 70, P(no zero) = 0.00061600
> > n = 80, P(no zero) = 0.00020600
> > n = 90, P(no zero) = 0.00006300
> > n = 100, P(no zero) = 0.00002400
> >
> >
> > As n increases, the probability of having no zeros goes down.
>
> 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). I repeat: Probability is what relative
> frequency (which you can measure) *approaches* for *large* numbers. 100 is
> anything but large, to begin with. 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.
Nobody is arguing that. You're arguing against something that nobody is suggesting.
>
> If you had read the article I referred you to, you would have known that
> this approach, this program, is bogus. I see no logic to continue here as
> long as you do not realize and recognize the Gambler's fallacy on which all
> arguments presented so far, including yours, are based. I would only be
> wasting more precious free time by repeating myself in one way or another.
If the odds of getting a 0 is 1 out of 10, then the odds of NOT getting a zero is 9/10. Which means the odds of picking 10 numbers and not getting ANY zeroes is (9/10)^10, which is approximately 0.35. This has NOTHING to do with the Gambler's Fallacy.
>
> This should give you pause: In real mathematics, events with zero
> probability can occur.
Nobody will disagree with that. The probability of me winning the lottery is zero if I don't buy a ticket.
>
> --
> PointedEars
>
> Twitter: @PointedEars2
> Please do not cc me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2015-06-16 16:58 -0600 |
| Message-ID | <mailman.527.1434495550.13271.python-list@python.org> |
| In reply to | #92704 |
On Tue, Jun 16, 2015 at 4:30 PM, <sohcahtoa82@gmail.com> wrote: > On Tuesday, June 16, 2015 at 3:01:06 PM UTC-7, Thomas 'PointedEars' Lahn wrote: >> This should give you pause: In real mathematics, events with zero >> probability can occur. > > Nobody will disagree with that. The probability of me winning the lottery is zero if I don't buy a ticket. I believe he's actually referring to this: https://en.wikipedia.org/wiki/Almost_surely Not that this has anything to do with the probabilities under discussion in this thread.
[toc] | [prev] | [next] | [standalone]
| From | Laura Creighton <lac@openend.se> |
|---|---|
| Date | 2015-06-17 11:28 +0200 |
| Message-ID | <mailman.544.1434533340.13271.python-list@python.org> |
| In reply to | #92704 |
In a message of Tue, 16 Jun 2015 16:58:26 -0600, Ian Kelly writes: >On Tue, Jun 16, 2015 at 4:30 PM, <sohcahtoa82@gmail.com> wrote: >> On Tuesday, June 16, 2015 at 3:01:06 PM UTC-7, Thomas 'PointedEars' Lahn wrote: >>> This should give you pause: In real mathematics, events with zero >>> probability can occur. >> >> Nobody will disagree with that. The probability of me winning the lottery is zero if I don't buy a ticket. > >I believe he's actually referring to this: > >https://en.wikipedia.org/wiki/Almost_surely > >Not that this has anything to do with the probabilities under >discussion in this thread. >-- >https://mail.python.org/mailman/listinfo/python-list I think he is talking about what mathematicians call 'discrepancy': https://en.wikipedia.org/wiki/Low-discrepancy_sequence Laura
[toc] | [prev] | [next] | [standalone]
| From | Ned Batchelder <ned@nedbatchelder.com> |
|---|---|
| Date | 2015-06-16 16:26 -0700 |
| Message-ID | <dfc293e6-01b8-4179-92c3-2d7c2ffcbbe8@googlegroups.com> |
| In reply to | #92703 |
On Tuesday, June 16, 2015 at 6:01:06 PM UTC-4, Thomas 'PointedEars' Lahn wrote:
> Ned Batchelder wrote:
>
> > [...]
> > This is done empirically, by producing `nseq` sequences of
> > `nrolls` rolls of the die. Each sequence is examined to
> > see if it has a zero. The total number of no-zero
> > sequences divided `nseq` is the probability.
>
> No, it is not. It is the relative frequency for *this* number of trials and
> *this* run of the experiment.
>
> > """
> > no_zeros = 0
> > for _ in xrange(nseq):
> > seq = die_rolls(nrolls)
> > if not any_zeros(seq):
> > no_zeros += 1
> > return float(no_zeros)/nseq
> >
> > for n in range(10, 101, 10):
> > # Calculate the probability of getting no zeros by trying
> > # it a million times.
> > prob = probability_of_no_zero(n, 1000000)
> > print "n = {:3d}, P(no zero) = {:.8f}".format(n, prob)
> >
> >
> >
> > Running this gives:
> >
> > $ pypy testrandom.py
> > n = 10, P(no zero) = 0.34867300
> > n = 20, P(no zero) = 0.12121900
> > n = 30, P(no zero) = 0.04267000
> > n = 40, P(no zero) = 0.01476600
> > n = 50, P(no zero) = 0.00519900
> > n = 60, P(no zero) = 0.00174100
> > n = 70, P(no zero) = 0.00061600
> > n = 80, P(no zero) = 0.00020600
> > n = 90, P(no zero) = 0.00006300
> > n = 100, P(no zero) = 0.00002400
> >
> >
> > As n increases, the probability of having no zeros goes down.
>
> 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.
> 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.
> 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.
I'll stop trying to explain it.
--Ned.
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2015-06-17 01:45 +0200 |
| Message-ID | <3049728.zPiIGXGd9A@PointedEars.de> |
| In reply to | #92708 |
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. -- PointedEars Twitter: @PointedEars2 Please do not cc me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | sohcahtoa82@gmail.com |
|---|---|
| Date | 2015-06-16 17:36 -0700 |
| Message-ID | <abcf102d-e523-49bb-94e9-9a6d15971021@googlegroups.com> |
| In reply to | #92709 |
On Tuesday, June 16, 2015 at 4:48:36 PM UTC-7, 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. Actually, no, they're not. They're entirely different problems. "What are the odds of getting 8 zeros in a row?" is a *COMPLETELY* different question from "What are the odds of getting a zero on the next roll?" >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. Yes, we all know what the gambler's fallacy is, but that's not what anyone is arguing. If you pick 8 random numbers between 0 and 9 (inclusive), then the odds of getting all zeros is (1/10)^8. Do you agree with that? The odds of getting NO zeros is (9/10)^8. Do you agree with that? Note that NEITHER of these scenarios say anything about a pre-condition. The first question is *NOT* asking "If you picked 7 random numbers between 0 and 9 and got 0 for all 7, what are the odds of getting another 0?" The answer to that is obviously 1/10, and anybody arguing something else would certainly be committing the Gambler's fallacy. > > Learn probability theory, and use a dictionary in Python when you want to > count random hits. I know enough probability theory to know that you're either wrong or you keep changing the problem to something nobody else has said in order to think you're right. > > -- > PointedEars > > Twitter: @PointedEars2 > Please do not cc me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2015-06-17 11:01 +1000 |
| Message-ID | <mailman.533.1434502908.13271.python-list@python.org> |
| In reply to | #92713 |
On Wed, Jun 17, 2015 at 10:36 AM, <sohcahtoa82@gmail.com> wrote: > Yes, we all know what the gambler's fallacy is, but that's not what anyone is arguing. The only instance of gambler's fallacy I'm seeing here is "PointedEars didn't understand the last dozen emails, so he's due to understand the next one". I've given up trying to explain. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Ethan Furman <ethan@stoneleaf.us> |
|---|---|
| Date | 2015-06-16 18:32 -0700 |
| Message-ID | <mailman.535.1434504769.13271.python-list@python.org> |
| In reply to | #92713 |
On 06/16/2015 06:01 PM, Chris Angelico wrote: > The only instance of gambler's fallacy I'm seeing here is "PointedEars > didn't understand the last dozen emails, so he's due to understand the > next one". I've given up trying to explain. +1 QotW
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2015-06-17 09:41 +0100 |
| Message-ID | <mailman.543.1434530510.13271.python-list@python.org> |
| In reply to | #92713 |
On 17/06/2015 02:01, Chris Angelico wrote: > On Wed, Jun 17, 2015 at 10:36 AM, <sohcahtoa82@gmail.com> wrote: >> Yes, we all know what the gambler's fallacy is, but that's not what anyone is arguing. > > The only instance of gambler's fallacy I'm seeing here is "PointedEars > didn't understand the last dozen emails, so he's due to understand the > next one". I've given up trying to explain. > > ChrisA > An alternative explanation is that he's just a plain, old fashioned troll, as pointed out by Denis McMahon some weeks ago. Now what is the probability of that? :) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence
[toc] | [prev] | [next] | [standalone]
| From | Grant Edwards <invalid@invalid.invalid> |
|---|---|
| Date | 2015-06-17 14:04 +0000 |
| Message-ID | <mlrupd$i93$1@reader1.panix.com> |
| In reply to | #92732 |
On 2015-06-17, Mark Lawrence <breamoreboy@yahoo.co.uk> wrote:
> An alternative explanation is that he's just a plain, old fashioned
> troll, as pointed out by Denis McMahon some weeks ago. Now what is
> the probability of that? :)
Looks to me like it's asymptotically approaching 1. I'm going to stop
paying attention now, but I think somebody should keep this thread
going for an infinite number of posts to see if it ever really does
get to 1.
--
Grant Edwards grant.b.edwards Yow! Four thousand
at different MAGNATES, MOGULS
gmail.com & NABOBS are romping in my
gothic solarium!!
[toc] | [prev] | [next] | [standalone]
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2015-06-17 09:01 -0600 |
| Message-ID | <mailman.555.1434553349.13271.python-list@python.org> |
| In reply to | #92749 |
On Wed, Jun 17, 2015 at 8:04 AM, Grant Edwards <invalid@invalid.invalid> wrote: > On 2015-06-17, Mark Lawrence <breamoreboy@yahoo.co.uk> wrote: > >> An alternative explanation is that he's just a plain, old fashioned >> troll, as pointed out by Denis McMahon some weeks ago. Now what is >> the probability of that? :) > > Looks to me like it's asymptotically approaching 1. I'm going to stop > paying attention now, but I think somebody should keep this thread > going for an infinite number of posts to see if it ever really does > get to 1. He's apparently closed out the thread already. If he is a troll, at least he's one who eventually gets bored and leaves. I think it's more likely though that he just has a massively overblown ego that won't allow him to admit (maybe even consider) that he may have made a mistake.
[toc] | [prev] | [next] | [standalone]
| From | MRAB <python@mrabarnett.plus.com> |
|---|---|
| Date | 2015-06-17 01:42 +0100 |
| Message-ID | <mailman.532.1434501913.13271.python-list@python.org> |
| In reply to | #92709 |
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.
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2015-06-17 08:53 +0200 |
| Message-ID | <16305487.vjehVXsXp1@PointedEars.de> |
| In reply to | #92714 |
MRAB wrote:
> On 2015-06-17 00:45, Thomas 'PointedEars' Lahn wrote:
>> 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.
I think that you, too, do not know what you are talking about.
> You're talking about the probability of each event, while
> everybody else is talking about the probability of certain combinations
> of events.
No.
> 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.
And half of the population is homosexual as with 50 % males and 50 % females
there is an equal number of homosexual pairs (male–male, female–female) as
heterosexual ones (male–female, female–male). NOT.
Final posting by me in this thread as the misconceptions about probability
are apparently too deeply embedded in the general public to be resolved
here.
In summary:
1. Combinations matter, not permutations.
2. <https://en.wikipedia.org/wiki/Law_of_averages>
3.
<http://www.teacherlink.org/content/math/interactive/probability/interactivequiz/home.html>
(Whereas I predict that the ignorant will see the correct answer to
question 3 as proof of the correctness of their misconception.)
EOD.
--
PointedEars
Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | Christian Gollwitzer <auriocus@gmx.de> |
|---|---|
| Date | 2015-06-17 09:22 +0200 |
| Message-ID | <mlr755$34o$2@dont-email.me> |
| In reply to | #92728 |
Am 17.06.15 um 08:53 schrieb Thomas 'PointedEars' Lahn: > 3. > <http://www.teacherlink.org/content/math/interactive/probability/interactivequiz/home.html> > (Whereas I predict that the ignorant will see the correct answer to > question 3 as proof of the correctness of their misconception.) I'v been to the UK recently for cycling holidays. A nightmare! So many ignorant people all driving on the wrong side of the road! > EOD. :)
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2015-06-17 17:28 +1000 |
| Message-ID | <mailman.541.1434526118.13271.python-list@python.org> |
| In reply to | #92729 |
On Wed, Jun 17, 2015 at 5:22 PM, Christian Gollwitzer <auriocus@gmx.de> wrote: > I'v been to the UK recently for cycling holidays. A nightmare! So many > ignorant people all driving on the wrong side of the road! You might argue that you drive on the right side of the road, but if you call what British people drive on the "wrong" side, then you don't understand the language. It's called "English", remember, not "American", and the word you want is "left". Get it *right*... oh wait. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Tim Golden <mail@timgolden.me.uk> |
|---|---|
| Date | 2015-06-17 08:30 +0100 |
| Message-ID | <mailman.542.1434526258.13271.python-list@python.org> |
| In reply to | #92729 |
On 17/06/2015 08:22, Christian Gollwitzer wrote: > Am 17.06.15 um 08:53 schrieb Thomas 'PointedEars' Lahn: >> 3. >> <http://www.teacherlink.org/content/math/interactive/probability/interactivequiz/home.html> >> >> (Whereas I predict that the ignorant will see the correct answer to >> question 3 as proof of the correctness of their misconception.) > > I'v been to the UK recently for cycling holidays. A nightmare! So many > ignorant people all driving on the wrong side of the road! Yes, we do get many foreign tourists at this time of the year :) TJG
[toc] | [prev] | [next] | [standalone]
| From | Cecil Westerhof <Cecil@decebal.nl> |
|---|---|
| Date | 2015-06-17 11:57 +0200 |
| Message-ID | <87a8vyhd34.fsf@Equus.decebal.nl> |
| In reply to | #92731 |
On Wednesday 17 Jun 2015 09:30 CEST, Tim Golden wrote: > On 17/06/2015 08:22, Christian Gollwitzer wrote: >> Am 17.06.15 um 08:53 schrieb Thomas 'PointedEars' Lahn: >>> 3. >>> <http://www.teacherlink.org/content/math/interactive/probability/interactivequiz/home.html> >>> >>> (Whereas I predict that the ignorant will see the correct answer >>> to question 3 as proof of the correctness of their misconception.) >> >> I'v been to the UK recently for cycling holidays. A nightmare! So >> many ignorant people all driving on the wrong side of the road! > > Yes, we do get many foreign tourists at this time of the year :) (^_-)d -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
|---|---|
| Date | 2015-06-17 01:36 +0000 |
| Message-ID | <5580cf22$0$1667$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #92709 |
On Wed, 17 Jun 2015 01:45:27 +0200, Thomas 'PointedEars' Lahn wrote:
> The
> probability of only having sons is _not_ greater than that of having
> sons and one daughter or vice-versa.
Take a family of four children. We can enumerate all the possibilities,
using S for son and D for daughter, there are exactly 2**4 = 16 of them:
SSSS
SSSD
SSDS
SSDD
SDSS
SDSD
SDDS
SDDD
DSSS
DSSD
DSDS
DSDD
DDSS
DDSD
DDDS
DDDD
There is exactly 1 outcome which is "all sons", 4 outcomes which is
"three sons and one daughter", 14 outcomes which is "at least one son and
one daughter", 15 outcomes which are "at least one son", and 1 outcome is
"no sons".
If you have *two* children, those probabilities are different:
SS, SD, DS, DD
All sons: 1/4, not 1/16.
Three sons and one daughter: 0, not 4/16.
At least one son and one daughter: 2/4, not 14/16.
At least one son: 3/4, not 15/16.
No sons: 1/4, not 1/16.
With four children, it is true that the probability of these are the same:
SSSS vs SSDS
but that's not the question. The question is to compare the probability
of these:
SSSS vs (SSDS or SSSD or SDSS or DSSS)
> And for that it does _not_ matter
> how many children you have
Of course it does. Assuming the births are independent and the
probability of a boy is 1/2, the probability of having "no boys" depends
on how many children you have:
Pr(no boys, given no children) = 1
Pr(no boys, given 1 child) = 1/2
Pr(no boys, given 2 children) = 1/4
Pr(no boys, given 3 children) = 1/8
Pr(no boys, given 4 children) = 1/16
and in general:
Pr(no boys, given n children) = 1/2**n
> *because* it does _not_ matter how many
> children you had before. The probability for a boy or a girl is
> *always* the same.
That is completely irrelevant, as has been explained to you over and over
again. A little learning is a dangerous thing.
> 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.
You are the only one talking about being "due" for a result. You are
ignoring what we are saying, ignoring the clear and detailed analysis we
have repeatedly given, ignored the simulations we have given, and keep
coming back to your arrogant *AND WRONG* accusation that we are making
the gambler's fallacy.
Time to man up and admit your mistake.
--
Steven D'Aprano
[toc] | [prev] | [next] | [standalone]
| From | Laura Creighton <lac@openend.se> |
|---|---|
| Date | 2015-06-17 12:33 +0200 |
| Message-ID | <mailman.545.1434537246.13271.python-list@python.org> |
| In reply to | #92709 |
Stick to dice. Stay away from children. One thing we know of, for sure,
is that certain breeding pairs are more likely to produce males, and
others are more likely to produce females. We will ignore those born who
are of indeterminate sex, for this discussion.
In human beings, as well as a whole lot of animal species, infant-and-
chidhood mortality is not sex neutral. More baby boys die than baby
girls. But when you look at breeding age men and women you will find
that the ratio is a lot closer to 50/50 than the birth age ratio.
Human beings, as a population currently produce more males than
females.
Now one way that could happen is if all human beings are predisposed to
have slightly more boy babies than girl babies when they breed. But
this isn't what we think happens.
Fisher's Principle says:
Suppose sexually active males are less common than females in
a population.
A male then has better mating prospects than a female, and
can expect to have more offspring. (Because some lucky males
can expect to mate with more than 1 female).
Therefore parents genetically disposed to produce males tend to
have more than average numbers of grandchildren born to them.
Thus genes for producing males will spread.
But this means that more males will be produced. Which means
that at some point, the first priciple no longer holds --
sexually active males are no longer less common than females
in the population. You can reach a state where females are
less common.
But the same thing kicks in, once more. And this time parents
who produce daughters tend to get more offspring. If you produce
a son, who doesn't get to breed at all, from an evolutionary
standpoint you have wasted your time in a bad investment.
Thus the sex ratio will tend to 50/50. It is self-adjusting
that way.
-----------
Now, human beings, despite being very interesting to us, are very bad to
study this way. There are too many other complicating factors in human
reproduction, and human beings take too long to reach sexual maturity
anyway. But you can study this in animals where you can artificially
bias the population any way you like, and who reach sexual maturity
quickly so you can watch and see if it plays out like Fisher says it
would. And in lots of places that has been studied, it does.
It is a little hard to see how you would get the proper correspondence
between infant mortality rates and sex ratio -- this species produces
precisely enough extra girl babies to offset the fact that more girls
die as infants -- unless something like this was going on. And this
is measured to be so for some animals studied other than humans.
Bets are off in species where most of the males don't get to breed
anyway. The logic doesn't work for them.
But what this shows is that the statement that a given birth is as likely
to be a son as a daughter (or 52% likely to be a son and 48% likely
to be a daughter) only works for large populations. It's not going to
help you know if your next child is going to be a son or a daughter.
The parents of 4 boys who are trying, once again, thinking 'this time
it must be a girl!' may be up against something rather worse than
the gamblers fallacy. The odds that they have a girl may be substantially
lower than 50% -- it is quite possible that they are set up to only produce
boys, or to produce boys 80% of the time. We have no way of knowing
this, because right now we don't know exactly how a bias in producing
one sex or another is expressed. It is also quite possible that the
parents of 4 boys who want a girl have just been unlucky, because
they have no bias one way or another. Or extremely unlucky because
their bias is for daughters, but they keep getting results against the
odds.
All we know is that notion that every human birth has a 50/50
chance of being male or female is wrong.
Laura
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve@pearwood.info> |
|---|---|
| Date | 2015-06-17 22:47 +1000 |
| Message-ID | <55816c68$0$1673$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #92735 |
On Wed, 17 Jun 2015 08:33 pm, Laura Creighton wrote: > Stick to dice. Stay away from children. One thing we know of, for sure, > is that certain breeding pairs are more likely to produce males, and > others are more likely to produce females. We will ignore those born who > are of indeterminate sex, for this discussion. [...] > All we know is that notion that every human birth has a 50/50 > chance of being male or female is wrong. This is certainly true. In human beings, certain families tend to run with all girls or all boys, more often than you would expect from just chance. This suggests that at least some people are predisposed to have boys, or girls, rather than equal chance of both. Oh, and those intersex children? Surprisingly common: Wikipedia suggests that according to some definition, as many as 1.7% (about one in sixty) newborns may have ambiguous genitalia, or something other than XY/XX chromosomes. The frequency of non-XX, non-XY children alone is 3 in 5000. While it is important to know these facts, to understand that human beings (like other mammals) do not divide neatly into two distinct sexes, I think that's a complication not really necessary for basic statistics classes. As a first approximation, the idea that the proportion of boys and girls are both roughly equal at 1/2 isn't too far off the truth. After all, we make other simplifying assumptions about probability too. There are magicians who are capable of forcing coins to land the required way up, and somebody once built a machine capable of tossing a coin with the precise equal force and velocity every single time. Dice are rarely unbiased, and neither are roulette wheels. Nevertheless, we ignore those factual biases for the sake of simplicity. > In human beings, as well as a whole lot of animal species, infant-and- > chidhood mortality is not sex neutral. More baby boys die than baby > girls. Correct. And more Y sperm die than X sperm. Together, these two factors lead to a small but real bias towards girl children, at least on countries that don't practice wide-spread sex-specific abortion. > But when you look at breeding age men and women you will find > that the ratio is a lot closer to 50/50 than the birth age ratio. > Human beings, as a population currently produce more males than > females. Surely that depends on where (and when) you are? I know that, today, both India and China both abort far more female fetuses than male ones, leading to a large excess of men. But in countries that don't practice selective abortions, my understanding is that there is a small excess of women at virtually all ages, especially among the elderly. Men tend to die earlier than women in every age bracket. -- Steven
[toc] | [prev] | [next] | [standalone]
Page 3 of 4 — ← Prev page 1 2 [3] 4 Next page →
Back to top | Article view | comp.lang.python
csiph-web