Re: Testing random

2015-06-17 Thread Ian Kelly
On Wed, Jun 17, 2015 at 8:04 AM, Grant Edwards wrote: > On 2015-06-17, Mark Lawrence 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 asym

Re: Testing random

2015-06-17 Thread Grant Edwards
On 2015-06-17, Mark Lawrence 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 n

Re: Testing random

2015-06-17 Thread Laura Creighton
In a message of Wed, 17 Jun 2015 22:47:37 +1000, "Steven D'Aprano" writes: >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 >u

Re: Testing random

2015-06-17 Thread Steven D'Aprano
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 indeterminat

Re: Testing random

2015-06-17 Thread Laura Creighton
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 who

Re: Testing random

2015-06-17 Thread Cecil Westerhof
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. >>> >>> >>> (Whereas I predict tha

Re: Testing random

2015-06-17 Thread Laura Creighton
In a message of Tue, 16 Jun 2015 16:58:26 -0600, Ian Kelly writes: >On Tue, Jun 16, 2015 at 4:30 PM, 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. >> >>

Re: Testing random

2015-06-17 Thread Mark Lawrence
On 17/06/2015 02:01, Chris Angelico wrote: On Wed, Jun 17, 2015 at 10:36 AM, 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

Re: Testing random

2015-06-17 Thread Tim Golden
On 17/06/2015 08:22, Christian Gollwitzer wrote: > Am 17.06.15 um 08:53 schrieb Thomas 'PointedEars' Lahn: >> 3. >> >> >> (Whereas I predict that the ignorant will see the correct answer to >> quest

Re: Testing random

2015-06-17 Thread Chris Angelico
On Wed, Jun 17, 2015 at 5:22 PM, Christian Gollwitzer 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 driv

Re: Testing random

2015-06-17 Thread Christian Gollwitzer
Am 17.06.15 um 08:53 schrieb Thomas 'PointedEars' Lahn: 3. (Whereas I predict that the ignorant will see the correct answer to question 3 as proof of the correctness of their misconception.) I'v

Re: Testing random

2015-06-17 Thread Thomas 'PointedEars' Lahn
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 yo

Re: Testing random

2015-06-16 Thread Jussi Piitulainen
Ned Batchelder writes: > Thomas: let's say I generate streams of N digits drawn randomly from > 0-9. I then consider the probability of a zero *never appearing once* > in my stream. Let's call that P(N). Do you agree that as N > increases, P(N) decreases? In probability theory, that could be p

Re: Testing random

2015-06-16 Thread Steven D'Aprano
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, the

Re: Testing random

2015-06-16 Thread Steven D'Aprano
On Tue, 16 Jun 2015 13:48:04 -0700, Ned Batchelder wrote: > I apologize, I'm sure I've been using the mathematical terms > imprecisely. We are all intelligent people, so I still believe we > disagree because we are talking about different things. Neil, I believe that your actual mistake is assumi

Re: Testing random

2015-06-16 Thread Ethan Furman
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 -- https://mail.python.org/mailman/listinfo/python-lis

Re: Testing random

2015-06-16 Thread Chris Angelico
On Wed, Jun 17, 2015 at 10:36 AM, 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

Re: Testing random

2015-06-16 Thread MRAB
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

Re: Testing random

2015-06-16 Thread sohcahtoa82
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 co

Re: Testing random

2015-06-16 Thread Thomas 'PointedEars' Lahn
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 th

Re: Testing random

2015-06-16 Thread Ned Batchelder
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

Re: Testing random

2015-06-16 Thread Ian Kelly
On Jun 16, 2015 4:58 PM, "Ian Kelly" wrote: > > On Tue, Jun 16, 2015 at 4:30 PM, 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 disag

Re: Testing random

2015-06-16 Thread Ian Kelly
On Tue, Jun 16, 2015 at 4:30 PM, 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 lotter

Re: Testing random

2015-06-16 Thread sohcahtoa82
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

Re: Testing random

2015-06-16 Thread Thomas 'PointedEars' Lahn
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 relativ

Re: Testing random

2015-06-16 Thread Ned Batchelder
On Tuesday, June 16, 2015 at 3:21:46 PM UTC-4, Thomas 'PointedEars' Lahn wrote: > Ned Batchelder wrote: > > > You aren't agreeing because you are arguing about different things. > > Thomas is talking about the relative probability of sequences of digits. > > There is no such thing as “relative pr

Re: Testing random

2015-06-16 Thread random832
On Tue, Jun 16, 2015, at 15:18, Thomas 'PointedEars' Lahn wrote: > There is no such thing as “relative probability”, except perhaps in > popular- > scientific material and bad translations. You might mean relative > _frequency_, but I was not talking about that specifically. The probability of o

Re: Testing random

2015-06-16 Thread Thomas 'PointedEars' Lahn
Ned Batchelder wrote: > You aren't agreeing because you are arguing about different things. > Thomas is talking about the relative probability of sequences of digits. There is no such thing as “relative probability”, except perhaps in popular- scientific material and bad translations. You might

Re: Testing random

2015-06-13 Thread Mark Lawrence
On 12/06/2015 23:00, Ian Kelly wrote: On Fri, Jun 12, 2015 at 3:32 PM, Thomas 'PointedEars' Lahn wrote: Ian Kelly wrote: The probability of 123456789 and 1 are equal. The probability of a sequence containing all nine numbers and a sequence containing only 1s are *not* equal. There i

Re: Testing random

2015-06-12 Thread sohcahtoa82
On Friday, June 12, 2015 at 3:12:26 PM UTC-7, Thomas 'PointedEars' Lahn wrote: > Ian Kelly wrote: > > > [...] Thomas 'PointedEars' Lahn [...] wrote: > >> Ian Kelly wrote: > >>> The probability of 123456789 and 1 are equal. The probability > >>> of a sequence containing all nine numbers and

Re: Testing random

2015-06-12 Thread random832
On Fri, Jun 12, 2015, at 18:09, Thomas 'PointedEars' Lahn wrote: > Do you deny that “123456789” *is* “a sequence containing all nine > numbers” Do you deny that "123456798" *is* "a sequence containing all nine numbers"? Does this mean that "123456789" *is* "123456798" by the transitive property?

Re: Testing random

2015-06-12 Thread Ian Kelly
On Jun 12, 2015 4:16 PM, "Thomas 'PointedEars' Lahn" wrote: > > Ian Kelly wrote: > > > […] Thomas 'PointedEars' Lahn […] wrote: > >> Ian Kelly wrote: > >>> The probability of 123456789 and 1 are equal. The probability > >>> of a sequence containing all nine numbers and a sequence containin

Re: Testing random

2015-06-12 Thread Thomas 'PointedEars' Lahn
Ian Kelly wrote: > […] Thomas 'PointedEars' Lahn […] wrote: >> Ian Kelly wrote: >>> The probability of 123456789 and 1 are equal. The probability >>> of a sequence containing all nine numbers and a sequence containing >>> only 1s are *not* equal.d >> There is a contradiction in that statem

Re: Testing random

2015-06-12 Thread Ian Kelly
On Fri, Jun 12, 2015 at 3:32 PM, Thomas 'PointedEars' Lahn wrote: > Ian Kelly wrote: > >> The probability of 123456789 and 1 are equal. The probability >> of a sequence containing all nine numbers and a sequence containing >> only 1s are *not* equal. > > There is a contradiction in that st

Re: Testing random

2015-06-12 Thread random832
On Fri, Jun 12, 2015, at 17:32, Thomas 'PointedEars' Lahn wrote: > Ian Kelly wrote: > > > The probability of 123456789 and 1 are equal. The probability > > of a sequence containing all nine numbers and a sequence containing > > only 1s are *not* equal. > > There is a contradiction in that

Re: Testing random

2015-06-12 Thread alister
On Fri, 12 Jun 2015 23:32:31 +0200, Thomas 'PointedEars' Lahn wrote: > Ian Kelly wrote: > >> The probability of 123456789 and 1 are equal. The probability >> of a sequence containing all nine numbers and a sequence containing >> only 1s are *not* equal. > > There is a contradiction in th

Re: Testing random

2015-06-12 Thread Thomas 'PointedEars' Lahn
Ian Kelly wrote: > The probability of 123456789 and 1 are equal. The probability > of a sequence containing all nine numbers and a sequence containing > only 1s are *not* equal. There is a contradiction in that statement. Can you find it? -- PointedEars Twitter: @PointedEars2 Please d

Re: Testing random

2015-06-10 Thread Jussi Piitulainen
sohcahto...@gmail.com writes: [...] > Here's where I think you two are having such a huge disagreement. > Does order matter? It depends what you're pulling random numbers out > for. > > The odds of seeing 2 1 are also only 1/36. But if order doesn't > matter in your application, then 1 2 is equ

Re: Testing random

2015-06-10 Thread random832
On Wed, Jun 10, 2015, at 13:03, Thomas 'PointedEars' Lahn wrote: > This is _not_ a lottery box; you put the ball with the number on it *back > into the box* after you have drawn it and before you draw a new one. Yes, but getting a 2, putting it back, and getting a 1 is just as good as getting a 1

Re: Testing random

2015-06-10 Thread Ian Kelly
On Wed, Jun 10, 2015 at 11:03 AM, Thomas 'PointedEars' Lahn wrote: > Jussi Piitulainen wrote: > >> Thomas 'PointedEars' Lahn writes: >>> Jussi Piitulainen wrote: Thomas 'PointedEars' Lahn writes: > 8 3 6 3 1 2 6 8 2 1 6. There are more than four hundred thousand ways to get th

Re: Testing random

2015-06-10 Thread sohcahtoa82
On Wednesday, June 10, 2015 at 10:06:49 AM UTC-7, Thomas 'PointedEars' Lahn wrote: > Jussi Piitulainen wrote: > > > Thomas 'PointedEars' Lahn writes: > >> Jussi Piitulainen wrote: > >>> Thomas 'PointedEars' Lahn writes: > 8 3 6 3 1 2 6 8 2 1 6. > >>> > >>> There are more than four hundred

Re: Testing random

2015-06-10 Thread Thomas 'PointedEars' Lahn
Jussi Piitulainen wrote: > Thomas 'PointedEars' Lahn writes: >> Jussi Piitulainen wrote: >>> Thomas 'PointedEars' Lahn writes: 8 3 6 3 1 2 6 8 2 1 6. >>> >>> There are more than four hundred thousand ways to get those numbers >>> in some order. >>> >>> (11! / 2! / 2! / 2! / 3! / 2! = 4158

Re: Testing random

2015-06-08 Thread Jussi Piitulainen
Thomas 'PointedEars' Lahn writes: > Jussi Piitulainen wrote: >> Thomas 'PointedEars' Lahn writes: >> >>> 8 3 6 3 1 2 6 8 2 1 6. >> >> There are more than four hundred thousand ways to get those numbers >> in some order. >> >> (11! / 2! / 2! / 2! / 3! / 2! = 415800) > > Fallacy. Order is irrele

Re: Testing random

2015-06-07 Thread random832
On Sun, Jun 7, 2015, at 21:42, Chris Angelico wrote: > On Mon, Jun 8, 2015 at 11:34 AM, wrote: > > In general, as the number of trials increases, the probability of having > > e.g. at least one of each value never _reaches_ 1, but it gets > > arbitrarily close. > > And by "arbitrarily close", yo

Re: Testing random

2015-06-07 Thread MRAB
On 2015-06-08 02:42, Chris Angelico wrote: On Mon, Jun 8, 2015 at 11:34 AM, wrote: In general, as the number of trials increases, the probability of having e.g. at least one of each value never _reaches_ 1, but it gets arbitrarily close. And by "arbitrarily close", you mean any of: I belie

Re: Testing random

2015-06-07 Thread Chris Angelico
On Mon, Jun 8, 2015 at 11:34 AM, wrote: > In general, as the number of trials increases, the probability of having > e.g. at least one of each value never _reaches_ 1, but it gets > arbitrarily close. And by "arbitrarily close", you mean any of: * So close to 1.0 that IEEE double precision is u

Re: Testing random

2015-06-07 Thread Steven D'Aprano
On Sun, 7 Jun 2015 11:35 pm, Peter Otten wrote: > Steven D'Aprano wrote: > > >>> I wrote a very simple function to test random: >>> def test_random(length, multiplier = 1): >>> number_list = length * [0] >>> for i in range(length * multiplier): >>> number_list

Re: Testing random

2015-06-07 Thread random832
On Sun, Jun 7, 2015, at 16:56, Thomas 'PointedEars' Lahn wrote: > random...@fastmail.us wrote: > > > On Sun, Jun 7, 2015, at 16:09, Thomas 'PointedEars' Lahn wrote: > >> No. AISB, those sequences all have the same probability: > > > > Yes and the probability of getting _any_ of the sequences, is

Re: Testing random

2015-06-07 Thread Steven D'Aprano
On Mon, 8 Jun 2015 06:56 am, Thomas 'PointedEars' Lahn wrote: > You really should follow the references and brush up your math. You really should stop being patronising to everyone and pay attention to what is actually being said. If you won't believe us, and you won't believe mathematics, perha

Re: Testing random

2015-06-07 Thread Steven D'Aprano
On Mon, 8 Jun 2015 04:23 am, Thomas 'PointedEars' Lahn wrote: > Chris Angelico wrote: > >> On Mon, Jun 8, 2015 at 2:36 AM, Thomas 'PointedEars' Lahn >> wrote: The greater the multiplier, the lower the chance that any element will have no hits. >>> Wrong. >>> [ex falso quodlibet] >

Re: Testing random

2015-06-07 Thread Ned Batchelder
On Sunday, June 7, 2015 at 2:26:02 PM UTC-4, Thomas 'PointedEars' Lahn wrote: > Chris Angelico wrote: > > > On Mon, Jun 8, 2015 at 2:36 AM, Thomas 'PointedEars' Lahn > > wrote: > >>> The greater the multiplier, the lower the chance that any element will > >>> have no hits. > >> Wrong. > >> > >>>

Re: Testing random

2015-06-07 Thread Thomas 'PointedEars' Lahn
random...@fastmail.us wrote: > On Sun, Jun 7, 2015, at 16:09, Thomas 'PointedEars' Lahn wrote: >> No. AISB, those sequences all have the same probability: > > Yes and the probability of getting _any_ of the sequences, is the sum of > the probabilities for each one of the sequences individually.

Re: Testing random

2015-06-07 Thread Thomas 'PointedEars' Lahn
random...@fastmail.us wrote: > On Sun, Jun 7, 2015, at 16:09, Thomas 'PointedEars' Lahn wrote: >> No. AISB, those sequences all have the same probability: > > Yes and the probability of getting _any_ of the sequences, is the sum of > the probabilities for each one of the sequences individually.

Re: Testing random

2015-06-07 Thread random832
On Sun, Jun 7, 2015, at 16:09, Thomas 'PointedEars' Lahn wrote: > No. AISB, those sequences all have the same probability: Yes and the probability of getting _any_ of the sequences, is the sum of the probabilities for each one of the sequences individually. -- https://mail.python.org/mailman/l

Re: Testing random

2015-06-07 Thread Thomas 'PointedEars' Lahn
Peter Otten wrote: > Thomas 'PointedEars' Lahn wrote: >> Peter Otten wrote: >>> Steven D'Aprano wrote: > I wrote a very simple function to test random: > def test_random(length, multiplier = 1): > number_list = length * [0] > for i in range(length * multipl

Re: Testing random

2015-06-07 Thread Thomas 'PointedEars' Lahn
random...@fastmail.us wrote: > On Sun, Jun 7, 2015, at 15:29, Thomas 'PointedEars' Lahn wrote: >> Jussi Piitulainen wrote: >> > Thomas 'PointedEars' Lahn writes: >> >> 8 3 6 3 1 2 6 8 2 1 6. >> > >> > There are more than four hundred thousand ways to get those numbers in >> > some order. >> >

Re: Testing random

2015-06-07 Thread Thomas 'PointedEars' Lahn
Chris Angelico wrote: > On Mon, Jun 8, 2015 at 4:23 AM, Thomas 'PointedEars' Lahn > wrote: >> If the set to choose from is integer numbers from 1 to 9, then *each* of >> those sequences has *the same* probability (1∕9)¹¹ ≈ 3.1866355 × 10⁻¹¹. >> >> AISB, those are *independent* events; the number

Re: Testing random

2015-06-07 Thread random832
On Sun, Jun 7, 2015, at 15:29, Thomas 'PointedEars' Lahn wrote: > Jussi Piitulainen wrote: > > > Thomas 'PointedEars' Lahn writes: > >> 8 3 6 3 1 2 6 8 2 1 6. > > > > There are more than four hundred thousand ways to get those numbers in > > some order. > > > > (11! / 2! / 2! / 2! / 3! / 2! =

Re: Testing random

2015-06-07 Thread Thomas 'PointedEars' Lahn
Jussi Piitulainen wrote: > Thomas 'PointedEars' Lahn writes: >> 8 3 6 3 1 2 6 8 2 1 6. > > There are more than four hundred thousand ways to get those numbers in > some order. > > (11! / 2! / 2! / 2! / 3! / 2! = 415800) Fallacy. Order is irrelevant here. -- PointedEars Twitter: @PointedEa

Re: Testing random

2015-06-07 Thread Jussi Piitulainen
Thomas 'PointedEars' Lahn writes: > Chris Angelico wrote: > >> Huh. Do you want to explain how, mathematically, I am wrong, or do >> you want to join the RUE in my ignore list? > > I already did; you have overlooked it. In a nutshell, the probability > of > > 1 1 1 1 1 1 1 1 1 1 1 There is one

Re: Testing random

2015-06-07 Thread Chris Angelico
On Mon, Jun 8, 2015 at 4:23 AM, Thomas 'PointedEars' Lahn wrote: > If the set to choose from is integer numbers from 1 to 9, then *each* of > those sequences has *the same* probability (1∕9)¹¹ ≈ 3.1866355 × 10⁻¹¹. > > AISB, those are *independent* events; the number of occurrences of an > outcome

Re: Testing random

2015-06-07 Thread Chris Angelico
On Mon, Jun 8, 2015 at 4:28 AM, Steven D'Aprano wrote: > If my previous post didn't convince you, consider an even simpler random > distribution: tossing a fair coin. The probability of getting a head is > exactly 1/2 whether you toss the coin once or a thousand times. But if you > toss the coin o

Re: Testing random

2015-06-07 Thread Steven D'Aprano
On Mon, 8 Jun 2015 02:36 am, Thomas 'PointedEars' Lahn wrote: > Chris Angelico wrote: >> The greater the multiplier, the lower the chance that any element will >> have no hits. > > Wrong. No, Chris is correct. The "multiplier" increases the number of samples. The larger the number of samples, t

Re: Testing random

2015-06-07 Thread Thomas 'PointedEars' Lahn
Chris Angelico wrote: > On Mon, Jun 8, 2015 at 2:36 AM, Thomas 'PointedEars' Lahn > wrote: >>> The greater the multiplier, the lower the chance that any element will >>> have no hits. >> Wrong. >> >>> [ex falso quodlibet] > > Huh. Do you want to explain how, mathematically, I am wrong, or do you

Re: Testing random

2015-06-07 Thread Steven D'Aprano
On Mon, 8 Jun 2015 01:51 am, Thomas 'PointedEars' Lahn wrote: > Chris Angelico wrote: > >> On Sun, Jun 7, 2015 at 8:40 PM, Thomas 'PointedEars' Lahn >> wrote: >>> Cecil Westerhof wrote: I wrote a very simple function to test random: def test_random(length, multiplier = 1):

Re: Testing random

2015-06-07 Thread C.D. Reimer
On 6/7/2015 10:20 AM, Chris Angelico wrote: A fourth possibility is that mathematics works differently for him and for us, which I suppose is possible; when I visited sci.math a while ago, I found some people for whom everything I'd learned in grade school was clearly wrong, and they were doing t

Re: Testing random

2015-06-07 Thread Chris Angelico
On Mon, Jun 8, 2015 at 3:07 AM, Ian Kelly wrote: > On Sun, Jun 7, 2015 at 10:44 AM, Chris Angelico wrote: >> On Mon, Jun 8, 2015 at 2:36 AM, Thomas 'PointedEars' Lahn >> wrote: The greater the multiplier, the lower the chance that any element will have no hits. >>> >>> Wrong. >>>

Re: Testing random

2015-06-07 Thread Ian Kelly
On Sun, Jun 7, 2015 at 10:44 AM, Chris Angelico wrote: > On Mon, Jun 8, 2015 at 2:36 AM, Thomas 'PointedEars' Lahn > wrote: >>> The greater the multiplier, the lower the chance that any element will >>> have no hits. >> >> Wrong. >> >>> [ex falso quodlibet] > > Huh. Do you want to explain how, ma

Re: Testing random

2015-06-07 Thread Peter Otten
Thomas 'PointedEars' Lahn wrote: > Peter Otten wrote: > >> Steven D'Aprano wrote: I wrote a very simple function to test random: def test_random(length, multiplier = 1): number_list = length * [0] for i in range(length * multiplier): nu

Re: Testing random

2015-06-07 Thread Chris Angelico
On Mon, Jun 8, 2015 at 2:36 AM, Thomas 'PointedEars' Lahn wrote: >> The greater the multiplier, the lower the chance that any element will >> have no hits. > > Wrong. > >> [ex falso quodlibet] Huh. Do you want to explain how, mathematically, I am wrong, or do you want to join the RUE in my ignore

Re: Testing random

2015-06-07 Thread Thomas 'PointedEars' Lahn
Chris Angelico wrote: > On Mon, Jun 8, 2015 at 1:51 AM, Thomas 'PointedEars' Lahn > wrote: >> Chris Angelico wrote: >> >>> On Sun, Jun 7, 2015 at 8:40 PM, Thomas 'PointedEars' Lahn >>> wrote: Cecil Westerhof wrote: > I wrote a very simple function to test random: > def test_rand

Re: Testing random

2015-06-07 Thread Thomas 'PointedEars' Lahn
Peter Otten wrote: > Steven D'Aprano wrote: >>> I wrote a very simple function to test random: >>> def test_random(length, multiplier = 1): >>> number_list = length * [0] >>> for i in range(length * multiplier): >>> number_list[random.randint(0, length - 1)] +=

Re: Testing random

2015-06-07 Thread Chris Angelico
On Mon, Jun 8, 2015 at 1:51 AM, Thomas 'PointedEars' Lahn wrote: > Chris Angelico wrote: > >> On Sun, Jun 7, 2015 at 8:40 PM, Thomas 'PointedEars' Lahn >> wrote: >>> Cecil Westerhof wrote: I wrote a very simple function to test random: def test_random(length, multiplier = 1): >>

Re: Testing random

2015-06-07 Thread Thomas 'PointedEars' Lahn
Chris Angelico wrote: > On Sun, Jun 7, 2015 at 8:40 PM, Thomas 'PointedEars' Lahn > wrote: >> Cecil Westerhof wrote: >>> I wrote a very simple function to test random: >>> def test_random(length, multiplier = 1): >>> number_list = length * [0] >>> for i in range(length * m

Re: Testing random

2015-06-07 Thread Peter Otten
Steven D'Aprano wrote: >> I wrote a very simple function to test random: >> def test_random(length, multiplier = 1): >> number_list = length * [0] >> for i in range(length * multiplier): >> number_list[random.randint(0, length - 1)] += 1 >> minimum = mi

Re: Testing random

2015-06-07 Thread Steven D'Aprano
On Sun, 7 Jun 2015 10:52 pm, Steven D'Aprano wrote: > The median is unchanged, the mean shifts slightly higher, and the standard > deviation increases. But as you can see, these are not particularly > powerful tests of randomness: only the mode shows an obvious deviation > from uniformity. Oh, I

Re: Testing random

2015-06-07 Thread Christian Gollwitzer
Am 07.06.15 um 08:27 schrieb Cecil Westerhof: I wrote a very simple function to test random: def test_random(length, multiplier = 1): number_list = length * [0] for i in range(length * multiplier): number_list[random.randint(0, length - 1)] += 1 mi

Re: Testing random

2015-06-07 Thread Steven D'Aprano
On Sun, 7 Jun 2015 04:27 pm, Cecil Westerhof wrote: > I wrote a very simple function to test random: > def test_random(length, multiplier = 1): > number_list = length * [0] > for i in range(length * multiplier): > number_list[random.randint(0, length - 1)] += 1

Re: Testing random

2015-06-07 Thread Chris Angelico
On Sun, Jun 7, 2015 at 8:40 PM, Thomas 'PointedEars' Lahn wrote: > Cecil Westerhof wrote: > >> I wrote a very simple function to test random: >> def test_random(length, multiplier = 1): >> number_list = length * [0] >> for i in range(length * multiplier): >> num

Re: Testing random

2015-06-07 Thread Jonas Wielicki
On 07.06.2015 08:27, Cecil Westerhof wrote: > I wrote a very simple function to test random: > def test_random(length, multiplier = 1): > number_list = length * [0] > for i in range(length * multiplier): > number_list[random.randint(0, length - 1)] += 1 >

Re: Testing random

2015-06-07 Thread Thomas 'PointedEars' Lahn
Cecil Westerhof wrote: > I wrote a very simple function to test random: > def test_random(length, multiplier = 1): > number_list = length * [0] > for i in range(length * multiplier): > number_list[random.randint(0, length - 1)] += 1 > minimum = min(numbe