search for: 600150

Displaying 9 results from an estimated 9 matches for "600150".

Did you mean: 60150
2018 Sep 20
1
Bias in R's random integers?
> From: Duncan Murdoch <murdoch.duncan at gmail.com> > Let's try it: > > > m <- (2/5)*2^32 > > m > 2^31 > [1] FALSE > > x <- sample(m, 1000000, replace = TRUE) > > table(x %% 2) > > 0 1 > 399850 600150 > > Since m is an even number, the true proportions of evens and odds should > be exactly 0.5. That's some pretty strong evidence of the bug in the > generator. It seems to be a recently-introduced bug. Here's output with R-2.15.1: R version 2.15.1 (2012-06-22) -- &qu...
2018 Sep 19
4
Bias in R's random integers?
...etween the two possibilities, so our event could be even > versus odd outcomes. > > Let's try it: > > > m <- (2/5)*2^32 > > m > 2^31 > [1] FALSE > > x <- sample(m, 1000000, replace = TRUE) > > table(x %% 2) > > 0 1 > 399850 600150 > > Since m is an even number, the true proportions of evens and odds should > be exactly 0.5. That's some pretty strong evidence of the bug in the > generator. (Note that the ratio of the observed probabilities is about > 1.5, so I may not be the first person to have done this...
2018 Sep 19
2
Bias in R's random integers?
No, the 2nd call only happens when m > 2**31. Here's the code: (RNG.c, lines 793ff) double R_unif_index(double dn) { double cut = INT_MAX; switch(RNG_kind) { case KNUTH_TAOCP: case USER_UNIF: case KNUTH_TAOCP2: cut = 33554431.0; /* 2^25 - 1 */ break; default: break; } double u = dn > cut ? ru() : unif_rand(); return floor(dn * u); } On Wed, Sep
2018 Sep 19
0
Bias in R's random integers?
...good guess is that sample() outcomes would alternate between the two possibilities, so our event could be even versus odd outcomes. Let's try it: > m <- (2/5)*2^32 > m > 2^31 [1] FALSE > x <- sample(m, 1000000, replace = TRUE) > table(x %% 2) 0 1 399850 600150 Since m is an even number, the true proportions of evens and odds should be exactly 0.5. That's some pretty strong evidence of the bug in the generator. (Note that the ratio of the observed probabilities is about 1.5, so I may not be the first person to have done this.) I'm still not...
2018 Sep 19
2
Bias in R's random integers?
...> > Let's try it: > > > > > m <- (2/5)*2^32 > > > m > 2^31 > > [1] FALSE > > > x <- sample(m, 1000000, replace = TRUE) > > > table(x %% 2) > > > > 0 1 > > 399850 600150 > > > > Since m is an even number, the true proportions of evens and odds > > should > > be exactly 0.5. That's some pretty strong evidence of the bug in the > > generator. (Note that the ratio of the observed probabilities is > about > >...
2018 Sep 19
2
Bias in R's random integers?
.... >> >> ??? Let's try it: >> >> ???? ?> m <- (2/5)*2^32 >> ???? ?> m > 2^31 >> ??? [1] FALSE >> ???? ?> x <- sample(m, 1000000, replace = TRUE) >> ???? ?> table(x %% 2) >> >> ???? ? ? ? 0? ? ? 1 >> ??? 399850 600150 >> >> ??? Since m is an even number, the true proportions of evens and odds >> ??? should >> ??? be exactly 0.5.? That's some pretty strong evidence of the bug in the >> ??? generator.? (Note that the ratio of the observed probabilities is >> about >> ?...
2018 Sep 19
0
Bias in R's random integers?
...ould be even > versus odd outcomes. > > Let's try it: > > ?> m <- (2/5)*2^32 > ?> m > 2^31 > [1] FALSE > ?> x <- sample(m, 1000000, replace = TRUE) > ?> table(x %% 2) > > ? ? ? 0? ? ? 1 > 399850 600150 > > Since m is an even number, the true proportions of evens and odds > should > be exactly 0.5.? That's some pretty strong evidence of the bug in the > generator.? (Note that the ratio of the observed probabilities is about > 1.5, so I may not be the firs...
2018 Sep 19
0
Bias in R's random integers?
...; >> > >> > m <- (2/5)*2^32 > >> > m > 2^31 > >> [1] FALSE > >> > x <- sample(m, 1000000, replace = TRUE) > >> > table(x %% 2) > >> > >> 0 1 > >> 399850 600150 > >> > >> Since m is an even number, the true proportions of evens and odds > >> should > >> be exactly 0.5. That's some pretty strong evidence of the bug in > the > >> generator. (Note that the ratio of the observed probabilitie...
2018 Sep 19
0
Bias in R's random integers?
...t; > >? ? ? ?> m <- (2/5)*2^32 > >? ? ? ?> m > 2^31 > >? ? ?[1] FALSE > >? ? ? ?> x <- sample(m, 1000000, replace = TRUE) > >? ? ? ?> table(x %% 2) > > > >? ? ? ? ? ? 0? ? ? 1 > >? ? ?399850 600150 > > > >? ? ?Since m is an even number, the true proportions of evens and odds > >? ? ?should > >? ? ?be exactly 0.5.? That's some pretty strong evidence of the > bug in the > >? ? ?generator.? (Note that the ratio of the observed &gt...