” 辅导ELEC273课程程序、 写作MATLAB编程Experiment 22 – Monte Carlo SimulationDepartment of Electrical Engineering ElectronicsSeptember 2019, Ver. 3.4Experiment specificationsModule(s) ELEC224 / ELEC273Experiment code 22Semester 1Level 2Lab location PC labs, third floor/fourth floor, check the timetableWork In groupsTimetabled time 7 hrsSubject(s) of Relevance Probability and StatisticsAssessment method Formal report. One lab report per person following the guidelines set out inthe How to write a good lab report handout (available in VITAL).Submission deadline On Friday midnight, 7 days after the date of the laboratory, submitted inMicrosoft Word or PDF format via VITAL only.Important: Marking of all coursework is anonymous. Do not includeyour name, student ID number, group number, email or any other personalinformation in your report or in the name of the file submitted via VITAL.A penalty will be applied to submissions that do not meet this requirement.1Instructions: Read this script carefully before attempting the experiment. Review MATLAB before attempting the experiment and use it for all therequired coding and graphs. Check VITAL for MATLAB resources (LearningResourcesSupporting Material folder). See online material and resources aswell. Keep a record of all code, graphs and results. The code must be well-structured and organised (to get a better mark). Usethe concept of Functions for better code re-usability and managment. The code must be provided for every requirement with appropriate explanation.Use MATLAB commenting (%) to emphasise on and explain relevantcode lines. For every requirement, the code must run and screenshots of the results mustbe provided. Any change to the code needs to be reinserted every time. Be sure to reference any resource you have used in writing your report. Use your time wisely. Finish as many tasks as you can during the lab (withdemonstrators support). If you cant finish all tasks today, you can completeyour work at home later on. If you have any feedback on your laboratory experience today, please write itdown on the last Page of this script.1 Learning outcomesThe purpose of this experiment is to develop, explore and test Monte Carlo techniques insimulating and finding solutions to real-life random processes. MATLAB will be used as thetool to do the tests of the experiment, but it is not the main learning outcome (i.e. theexperiment is not about MATLAB).2 IntroductionThe Monte Carlo method is a numerical method of solving mathematical problems by the simulationof random variables. The name Monte Carlo was applied to a class of mathematicalmethods first by scientists working on the development of nuclear weapons in Los Alamos inthe 1940s. The essence of the method is the invention of games of chance whose behaviour andoutcome can be used to study some interesting phenomena. While there is no essential link tocomputers, the effectiveness of numerical or simulated gambling as a serious scientific pursuitis enormously enhanced by the availability of modern digital computers [1].The term Monte Carlo refers to procedures in which quantities of interest are approximatedby generating many random realisations of a stochastic process and averaging them in someway. In statistics, the quantities of interest are the distributions of estimators and test statistics,the size of a test statistic under the null hypothesis, or the power of a test statistic undersome specified alternative hypothesis [2].2How can we use Monte Carlo techniques to find the sampling distribution of an estimator? Inthe real world, we usually observe just one sample of a certain size N, which will give us justone estimate. The Monte Carlo experiment is a lab situation, where we replicate the real worldstudy many (R) times. Every time, we draw a different sample of size N from the originalpopulation. Thus, We can calculate the estimate many times and any estimate will be a bitdifferent. The empirical distribution of these many estimates approximates the true of theestimator. A Monte Carlo experiment involves the following steps [3]:(1) Draw a (pseudo) random sample of size N for the stochastic elements of the stochasticmodel from their Respective probability distribution functions.(2) Assume values for the parts of the model or draw them from their respective distributionfunction.(3) Calculate the parts of the statistical model.(4) Calculate the value (e.g. the estimate) you are interested in.(5) Replicate step (1) to (4) R times.(6) Examine the empirical distribution of the R values.The Monte Carlo approach is relevant to different scientific disciplines and problems including(but not limited to) the following areas [4]: Physical sciences: computational physics, physical chemistry, quantum chromodynamics,statistical physics, molecular modelling, particle physics and galaxy modelling. Designs and visuals/Computer graphics: global illumination, photorealistic imagesof virtual 3D models, video games architecture and design, computer generated films andspecial effects in cinema. Finance and business/Operations research: evaluating investments in projects at abusiness unit, evaluating financial derivatives, construction of stochastic or probabilisticfinancial models and in enhancing the treatment of uncertainty in the calculation. Telecommunications: planning a wireless network, generating user patterns and theirstates, testing the Probability of losing information in a network whether it is below acertain threshold. Games: game playing related artificial intelligence theory.3 The Practical WorkPenalty kicks are a critical time of decision-making for both the goalkeeper and the penaltytaker in football matches. Given that, for most professional games, the average number of goalsscored is around 2.5, a penalty kick can have a major influence on the outcome of a match.Penalty kicks may reach speeds near 125 mph and is usually over within a quarter of a second.Thus, the goalkeeper must make a decision on how to stop the shot before the ball is struck.Statistics show that goalkeepers will most often jump to the left or right, hoping to guess correctlythe position to block the kick [5,6].Consider the situation of a football goal and a blindfolded person trying to shoot the ball fromthe penalty spot and score a goal. Lets assume that the goal has dimensions L and W asshown in Figure 2, and there is an imaginary circle that circumscribes the goal. Two cases willbe considered: first when there is no goalkeeper and second when there is a goalkeeper savingthe ball.3Figure 2: The goal arrangement.3.1 Part I: No Goalkeeper Tests (40 Marks)In this case, there is no Goalkeeper, and it is just the penalty taker against the goal. You needto model each shot by treating the co-ordinates of the ball in the goal plane as random variables(i.e. ignore the trajectory of the ball). Task-1. If a large number of shots is attempted, derive a numerical value for the fraction ofballs entering the goal to the total number of balls in the circular area. Assume the penaltytaker is blindfolded (i.e. the shots are uniformly distributed within the circle). [5 Marks] Task-2. Design and write a computer programme to find the probability of scoring bysimulating N random penalty shots and repeating this experiment R times and taking themean of the attempts. Let N and R be inputs to your code. Use a uniform randomnumber generator in the simulation. [8 Marks] Task-3. Produce an appropriate scatter plot illustrating your experiment for N = 1,000and R = 1, using red crosses to indicate score (i.e. balls on target) and blue circles toindicate miss (i.e. balls off target). Insert an appropriate legend. [4 Marks] Task-4. For R = 5, find the probability of scoring for N = 100, N = 1,000, N = 10,000and N = 100,000. Plot the probability against the value of N. Comment on the shape ofthe plot, making reference to the theoretical probability calculated in Task-1. Rememberto label the axes and to insert an appropriate caption in your report. [7 Marks] Task-5. For N = 1,000, find the probability of scoring for R = 5 times, R = 10 times,R = 15 times and R = 20 times. Plot this probability against the value of R. Commenton the shape of the plot. [4 Marks] Task-6. Compare with appropriate explanation the two cases of Task-4 and Task-5 basedon the obtained probability plots. [4 Marks] Task-7. Repeat Task-2 to Task-6 using a normal (Gaussian) random number generator.Assume the distribution to be centred at the centre of the circle and with standarddeviation equal to the radius. Comment (with appropriate explanation) on the differencesbetween the results Of the two cases. [8 Marks]43.2 Part II: With Goalkeeper Tests (30 Marks)Consider now the above case but with a goalkeeper. The goalkeeper can assume one of fivepossible actions (see Figure 3): stays in the middle, jumps to the upper left corner, jumps tothe upper right corner, jumps to the lower left corner or jumps to the lower right corner. Aball is saved if the goalkeeper guesses the correct ball position. The goal area can be dividedinto five corresponding regions as shown in the figure.Figure 3: Five possibilities of a goalkeeper action to a penalty shoot-out. Task-8. Assuming that the goalkeeper action is modelled as a uniform random process,what is the probability of scoring a goal if the penalty taker kicks 100 balls with uniformrandom distribution within the circle, as before. Increase the kicks to 1000. Compare theprobability values with the case where no goalkeeper was in the goal (Task-1 and Task-3above). [15 Marks] Task-9. Repeat Task-8 if the balls are kicked with a Gaussian random distribution (as inTask-7). Compare your results with those obtained in Task-7 and Task-8. [5 Marks] Task-10. Given the fact that statistically 90% of the time goalkeepers tend to jump tothe lower two corners of the goal, what is the probability of scoring in this case afterrandomly kicking 100 balls? 1,000 balls? (Compare both uniform and Gaussian distributions)[10 Marks]Note: For Tasks 8-10 you need to provide code, plots, explanations comments as in Part I.4 Review Questions (30 Marks)(Include these in your Conclusions/Discussion section of your report)Q1. In terms of what youve done in this experiment, comment on the advantages and disadvantages(or drawbacks) of the Monte Carlo experiment. [5 Marks]Q2. Discuss the ways in which the above model could be made more accurate and realistic.[7 Marks]Q3. With reference to Task-7 and Task-9, discuss the effect of changing the standard deviationof the Guassian distribution on both the accuracy and precision of the penaltyshots. [5 Marks]Q4. If a large number of balls are kicked on the goal (i.e. if N is sufficiently large), the valueof can be estimated using (some function of) the ratio of the number of scores to thetotal number of the shots. Hence, find the relation that estimates the value of . Verifythis using your results for both uniform and Gaussian distributions. [8 Marks]Q5. From your observation and results of Part II, what is the best strategy that should beadopted by the penalty taker? What is the best strategy that should be adopted by thegoalkeeper? [5 Marks]55 Report Writing and Marking SchemeThis experiment is Assessed by means of a formal report. Reports that get 70% and above arefirst-class reports only. Please refer to Appendix A to read about report marking descriptors.The marking scheme for the report of this experiment is as follows: Results of Part I with code, plots, explanation and comments: 40 Marks Results of Part II with code, plots, explanation and comments: 30 Marks Discussions and Conclusions section (including review questions): 30 Marks6 Plagiarism and CollusionPlagiarism and collusion or fabrication of data is always treated seriously, and action appropriateto the circumstances is always taken. The procedure followed by the University inall cases where plagiarism, collusion or fabrication is suspected is detailed in the UniversitysPolicy for Dealing with Plagiarism, Collusion and Fabrication of Data, Code of Practice onAssessment, Category C, available on httpss://www.liverpool.ac.uk/media/livacuk/tqsd/code-of-practice-on-assessment/appendix_L_cop_assess.pdf.Follow the following guidelines to avoid any problems:(1) Do your work yourself.(2) Acknowledge all your sources.(3) Present your results as they are.(4) Restrict access to your work.Facts about penalty shoot-outs: Over 10 recent world cups penalty shoot-outs, 80% were scored successfully [5]. A study for 1,000 penalty shoot-outs has shown that 74.7% of the kicks were successful,18.2% were saved by the goalkeeper, 3.5% missed the goal and 3.6% hit the woodwork andended with no goal [6]. The most successful football team in penalty shoot-outs is Germany. They lost only oneshoot-out Throughout their history in recorded matches [7]. England football team has bad penalty shoot-out record in major international matches [7].6References[1] G Rubino and B Tuffin, Rare Event Simulation using Monte Carlo Methods, Wiley,2009.[2] C Lemieux, Monte Carlo and Quasi-Monte Carlo Sampling, Springer, 2009.[3] M Kalos and P Whitlock, Monte Carlo Methods, Wiley, 2004.[4] G Fishman, Monte Carlo Concepts, Algorithms and Applications, Springer, 1996.[5] M Bar-Eli and O Azar, Penalty kicks in soccer: an empirical analysis of shooting strategiesand goalkeepers preferences, Soccer Society, 2009.[6] Just About Football, Penalty Kick Statistics and Success rates, https://justaboutfootball.blogspot.com/2009/02/penalty-kick-statistics.html, 2009.[7] J Billsberry, Shootouts Alternatives, https://www.penaltyshootouts.co.uk/alternatives.html,2010.Version historyName Date VersionDr M Lopez-Bentez September 2019 Ver. 3.4Dr A Al-Ataby August 2014 Ver. 3.3Dr A Al-Ataby October 2013 Ver. 3.2Dr A Al-Ataby and Dr W Al-Nuaimy October 2012 Ver. 3.1Dr A Al-Ataby and Dr W Al-Nuaimy October 2011 Ver. 3.0Dr A Al-Ataby and Dr W Al-Nuaimy October 2010 Ver. 2.0Dr W Al-Nuaimy October 2008 Ver. 1.0719Appendix E Report Marking DescriptorsMark Range Knowledge andUnderstandingIntellectual andPractical SkillsTransferable Skills90-99%OutstandingTotal coverage of the task set.Exceptional demonstration ofknowledge and understandingappropriately grounded intheory and relevant literature.Extremely creative andimaginative approach.Comprehensive andaccurate analysis. Wellarguedconclusions.Perceptive Self-assessment.Extremely clear exposition.Excellently structured andlogical response. Excellentpresentation, only the mostinsignificant errors, suitablefor use as model report.80-89%ExcellentAs Outstanding but withsome minor weaknesses orgaps in knowledge andunderstanding.As Outstanding butslightly less imaginativeand with some minor gapsin analysis and/orconclusions.As Outstanding but withsome minor weaknesses instructure, logic and/orpresentation. Quality ofreporting is very high.70-79%Very GoodFull coverage of the task set.Generally very gooddemonstration of knowledgeand understanding but withsome modest gaps. Goodgrounding in theory.Some Creative andimaginative features. Verygood and generallyaccurate analysis. Soundconclusions. Some selfassessment.Demonstratesan understanding of thebroader context of the task.Generally clear exposition.Satisfactory structure. Verygood presentation, largelyfree of grammatical andother errors. Reporting isprofessional and wellpresented.60-69%ComprehensiveAs Very Good but withmore and/or more significantgaps in knowledge andunderstanding and somesignificant gaps in groundingAs Very Good butanalysis and conclusionscontain some minorweaknesses, oversightsand/or inaccuracies.As Very Good but withsome weaknesses inexposition and/or structureand a few moregrammatical and othererrors.50-59%CompetentCovers most of the task set.Patchy knowledge andunderstanding with limitedGrounding in literature.Rather limited creative andimaginative features.Patchy analysis containingsignificant flaws. Ratherlimited conclusions. Noself-assessment.Competent exposition andstructure. Competentpresentation but somesignificant presentationaland structural errors.For example, figures maybe poorly labelled and datatabulation may be poor.40-49%AdequateAs Competent but patchycoverage of the task set andmore weaknesses and/oromissions in knowledge andunderstanding. Just meetsthe threshold level.As Competent butprobably without muchimagination. Shows barelyadequate ability to analyseand draw conclusions.Just meets the thresholdlevel.As Competent but withmore weaknesses inexposition, structure,presentation and/or errors.Just Meets the thresholdlevel.35-39%CompensatablefailSome parts of the set tasklikely to have been omitted.Major gaps in knowledge andunderstanding. Somesignificant confusion. Verylimited grounding. Falls justshort of the threshold level.No creative or imaginativefeatures. Analysis andconclusions rather limited.Falls just short of thethreshold level.Somewhat confused andlimited exposition.Confused structure. Someweaknesses in presentationand some seriouspresentational andmathematical errors. Fallsjust short of the thresholdlevel.20-34%DeficientAs Compensatable Fail butwith major omissions and/ormajor gaps in knowledge andunderstanding, and/orincorrect approach towardsthe experimental task FallsSubstantially below thethreshold level.As Compensatable Failbut analysis and/orconclusions may have beenomitted, and practicalwork is substantially belowthe threshold level.Demonstrates inability tooperate or manipulateequipment.As Compensatable Failbut with more seriousweaknesses in delivery ofpresentation. Fallssubstantially below thethreshold level.0-20%Extremely weakSubstantial sections of thetask not covered. Knowledgeand understanding of the taskand the laboratoryenvironment very limitedand/or largely incorrect. Nogrounding in theory.No creative or imaginativefeatures. No report as suc,just collection of notesAnd/or plots. Analysisextremely weak oromitted. No conclusions.Largely confusedexposition and structure.Many serious errors inpresentation of dataFeedback:If you have any feedback on your laboratory experience for this experiment (e.g. timing,difficulty, clarity of script, demonstration …etc) and suggestions to how the experiment may beimproved in the future, please write them down in the space below. This feedback is importantfor future versions of this script and to enhance the laboratory process, and will not be assessed.If you Wish to provide this feedback anonymously, you may do so by detaching this page andsubmitting it to the Student Support Centre (fifth floor office).如有需要,请加QQ:99515681 或邮箱:99515681@qq.com
“
添加老师微信回复‘’官网 辅导‘’获取专业老师帮助,或点击联系老师1对1在线指导。