# Calc: using Randbetween [closed]

I want random numbers between minus 3 and plus 3. Is there any difference between:

=RANDBETWEEN(-3,3)

or

=RANDBETWEEN(0,6)-3

I've been using the latter but it seems like I'm getting more positives than negatives, in fact twice as many positives. That could be just chance but I've run 720 trials so the sample seems large enough.

Thanks for any help.

Mike S.

edit retag reopen merge delete

### Closed for the following reason the question is answered, right answer was accepted by Alex Kemp close date 2020-09-05 17:54:09.339459

Sort by » oldest newest most voted

I can't find the differences that you mention, find attached a test file RandbetweenTest.ods, use hard recalc [Shit+Ctrl+F9] to recalculate updating Randbetween() values.

more

Thank you m.a.riosv, for taking the time to construct the spreadsheet comparing the two formulas. It's clear from the results that the two are identical in function and that my experience is just an outlier. Even now, running more trials, I'm seeing results more in line with what would be predicted.

Much appreciated!

Mike S.

( 2016-05-29 04:35:40 +0100 )edit

( 2016-05-29 12:27:59 +0100 )edit

@m.a.riosv: apart from the fact that your example is also good with errors to prove similarity between the formulas in question? ...
would you mind updating your sample in a way that it doesn't give the impression that both random formulas are erroneous? ... your totals and subtotals in B29:U32 and X29:AQ32 reference to questionable areas, and thus the results seem to be mostly positive (V32 vs. V30 and AR32 vs. AR30), which they are not really ...
(if was 'on the way' filing a harsh report about insufficient rand routines in calc, spotted the fail in the last second ... ufff)
with adapted formulas i still see a slight overweight of ~2:1 in favor of positive results in V32 and AR32 (30 tests each with full-recalc), but that would be another issue, it's definitely better than 'black always wins' with your formulas,

( 2020-10-26 07:57:21 +0100 )edit

@newbie-02, you know how to do it, please redo it yourself, so you will be sure it fits your requirements.

( 2020-10-26 08:25:03 +0100 )edit