Random numbers

Random numbers are values that have an equal chance of being selected from an interval of two numbers. They are very important because they help mimic real life applications. They are non deterministic in nature thus making it difficult to predict exact values based on the past and present values. This randomness ensures that the final value selected is unbiased and is consistent with respect to the selection criteria.

Case Considered

Assume you want to randomly locate several farm plots using GPS coordinates. These farm plots should compose  random samples for estimating farm yields. Manually guessing the location of the farms would lead to inconsistent selection of the longitudes and latitudes. Ms. Excel RANDBETWEEN function offers the capability of generating random numbers between a given range. the syntax is =RANDBETWEEN (bottom, top) where bottom is the lower bound and top is the upper bound.

Ms. Excel Procedure

  1. First label the columns for longitudes and latitude.

2. In cell A2 enter the following formula =RANDBETWEEN(-35, -28) and cell B2 enter =RANDBETWEEN( -300, -250)

3. Using the handle fill to populate the GPRS coordinates.

 

There you go. However, RANDBETWEEN is a volatile Excel function that keeps on changing every time the worksheet is refreshed. It implies that the values of longitude and latitude keep on changing every time. This will make you lose track of the values already generated. To overcome this challenge, you need to move these values to different columns. Paste special comes handy in achieving this.

4. First highlight the whole data – select any cell in the data range (ctrl + A) then copy the data (Ctrl + C)

5. Navigate to cell D1, right click then select paste special.

6.Under the paste option select values then click ok.

You now have the non-volatile GPRS coordinates in range D1:E11 for the farm plots to estimate the farm yield. This saves your time for generating the latitude and longitudes of the farm thus increase your workplace productivity. This can be extended to other scenarios where you want to get samples from a population.

For this and more,sign up to our upcoming Advanced Excel Training: <See Details>

It does not take long to get left behind

Stay relevant | Be informed | Sign up now and receive the latest tips, updates and industry insights...

You have Successfully Subscribed!

%d bloggers like this: