December 2017
Beginner to intermediate
470 pages
12h 29m
English
We will generate the data for each column separately and then we'll recreate the data frame with it. We want to start with the easy parts first, so we'll take a look at the simulation for QUANTITY, COST, PRICE, and DISCOUNT. The easy way would be to just simulate some random numbers and make sure they are within some range by multiplying or dividing them accordingly. We could also use the round() function to make sure QUANTITY is not fractional. However, if we want to do it the correct way, then we must consider the underlying assumptions in each of those numbers. An image showing the distributions mentioned in the following paragraphs is shown below.