Section 5.1 Notes - Completed Section 5.1 Randomness ...Section 5.1 Notes - Completed 5 Component...
Transcript of Section 5.1 Notes - Completed Section 5.1 Randomness ...Section 5.1 Notes - Completed 5 Component...
Section 5.1 Notes - Completed
1
Section5.1Randomness,Probability,andSimulation
Whatdoesitmeantoberandom?
~Individualoutcomesareunknown
~Inthelongrunsomeunderlyingsetofoutcomeswillbeequallylikely(oratleastthelikelihoodofoutcomeswillbeconsistentwithactualoutcomesinthelongrun)
Ifsomeonehandedyouacoinandtoldyouthatit’sbiasedtowardusuallylandingheads,you’dbejustlyskeptical.Whatwouldyoudo?
Section 5.1 Notes - Completed
2
You’dprobablytestthecoinbytossingitafewtimes.Howmanytimesareenough?
Would3headsinarowconvinceyouthatthecoinwasbiased?
Would7of10headsbeconvincing?
Imagineweuse100tosses.Would54headsoutof100convinceyouthatthecoinisbiased?
Whatabout60outof100?
Howabout95outof100?
Howabout80outof100?or70?
Section 5.1 Notes - Completed
3
Let’sdecideasaclasswhatourrulewillbe.
Let’suseasimulationtoanswerthisquestion.
randInt(0,1)–simulatingasinglecointoss(with0=tails,1=heads)
randInt(0,1,5)–simulatingtossing5coins
sum(randInt(0,1,100))–sinceeachcoinis0or1,thesumofthese100valuesisequivalenttocountingthenumberofheads
Section 5.1 Notes - Completed
4
Let’stryrunningacoupleofthese–howmanypeoplegotmorethan________heads?
Keepinmindthatevenifwecomeupwitharule,tossingacoin100timesanddeclaringitokayorbiasedwouldstillnotgiveusthetruthforsure–justasuggestionthatthecoinisbiasedornot.
Section 5.1 Notes - Completed
5
Component–thebasicunitofoursimulation,eachrandomlygenerateddigitgivestheoutcomeofONEcomponent Identifythecomponenttoberepeated
Explainhowyouwillmodelthecomponent’soutcome
Trial–acombinationofcomponentoutcomesthatgiveasimulatedanswertoourquestion
ExplainhowyouwillcombinethecomponentstomodelatrialRunseveraltrials–ifbyhand~20isgood
Responsevariable–theoutcomeofthetrial,whatwearemeasuringwitheachtrial
Statistic–whatwillweusetosummarizeourresults
Conclusions-thesimulationSUGGESTS...
Thestepsofasimulation
Supposeabasketballplayerhasan80%freethrowsuccessrate.Howcanweuserandomnumberstosimulatewhetherornotshemakesafoulshot?Howmanyshotsmightshebeabletomakeinarowwithoutmissing?Describethesimulationofhavinghershootfreethrowsuntilshemisses,countingthenumberofsuccesses.
ComponentTrial
Responsevariable
Statistic
Section 5.1 Notes - Completed
6
Howwouldthesimulationchangeifhersuccessratewereonly72%?
ComponentTrial
Responsevariable
Statistic
Howwouldatrialandourresponsevariablechangeifwewanttoknowhowmanyshotsshemightmakeoutof5chances?
ComponentTrial
Responsevariable
Statistic
Section 5.1 Notes - Completed
7
ComponentTrial
Responsevariable
Statistic
Howwouldatrialandourresponsevariablechangeifwewanttoknowherchancesofhittingbothshotswhenshegoestothelinetoshoottwo?
RandomDigitsTable
Anotherwaytogeneraterandom(orasrandomaswecanget)isusingatableofrandomdigits.
Thereisoneinthebackofyourbook.
Eachdigit0through9isequallylikelytooccuratanytime,thereforeanypatternoftwoormoredigitsisequallylikelytooccuratanypointinthetable.
Inordertousethistabletogeneraterandomdigits-pickarowtostarton.Readthedigitslefttorightbeingsuretoreadingroupsappropriatetothesizeofthenumbersassignedforyoursimulation.Ifyournumbersgofrom1-15youmustreadtwodigitsatatime,etc.
Section 5.1 Notes - Completed
8
ComponentTrial
Responsevariable
Statistic
SupposewearetorandomlyselectthreestudentsfromtheclasstospeakatParents’NightabouttakingAPStats.Howlikelyisitwe’llgetthreeboys?
Samisabasketballplayerwhotypicallymakes85%ofherfreethrows.However,whenshootingtwofreethrowsinarow,thelikelihoodofhermakingthesecondshotdependsuponhowshedoesonthe]irstshot.Ifshemissesthe]irstshot,sheonlymakes70%ofhersecondfreethrows.Butifshemakesher]irstshot,shemakes90%ofhersecondfreethrows.DescribeasimulationthatwilldeterminethechanceofSammakingtwofreethrowsinarow.