Monte Carlo Simulation

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'>

This is a premium problem, to view more details of this problem please sign up for MLPro Premium. MLPro premium offers access to actual machine learning and data science interview questions and coding challenges commonly asked at tech companies all over the world

MLPro Premium also allows you to access all our high quality MCQs which are not available on the free tier.

Not able to solve a problem? MLPro premium brings you access to solutions for all problems available on MLPro

Get access to Premium only exclusive educational content available to only Premium users.

Have an issue, the MLPro support team is available 24X7 to Premium users.

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

Log in to post a comment


Input Test Case

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