EGR 1400 PS 4 Simulation Notes Part 2

PART C

  • Obtain input values from the user for numIteration, numBins, nMin, nMax, PvMean, PvStdev
  • Calculate PvMin and PvMax (use plus and minus three standard deviations)
  • Calculate PtMin and PtMax
  • Declare an array to represent the Bins and a variable to accumulate total profit
  • Loop numIteration times

o Obtain random values for n and Pv o Calculate PT  o Obtain the bin index and make sure it is within the proper range o Increment the count of the proper bin and add PT  to the total profit accumulator

  • Determine the increment for bin labeling in the MS Chart
  • Use MS Chart to display the bin totals
  • Calculate and display the average profit   
EGR 1400 PS 4 Simulation Notes Part 2 img1 EGR 1400 PS 4 Simulation Notes Part 2 img2 EGR 1400 PS 4 Simulation Notes Part 2 img3

PART D

You will need to amend the algorithm from Part C to account for the choice of distribution type (Normal or Uniform) for both PV and n. Care will need to be taken to make sure that PVMin, PVMax, nMin, and nMax  are computed correctly and that the proper “Random” methods are used in the calculation of PT .

EGR 1400 PS 4 Simulation Notes Part 2 img4 EGR 1400 PS 4 Simulation Notes Part 2 img5 EGR 1400 PS 4 Simulation Notes Part 2 img6
Want latest solution of this assignment