Question: incomplete solution will be down voted.. thank you Please do the following and answar the questiont: 1. We can simulate flipping a cain by generatieg
Please do the following and answar the questiont: 1. We can simulate flipping a cain by generatieg randam numbers from a aniform distribution in [0,1] and concidering numbers >0.5 to be heads. Do the following in MATLAB: What is the folative fropuency of heade" 2. Run the experimeat in n1 a total of 10 times. What is the low cot nclative frepueacy you get? Why isny it always 0.5 ? 3. Run the experimesa ten times each with trial =1000 and with trial =100000. What is happening to the variation of the fclative frequeacy as the aumer of trials incroases? Why? 4. We can use a random number genenatoe to estimate peobabilities that might of erwise be difficult to evaluate. Consider the probutsility of obtaining four heads wo foor flipo. Generate four separate random cuperiments of 0 and ls rupossereing N trials each. (You can do this by gencrating an Nxd randcen array rather thun an Nol army as in 31.) Now look at the corresponding tows and detarmine what percentuge of the time all four coun flips across a fow are heads (all cntries equal 1). Show hor your do this in MATLAB. Report the perecniage with N=10,000 and 100,000 , and ceepare this to the expected percentage. 5. Suppose the coin is unfair and has a 45% pecbahility af being leads. Yoe wase ho test this cain by doing 100 coin tlips. Modify your code from al so that the frobuhility of hcads is 0.45. If yoa repeat this 100-flip experiment ever and over, the rolative fropucticy ahould vary atound 0.45. How likely is it that the revelt will shew a fair coin ly giving a relative frequency of 50% or hipher? Calculate the expected percertage of times this would happen by doing this 100 -flip experiment 1000 times and calculating the porwantage of time the relative froquency in 100 fligs is 50n w or higher. Does 100 flipo appeae so be crough trials to reliably desect aa unfair coin with a 45% peocubiliry of heade? Wrise a concise report following the Assignmont Furmat Indtructioes givet bslowc Pheais sobmit your fepart to Canvas electronically belore class on the due date in PDF formut. De not make a comment with the sahmission simply to identify yourself or the project. This is deoe ausomatically. Assignment Format Instructions Hease follow these instractions when writing yout report on yout poojost assiptrocnts: 1. The presentation should be nambered to comespond with the indirvidaal step numbers in the projest. 2. MATLAB output must be copied pasted as tedt, not shoria as screcn captures 3. Fugures mast not be screen captures. They should be expoeted or oopied as a figure or an image and importcol or pasted inte your documant. 4. Text and equations should be formatiod in a woed grosessue. Hantwritsen tert or formulas are not acceptable. 5. Do not antach any roquested MATL.AB code as an appendit. Show in in the body of the report where you are asked to tase or genenate the code. 6. Cemment your code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
