I am a beginner and try to perform a bootstrap in R. It would be nice if somebody could help me with the following situation.

I have defined prices and I want to randomly generate quantities (given a constraint, e.g. smaller than 100000) in order to calculate the cost ($cost = price*quantity$).

By randomly generating volumes, I want to obtain a distribution of the total cost (sum of the costs of each bootstrap).

enter image description here

What is the appropriate code in R to do it?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.