Adding random noise to data

  • Thread starter Thread starter Augabog
  • Start date Start date
A

Augabog

I am doing a scatterplot where a bunch of data points fall into the
exact same values. I would like to spread them out a little bit w/o
falling into the next bin, just to show that they are all there. Is
there any way in Excel to add some random noise to my data so that I
can stochastically automate this process?

Thanks,

Hosley
 
Hi,

You could consider using the RAND() function which generates random numbers
between 0 and 1. If these are too large you can multiply them by a number
less than one such as 0.5: =0.5*RAND() which would generate random numbers
between 0 and .5. Create a range identical in size and shape to your data
range with these formulas. Select all the formulas and choose Copy. Select
the data range and choose Edit, Paste Special, and turn on both Values and
Add. Then click OK.

You can also generate random number by using the =RANDBETWEEN function or
the Analysis ToolPak's Data Analysis, Random Number Generation tool, or by
using VBA.

There are a number of books on handling noise with Excel. Check out books
like Excel For Scientists and Engineers - there are a number of these at
Amazon.

Cheers,
Shane Devenshire
 
Here's a function that I use.
Default is +- 0.1

Function Noise(Optional P = 0.1) As Double
'// P is a Peak value, such as +- 0.1
Noise = (Rnd() - 0.5) * P
End Function
 
Back
Top