Generating uniform random numbers
Many data science tasks involve running simulations. One important step in a simulation is the generation of random numbers. There are two functions available for generating numbers from a uniform distribution. In a continuous uniform distribution, any number within a range is likely to be generated. In a discrete uniform distribution, any one of a finite number of values is equally likely to be generated.
RAND()generates a random number between 0 and 1 from a continuous uniform distribution. It takes no arguments.RANDBETWEEN()lets you specify the lower and upper bounds, and generates a random integer (no fractional part); that is, it samples from a discrete uniform distribution.
Bài tập này là một phần của khóa học
Google Sheets nâng cao
Hướng dẫn bài tập
- In column
H, rows 2 to 12, generate uniform random numbers between 0 and 1. - In column
I, generate uniform random numbers between the lower size estimate and the upper size estimate.
Bài tập tương tác thực hành
Biến lý thuyết thành hành động với một trong các bài tập tương tác của chúng tôi
Bắt đầu bài tập