0

Monte Carlo Simulation

Unsolved
Prob. and Stats

Difficulty: 2 | Problem written by tanveer
Monte Carlo simulation is used to make an estimate about a parameter when there is uncertainty involved in it.

The process in simple terms involves the calculations by considering all the possible outcomes of an input whose value remains uncertain otherwise. This problem is designed to make the process of Monte Carlo Simulation clear in a simple possible manner.

Given the possible demand values for a company in a list, what is the expected annual profit that the company may earn?

Annual Profit = Annual demand * (Price/unit - Cost/Unit)

Here, the demand is presented as a list of values. But in practical scenarios, the uncertain input (like demand) is taken from a probability distribution e.g. a normal distribution

 

 

Sample Input:
<class 'list'>
demand: [100, 120, 130, 115, 150, 132]

Expected Output:
<class 'float'>
2490.0

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Recusandae quisquam dolorum ex doloremque quam rem necessitatibus nisi unde laboriosam, impedit perferendis debitis a corporis quaerat consequatur sunt quos, doloremque quod accusantium, nemo delectus libero quia. Consequatur corrupti alias perspiciatis quas provident non dolores quod atque, porro quos nisi in recusandae, sunt neque veritatis obcaecati tempore iusto facilis rem iste, ea ipsa odit sunt iste, assumenda debitis quia obcaecati non reprehenderit omnis consequuntur.

Placeat tempore voluptatibus, fugiat eveniet aspernatur laborum voluptatibus reiciendis nam cupiditate amet velit sunt provident, doloremque odio rerum fuga porro, recusandae numquam incidunt accusamus? Quo doloremque repellat et placeat qui consequuntur distinctio laudantium ducimus repellendus cupiditate, magnam alias commodi quod, eius quos fugit laboriosam repudiandae sit atque exercitationem quibusdam, molestias ducimus accusantium delectus expedita voluptatem provident asperiores, architecto reiciendis perferendis modi et saepe rem explicabo?

Deserunt aperiam quia non ipsa odio illum consequuntur ullam explicabo, debitis nihil vel laborum facere nulla?

This is a premium feature.
To access this and other such features, click on upgrade below.

Ready.

Input Test Case

Please enter only one test case at a time
numpy has been already imported as np (import numpy as np)