Develop a simulation for the following problem The managemen
Solution
a) and b)
import numpy as np #importing numpy to use normal and uniform distribution functions
 mu = 1200
 sigma = 300
 number_of_simulations = 1000
 simulations = np.random.normal(mu, sigma, number_of_simulations) #creating 1000 simulations for #number of units sold
 negative_profits = 0 #initialising the number of losses
 profit_from_all_simulations = 0
 initial_cost = 30000 #fixed setup cost
 for simulation in simulations: #single simulation
     simulation = int(simulation)
     product_costs = np.random.uniform(16,24,simulation) #uniform distribution of cost of a unit
     total_production_cost = sum(product_costs) #summing the total production cost
     profit = 50*simulation - total_production_cost - initial_cost #calculating profit
     profit_from_all_simulations += profit
     if profit<0:
         negative_profits += 1
print \"Mean Profit:\", profit*1.0/number_of_simulations
 print \"Probability of loss:\", negative_profits*1.0/number_of_simulations
 c) The product should not be introduced since the mean profit is almost negligible and the probability of loss is high (>25%).

