Đề Xuất 3/2023 # Random Number Generator Excel In Functions And Data Analysis # Top 3 Like | Beiqthatgioi.com

Đề Xuất 3/2023 # Random Number Generator Excel In Functions And Data Analysis # Top 3 Like

Cập nhật nội dung chi tiết về Random Number Generator Excel In Functions And Data Analysis mới nhất trên website Beiqthatgioi.com. Hy vọng thông tin trong bài viết sẽ đáp ứng được nhu cầu ngoài mong đợi của bạn, chúng tôi sẽ làm việc thường xuyên để cập nhật nội dung mới nhằm giúp bạn nhận được thông tin nhanh chóng và chính xác nhất.

We have got a sequence of numbers consisting of virtually independent elements that obey a certain counting distribution. As a rule, it’s a uniform distribution.

There are different ways to generate random numbers in Excel. Let’s view the best of them.

Random Number Function In Excel

The function RAND() returns a random real number of a uniform distribution. It will be less than 1, and greater than or equal to 0.

The function RANDBETWEEN returns a random integer number.

Let’s view some examples of their practical application.

Selection of random numbers using RAND

This function doesn’t require arguments.

For example, to generate a random real number in the range 1 to 10, use the following formula: =RAND()*(5-1)+1.

The returned random number is distributed uniformly on the interval [1,10].

Each time the sheet is calculated or the value is changed in any cell within the sheet, a new random number is returned. If you want to save the generated set of numbers, replace the formula with its value.

Select the formula in the formula bar.

Press F9. Then Enter.

Let us check the uniformity of distribution of the random numbers from the first selection using a distribution bar chart.

We round the values that the function =RAND() returns. To do this, we use the function: =ROUND().And fill this formula with the big range: A2:A201.

Form the ranges to contain the values (bin). The first such range is 0-0.1. For the subsequent ones use the formula =B2+$B$2.

Determine the frequency of random numbers in range A2:A201. In cell C2 use the array formula: After input formula, select range C2:C11, press key F2 and press hot keys: CTRL+SHIFT+ENTER. We will execute the formula in the array Excel.

Form the ranges with the use of the concatenation character (=”[0,0-“&C2&”]”).

Build a distribution bar chart for the 200 values obtained with the use of the RAND() function.

The vertical values represent the frequency. The horizontal ones represent the ranges.


The syntax of the RANDBETWEEN function is as follows: (lower limit; upper limit). The first argument must be less than the second. Otherwise, the function will return an error. It is assumed that the limits are integers. The formula discards the fractional part.

An example of the function’s application:

Random numbers with an accuracy of 0.1 and 0.01:

How To Create Random Number Generator In Excel

Let’s create a random number generator that generates values from a certain range. Use a formula of the following form:

The formula randomly selects any of the numbers in the range A1:A10.

Let’s create a random number generator in the range 0-100, with a step of 10.

It’s required to select 2 random text values from the list. Using the RAND() function, let’s match the text values in the range A1:A7 with random numbers.

Use the =INDEX function to select two random text values from the initial list.

To select one random value from the list, apply the following formula:

Generator Of Standard Distribution Random Numbers

The RAND and RANDBETWEEN functions return random numbers with a single distribution. There’s an equal probability for any value to fall into the lower or upper limit of the requested range. The variation of the target value turns out to be huge.

A standard distribution means most of the generated numbers are close to the target number. Let’s adjust the RANDBETWEEN formula and create an array of data with a standard distribution.

The prime cost of the X product is $100. The entire batch is subject to a standard distribution. The random variable also obeys a standard probability distribution.

Under such conditions, the average value of the range is $100. Let’s generate an array and build a chart that obeys a standard distribution with a standard deviation of $1.5.

Use the function:

Excel calculates the values in the range of probabilities. As the probability of manufacturing a product with a prime cost of $100 is maximal, the formula returns values that are close to 100 more often than other values.

Let’s proceed to building the chart. First of all, you need to create a table containing the categories. To do this, split the array into periods:

Determine the minimum and maximum values in the range using the =MIN(A2:102) and =MAX(A2:102) functions.

Indicate the value of each period or step. In our example, it’s equal to 1.

The number of categories is 10.

The lower limit of the table containing the categories is the nearest multiple number rounded down. Enter the formula =ROUNDDOWN(C2,0) into the E1 cell.

In the E2 cell and below, the formula will look as follows: That is, each subsequent value is increased by the specified step size.

Let’s calculate the number of variables in the given interval. Use the function: The formula will look as follows:

Based on the obtained data, we can build a chart with a normal distribution. The value axis represents the number of variables in the interval; the category axis represents the periods.

A chart with a normal distribution is built. As it should be, its shape resembles a bell.

