Question: answer code please Part II - Using Monte Carlo for a business application Bien aalma The cueninakon ia jast coibhint huen the tarmes aifaikle wes

Part II - Using Monte Carlo for a business application Bien aalma The cueninakon ia jast coibhint huen the tarmes aifaikle wes ues here in atin fate r+sin cecple are the serre tie the comity yeir Monte Carlo appromch Inses and then aebesoe the tors cempritichere. Aatier biefinent anmatamen 1. impert itraczs obel ien ient aver all ibrermins Monte Carlo approach To use Monte Carlo we need to know what the random inputs wit be. In the cane, it is simply the amount of actual sales each person might make. So we have 5 sales reps so ne need 5 random numbers. Once we have a random saies anourt lar each rep we ise the sele so compete the commissian rate and ewen compute the total commision tor each rep. We do tha many, many times and then average the total comrissions. Now whien we estimate the sales for say rep 1 farpet o $150,000 we mignt now wart to pick a tandom integer between 0 and 150,000. Howereche sales mps are goed at whet they de fused on their historyi so they probably wan' have very few sibes. So for simplicty inr a ancume that no one sels mere than 110 pereert of their target value. There is a more soptinticated any to do thit by assuming a particular distribution (biven by a pot but we will just tske a unitsm aperosch to generating the random mumbers. Tis means that for each rep we need to generate a random number between: - sales rep I 1 (target $150,000) \$112,s00 no $165,000 - sales rep = 2 (tanger $200,000) is 150,000 no $120,000 - sales rep \& 3 (targer 596,000 is 71.250 to $104.500 - sales rep i 4 (target $350,000) isa62.soo to $385,000 - sales rep = 5 (target $425,000)$3318,750 to $467,500 These ranges ave calculatod by taving 85 times target sales to 1.1 times tropet anies. We will have Pyehon generate tomse tor un but for reference 1 added them here. First, wn wrbe a esdo to nin a single simulation and then we can go back and modify it to run many simulatons and muwage the random number between 0 and 1 map this number into the desired inteval (see above) desermine the commission rate using conditions calculate the commission for this rop and add t to the total commisaion In order to wite a code which probiets the total anourt of cemmiation, pertom me fallowing asept. 1. Import lbraies and set seed 2. Input fxed values for this probien target soles and number of saies nopresertabves low and thigh percentages for target sales 3. Wite code to generate a random amounto of sales for esch rep and check wth above values to make sure they ace in the eserect range: we a for bep; nound answer to newven cere 4. Write code to pertorm a single simulation and pive the total commistion 5. Add a loop to run many simulations and giee the expected vatue. i.e. the average commission over al simulations [19]: I. Inport randea and set seed [2211 -2. Inpot target malet and nunber of wied pereoos tor apooning gearn it and high percuntages of sales for gener oeing rando numbers the carrees rabge tha a for loops reund andiver to neareut ceet 1417 4 4. Ndd to your loop la: 1 to deteraine the enenianle fer eset top ( iyou need an if-mlif-elee construet te determine fate)2 leep a renting : ab of the an of a di comeraione reund ali dollat ancontil to heareat cent [5]. -5. Add a loop areuned your eode in / i top do te, 000 simitationa weh no rimove
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
