
- MS Excel Basics
- Excel - Home
- Excel - Getting Started
- Excel - Explore Window
- Excel - Backstage
- Excel - Entering Values
- Excel - Move Around
- Excel - Save Workbook
- Excel - Create Worksheet
- Excel - Copy Worksheet
- Excel - Hiding Worksheet
- Excel - Delete Worksheet
- Excel - Close Workbook
- Excel - Open Workbook
- Excel - Context Help
- Editing Worksheet
- Excel - Insert Data
- Excel - Select Data
- Excel - Delete Data
- Excel - Move Data
- Excel - Rows & Columns
- Excel - Copy & Paste
- Excel - Find & Replace
- Excel - Spell Check
- Excel - Zoom In-Out
- Excel - Special Symbols
- Excel - Insert Comments
- Excel - Add Text Box
- Excel - Undo Changes
- Formatting Cells
- Excel - Setting Cell Type
- Excel - Setting Fonts
- Excel - Text Decoration
- Excel - Rotate Cells
- Excel - Setting Colors
- Excel - Text Alignments
- Excel - Merge & Wrap
- Excel - Borders and Shades
- Excel - Apply Formatting
- Formatting Worksheets
- Excel - Sheet Options
- Excel - Adjust Margins
- Excel - Page Orientation
- Excel - Header and Footer
- Excel - Insert Page Breaks
- Excel - Set Background
- Excel - Freeze Panes
- Excel - Conditional Format
- Working with Formula
- Excel - Creating Formulas
- Excel - Copying Formulas
- Excel - Formula Reference
- Excel - Using Functions
- Excel - Builtin Functions
- Advanced Operations
- Excel - Data Filtering
- Excel - Data Sorting
- Excel - Using Ranges
- Excel - Data Validation
- Excel - Using Styles
- Excel - Using Themes
- Excel - Using Templates
- Excel - Using Macros
- Excel - Adding Graphics
- Excel - Cross Referencing
- Excel - Printing Worksheets
- Excel - Email Workbooks
- Excel- Translate Worksheet
- Excel - Workbook Security
- Excel - Data Tables
- Excel - Pivot Tables
- Excel - Simple Charts
- Excel - Pivot Charts
- Excel - Keyboard Shortcuts
- MS Excel Resources
- Excel - Quick Guide
- Excel - Useful Resources
- Excel - Discussion
Generate random numbers by giving certain mean and standard deviation in Excel
There may be times when you need to generate a series of random numbers based on specific mean and standard deviation for some scenarios.
Below are some guidelines that will help you.
Generate random numbers by given Mean and Standard Deviation
To solve this, you need to follow the below step-by-step process.
Step 1
To begin with, you need to enter your needed mean and standard deviation into two empty cells, in this case, I have selected A1 and A2 as shown in the below screenshot.
Step 2
Afterwards, in cell B3, type this formula =NORMINV(RAND(),$B$1,$B$2) and drag the handle to the desired range in order to fill the cell as shown in below screenshot.
In the formula =NORMINV(RAND(),$B$1,$B$2), $B1 indicates the mean, $B$2 indicates the standard deviation.
Step 3
In the cell D1 and D2 you have to calculate the mean and standard deviation of the random number you have entered in step 2. In the cell D1, calculate the mean by entering the formula =AVERAGE(B3:B8), press Enter key. In D2, calculate the standard deviation for that enter the formula =STDEV.P(B3:B8) and press Enter key as shown in the below screenshot.
Below screenshot with the formula to calculate standard deviation of B3:B8.
Here B3:B8 is the range you selected the numbers in step 2.
Step 4
You can generate the real random numbers that you want. In the cell D3, enter the formula =$B$1+(B3-$D$1)*$B$2/$D$2 and drag till B8 as in the above we have considered till B8. Below is the screenshot.
Here B1 indicates the mean you need B2 indicates the standard deviation you need. B3 indicates the first cell of your first random numbers, D1 indicated the mean of the first random number. D2 is the standard deviation of first random numbers.
Step 5
You can check the mean and standard deviation of the final random number series. In the cell D9, enter the formula =AVERAGE(D3:D8) and press enter key and then in the cell D10 enter the formula =STDEV.P(D3:D8) and press enter key as shown below −
Here D3 to D8 is the range of the last random number series.
Left side of the data in the Excel sheet is First random numbers and right side of the data is Final random numbers as shown below.
- Related Articles
- Plot mean and standard deviation in Matplotlib
- Excel random data: generate random numbers, texts, dates, times in Excel
- How to generate standard normal random numbers in R?
- How to calculate standard deviation in Excel?
- How to create boxplot using mean and standard deviation in R?
- How to find mean and standard deviation from frequency table in R?
- PyTorch – How to normalize an image with mean and standard deviation?
- Variance and Standard Deviation
- How to compute the mean and standard deviation of a tensor in PyTorch?
- Generate random characters and numbers in JavaScript?
- Generate random numbers in Arduino
- Generate pseudo-random numbers in Python
- Generate Random Integer Numbers in Java
- How to create a line chart with mean and standard deviation using ggplot2 in R?
- Generate random numbers using C++11 random library
