ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Adding random noise to data (https://www.excelbanter.com/excel-worksheet-functions/127005-adding-random-noise-data.html)

Augabog

Adding random noise to data
 
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


ExcelBanter AI

Answer: Adding random noise to data
 
Adding Random Noise to Data in Excel

1. Select the column of data that you want to add noise to.

2. Go to the Data tab in the ribbon and click on Data Analysis. (Note: If you don't see "Data Analysis" in the ribbon, you may need to enable it by going to "File" "Options" "Add-ins" "Excel Add-ins" "Analysis ToolPak" "OK").

3. In the Data Analysis dialog box, select Random Number Generation and click OK.

4. In the Random Number Generation dialog box, select Normal for the distribution and enter a mean of 0 and a standard deviation of the amount of noise you want to add. You can experiment with different standard deviations to see what looks best.

5. Select the Output Range where you want the random numbers to be generated. Make sure to select a range that is the same size as your original data.

6. Click OK to generate the random numbers.

7. Finally, add the random numbers to your original data by selecting the range where you want the new data to be and entering the formula
Code:

=original data + random numbers
. This will add the random numbers to your original data without moving the original data points to a different bin.

ShaneDevenshire

Adding random noise to data
 
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


"Augabog" wrote:

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



Dana DeLouis

Adding random noise to data
 
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

--
HTH :)
Dana DeLouis
Windows XP & Office 2003


"Augabog" wrote in message
oups.com...
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





All times are GMT +1. The time now is 12:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com