There’s a much simpler way to do the same with the help of the “Data Analysis” package. Select “Random Number Generation”.

Fill in the generation parameters. Set the distribution as “Normal”.

The obtained result is as follows:

Download random number generators in Excel

An Excel chart with a standard distribution has been built.

How To Generate Random Numbers In Excel (A Step

There may be cases when you need to generate random numbers in Excel.

For example, to select random winners from a list or to get a random list of numbers for data analysis or to create random groups of students in class.

In this tutorial, you will learn how to generate random numbers in Excel (with and without repetitions).

Generate Random Numbers in Excel

There are two worksheet functions that are meant to generate random numbers in Excel: RAND and RANDBETWEEN.

RANDBETWEEN function would give you the random numbers, but there is a high possibility of repeats in the result.

RAND function is more likely to give you a result without repetitions. However, it only gives random numbers between 0 and 1. It can be used with RANK to generate unique random numbers in Excel (as shown later in this tutorial).

Generate Random Numbers using RANDBETWEEN function in Excel

Excel RANDBETWEEN function generates a set of integer random numbers between the two specified numbers.

RANDBETWEEN function takes two arguments – the Bottom value and the top value. It will give you an integer number between the two specified numbers only.

For example, suppose I want to generate 10 random numbers between 1 and 100.

Here are the steps to generate random numbers using RANDBETWEEN:

Select the cell in which you want to get the random numbers.

In the active cell, enter =RANDBETWEEN(1,100).

Hold the Control key and Press Enter.

This will instantly give me 10 random numbers in the selected cells.

While RANDBETWEEN makes it easy to get integers between the specified numbers, there is a high chance of repetition in the result.

For example, when I use the RANDBETWEEN function to get 10 random numbers and use the formula =RANDBETWEEN(1,10), it gives me a couple of duplicates.

If you’re OK with duplicates, RANDBETWEEN is the easiest way to generate random numbers in Excel.

Note that RANDBETWEEN is a volatile function and recalculates every time there is a change in the worksheet. To avoid getting the random numbers recalculate, again and again, convert the result of the formula to values.

Generate Unique Random Numbers using RAND and RANK function in Excel

I tested the RAND function multiple times and didn’t find duplicate values. But as a caution, I recommend you check for duplicate values when you use this function.

Suppose I want to generate 10 random numbers in Excel (without repeats).

Here are the steps to generate random numbers in Excel without repetition:

Select the cells in which you want to get the random numbers.

In the active cell, enter =RAND()

Hold the Control key and Press Enter.

Select all the cell (where you have the result of the RAND function) and convert it to values.

In the adjacent column, use the following formula: =RANK.EQ(A2,$A$2:$A$11)

Now you can use the values in column B as the random numbers.

Note: RAND is a volatile formula and would recalculate every time there is any change in the worksheet. Make sure you have converted all the RAND function results to values.

Caution: While I checked and didn’t find repetitions in the result of the RAND function, I still recommend you check once you have generated these numbers. You can use Conditional Formatting to highlight duplicates or use the Remove Duplicate option to get rid of it.

You May Also Like the Following Excel Tutorials:

Những Điều Cần Biết Về Công Cụ Data Analysis

Vai trò của chức năng Data Analysis trong Excel

Với một số lượng dữ liệu lớn, việc thực hiện phân tích thống kê rất phức tạp, mất thời gian, công cụ Data Analysis của Excel sẽ hỗ trợ bạn công việc này.

Các kỹ thuật phân tích thống kê có thể thực hiện trong Data Analysis:

Đây là những kỹ thuật tính toán thống kê rất phức tạp và bạn phải mất rất nhiều thời gian thực hiện nếu không có công cụ Data Analysis.

Vậy kích hoạt chức năng này như thế nào?

Kích hoạt Data Analysis trong Excel

Data Analysis đã từng được tính hợp trong Excel 2003. Tuy nhiên, các phiên bản Excel mới không tích hợp công cụ này mà ẩn trong phần Add-in.

Làm thế nào để kích hoạt chức năng này? Chỉ với 3 bước cực đơn giản:

Bước 3: Sau khi bấm “Go” thì sẽ hiện ra 1 giao diện cửa sổ “Add-Ins”. Ban chọn “Analysis ToolPak” rồi bấm “Ok”

Cách thực hiện hồi quy với công cụ Data Analysis trong Excel

Chúng ta có số liệu đơn giản như hình. Đề bài: Ảnh hưởng của tuổi tác đối và thu nhập đến chi tiêu.

Chọn Data Analysis, trong cửa sổ hiện ra chọn Regression rồi chọn OK

Làm như trong hình, chúng ta quan tâm đến các thông số:

Kết quả ta được:

Xét tương quan giữa các biến

Input Range: chọn vùng chứa các biến độc lập, bao gồm tên biến

Output Range: ô xuất kết quả

Kết quả tương quan giữa 2 biến như sau:

Tương quan giữa X và Z = 0.14 nhỏ hơn căn bậc 2 của ( R bình phương của mô hình), có thể bỏ qua đa cộng tuyến

Các hệ số hồi quy gắn liền với biến X và Z đều có ý nghĩa( vì các giá trị P0value tương ứng với các hệ số hồi quy này đều nhỏ hơn alpha(a)

Mô hình có ý nghĩa vị trí thống kê của kiểm định F nhỏ hơn alpha

Kết luận: Cả thu nhập và độ tuổi đều có tác động lên chi tiêu, tuy nhiên tác động của thu nhập lên chi tiêu lớn hơn

Cách sử dụng và hiểu về từng kỹ thuật phân tích thống kê trong Data Analysis của Excel đòi hỏi bạn cần có kiến thức chuyên môn và kỹ năng thực hành tốt.

Nếu bạn muốn sử dụng thành thạo các công cụ phân tích dữ liệu – thống kê của Excel để áp dụng vào công việc của mình, bạn có thể tham khảo khóa học Phân tích dữ liệu và thấu hiểu nhân sự – kinh doanh trong doanh nghiệp do trung tâm tin học MOS tổ chức.

Trong khóa học này, bạn được cung cấp kiến thức công cụ xây dựng dữ liệu, làm việc với dữ liệu, thấu hiệu dữ liệu và phân tích các bài toán thực tế của doanh nghiệp. Khóa học cực kỳ hữu ích cho các chủ doanh nghiệp, trưởng phòng, nhân viên nhân sự – kinh doanh.

Email: tinhocmos.edu.vn@gmail.com

Hotline: 0914 444 343

How To Randomize A List In Excel: Sort Randomly Cells, Rows And Columns

The tutorial will teach you two quick ways to randomize in Excel: perform random sort with formulas and shuffle data by using a special tool.

Microsoft Excel provides a handful of different sorting options including ascending or descending order, by color or icon, as well as custom sort. However, it lacks one important feature – random sort. This functionality would come in handy in situations when you need to randomize data, say, for an unbiased assigning of tasks, allocation of shifts, or picking a lottery winner. This tutorial will teach you a couple of easy ways to do random sort in Excel.

How to randomize a list in Excel with a formula

Although there is no native function to perform random sort in Excel, there is a function to generate random numbers (Excel RAND function) and we are going to use it.

Assuming you have a list of names in column A, please follow these steps to randomize your list:

Insert a new column next to the list of names you want to randomize. If your dataset consists of a single column, skip this step.

In the first cell of the inserted column, enter the RAND formula: =RAND()

Either way, Excel automatically expands the selection and sorts the names in column A as well:

Tips & notes:

Excel RAND is a volatile function, meaning that new random numbers are generated every time the worksheet is recalculated. So, if you are not happy with how your list has been randomized, keep hitting the sort button until you get the desired result.

To prevent the random numbers from recalculating with every change you make to the worksheet, copy the random numbers, and then paste them as values by using the Paste Special feature. Or, simply delete the column with the RAND formula if you don’t need it any longer.

The same approach can be used to randomize multiple columns. To have it done, place two or more columns side by side so that the columns are contiguous, and then perform the above steps.

How to shuffle data in Excel with Ultimate Suite

If you don’t have time to fiddle with formulas, use the Shuffle Cells tool included in our Ultimate Suite for Excel to do a random sort faster.

The Shuffle pane will appear on the left side of your workbook. You select the range where you want to shuffle data, and then choose one of the following options:

Cells in each row – shuffle cells in each row individually.

Cells in each column – randomly sort cells in each column.

Entire rows – shuffle rows in the selected range.

Entire columns – randomize the order of columns in the range.

All cells in the range – randomize all cells in the selected range.

In this example, we need to shuffle cells in column A, so we go with the third option:

And voilà, our list of names is randomized in no time:

If you are curious to try this and explore a lot more fascinating features included with Ultimate Suite for Excel, you are welcome to download a 14-day trial version.

You may also be interested in

Bạn đang đọc nội dung bài viết Random Number Generator Excel In Functions And Data Analysis trên website Beiqthatgioi.com. Hy vọng một phần nào đó những thông tin mà chúng tôi đã cung cấp là rất hữu ích với bạn. Nếu nội dung bài viết hay, ý nghĩa bạn hãy chia sẻ với bạn bè của mình và luôn theo dõi, ủng hộ chúng tôi để cập nhật những thông tin mới nhất. Chúc bạn một ngày tốt lành!