9
Section 5.1 Notes - Completed 1 Section 5.1 Randomness, Probability, and Simulation What does it mean to be random? ~Individual outcomes are unknown ~In the long run some underlying set of outcomes will be equally likely (or at least the likelihood of outcomes will be consistent with actual outcomes in the long run) If someone handed you a coin and told you that it’s biased toward usually landing heads, you’d be justly skeptical. What would you do?

Section 5.1 Notes - Completed Section 5.1 Randomness ...Section 5.1 Notes - Completed 5 Component – the basic unit of our simulation, each randomly generated digit gives the outcome

  • Upload
    others

  • View
    44

  • Download
    0

Embed Size (px)

Citation preview

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.

Section 5.1 Notes - Completed

9

Homework:

p.293#s1,3,7,9,11,15,17,19,23,25