probability
play

Probability statistics So, understand some basic probability - PDF document

4/27/2017 Overview IMGD 2905 Statistics important for What are some examples of game analysis probabilities needed for Probability important for game development? Probability statistics So, understand some basic probability


  1. 4/27/2017 Overview IMGD 2905 • Statistics important for • What are some examples of game analysis probabilities needed for • Probability important for game development? Probability statistics • So, understand some basic probability Chapters 4 & 5 • Also, probability useful for game development https://www.mathsisfun.com/data/i mages/probability-line.svg Overview Probability Introduction • Statistics important for • Probability attack will • • Probability – way of assigning Roll die (d6) and get 6 game analysis succeed numbers to outcomes to express – elementary event • Probability important for • Probability loot from enemy likelihood of event • Roll die (d6) and get even number • Event – outcome of experiment statistics contains rare item – compound event, consists of or observation elementary events 2, 4, and 6 • So, understand some basic • Probability enemy spawns – Elementary – simplest type for • Pick card from standard deck and probability at particular time given experiment get queen of spades – Joint/Compound – more than one • Also, probability useful for • Probability action (e.g., – elementary event elementary • game development building a castle) takes Pick card from standard deck and get face card particular amount of time – compound event • Probability players at server • Observe players logging into MMO and see if time between two arrivals is more than 15 seconds https://cdn.kastatic.org/googleusercontent/Z0TuLq2KolavsrfDXSbLqi0S- https://www.mathsisfun.com/data/i wnlCrC13cKGG68wK9ljrTiXzRqvfq7IpWNzcwgzlpEOI8YmMafp4K4zO0sanvXu mages/probability-line.svg Outline Probability – Definitions • Exhaustive set of events • Roll D6: Events: 1, 2, 3, 4, 5, 6 • Introduction (done) – set of all possible – exhaustive, mutually exclusive outcomes of • Probability • Roll D6: Events: get even (next) experiment/observation number, get number divisible by • Probability Distributions • Mutually exclusive sets 3, get a 1 get a 5 of events – elementary – exhaustive, but overlap events in each do not • Observe logins: time between overlap arrivals <10 seconds, 10+ and <15 seconds inclusive, or 15+ seconds – exhaustive, mutually exclusive • Observe logins: time between arrivals <10 seconds, 10+ and <15 seconds inclusive, or 10+ seconds – exhaustive, but overlap 1

  2. 4/27/2017 Probability – Definition Assigning Probabilities • Probability – likelihood of event to occur, measured by ratio • Classical (by theory) of favorable cases to unfavorable cases – In many cases, exhaustive, mutually exclusive outcomes equally • Set of rules that probabilities must follow likely  assign each outcome probability of 1/n – Probabilities must be between 0 and 1 (but often written/said – e.g., d6 : 1/6, Coin : prob heads ½, tails ½, Cards : pick Ace 1/13 as percent) • Empirically (by observation) – Probabilities of set of exhaustive , mutually exclusive events must – Obtain data through measuring/observing add up to 1 • e.g., D6: events 1, 2, 3, 4, 5, 6. Probability of 1/6 th to each – e.g., Watch how often people play League of Legends in lab versus some other game. Say, 30% LoL. Assign that as probability  legal set of probabilities • Subjective (by hunch) • e.g., D6: events 1, 2, 3, 4, 5, 6. Probability of ½ to 1, ½ to 2, – Based on expert opinion or other subjective method and 0 to all the others – e.g., e-sports writer says probability Team SoloMid (League team)  Also legal set of probabilities will win World Championship is 25% – Not how honest d6’s behave in real life! So, how to assign probabilities? Rules About Probabilities (1 of 2) Rules About Probabilities (2 of 2) • Independence: One occurs doesn’t affect probability that • Complement: A an event, event “A does not other occurs occur” called complement of A, denoted A’ – e.g., 2d6: A= die 1 get 5, B= die 2 gets 6. Independent, since result of one roll doesn’t affect roll of other P(A’) = 1 - P(A) – Probability both occur P(A and B) = P(A) x P(B) – e.g., d6: P(6) = 1/6, complement is P(6’) and – e.g., 2d6: prob of “snake eyes” is P(1) x P(1) = 1/6 x 1/6 = 1/36 probability of not 6 is 1-1/6, or 5/6 • Not independent: One occurs affects probability that other – Note: when using p, complement is often q occurs – Probability both occur P(A and B) = P(A) x P(B | A) • Mutually exclusive: Have no simple outcomes • Where P(B | A) means the prob B given A happened in common – can’t both occur in same – e.g., MMO has 10% mages, 40% warriors, 80% Boss defeated. Probability Boss fights mage and is defeated? experiment – You might think that = P(mage) x P(defeat B) = .10 * .8 = .08 – But likely not independent. P(defeat B | mage) < 80%. So, need P(A or B) = P(A) + P(B) not-independent formula P(mage)* P(defeat B | mage) – e.g., d6: P(3 or 6) = P(3) + P(6) = 1/6 + 1/6 = 2/6 Probability Example Probability Example • Probability drawing King? • Probability drawing King? P(K) = ¼ • Draw, put back. Now? 2

  3. 4/27/2017 Probability Example Probability Example • Probability drawing King? • Probability drawing King? P(K) = ¼ P(K) = ¼ • Draw, put back. Now? • Draw, put back. Now? P(K) = ¼ P(K) = ¼ • Probability not King? • Probability not King? P(K’) = 1-P(K) = ¾ • Draw, put back. 2 Kings? Probability Example Probability Example • Draw. King or Queen? • Probability drawing King? • Probability drawing King? P(K) = ¼ P(K) = ¼ • Draw, put back. Now? • Draw, put back. Now? P(K) = ¼ P(K) = ¼ • Probability not King? • Probability not King? P(K’) = 1-P(K) = ¾ P(K’) = 1-P(K) = ¾ • Draw, put back. 2 Kings? • Draw, put back. 2 Kings? P(K) x P(K) = ¼ x ¼ = 1/16 Probability Example Probability Example • Draw. King or Queen? • Draw. King or Queen? P(K or Q) = P(K) + P(Q) P(K or Q) = P(K) + P(Q) = ¼ + ¼ = ½ = ¼ + ¼ = ½ • Draw, put back. Not 2 • Probability drawing King? • Probability drawing King? Kings? P(K) = ¼ P(K) = ¼ • Draw, put back. Now? • Draw, put back. Now? P(K) = ¼ P(K) = ¼ • Probability not King? • Probability not King? P(K’) = 1-P(K) = ¾ P(K’) = 1-P(K) = ¾ • Draw, put back. 2 Kings? • Draw, put back. 2 Kings? P(K) x P(K) = ¼ x ¼ = 1/16 P(K) x P(K) = ¼ x ¼ = 1/16 3

  4. 4/27/2017 Probability Example Probability Example • Draw. King or Queen? • Draw. King or Queen? P(K or Q) = P(K) + P(Q) P(K or Q) = P(K) + P(Q) = ¼ + ¼ = ½ = ¼ + ¼ = ½ • Draw, put back. Not 2 • Draw, put back. Not 2 • Probability drawing King? • Probability drawing King? Kings? Kings? P(K) = ¼ P(K) = ¼ P(K’) x P(K’) = ¾ x ¾ = 9/16 P(K’) x P(K’) = ¾ x ¾ = 9/16 • Draw, put back. Now? • Draw, put back. Now? • Draw, don’t put back. • Draw, don’t put back. Not 2 Kings? Not 2 Kings? P(K) = ¼ P(K) = ¼ • Probability not King? • Probability not King? P(K’) x P(K’ | K’) = ¾ x 2/3 P(K’) = 1-P(K) = ¾ P(K’) = 1-P(K) = ¾ = 6/12 = ½ • Draw, put back. 2 Kings? • Draw, put back. 2 Kings? • Draw, don’t put back. King 2 nd card? P(K) x P(K) = ¼ x ¼ = 1/16 P(K) x P(K) = ¼ x ¼ = 1/16 Probability Example Outline • Draw. King or Queen? P(K or Q) = P(K) + P(Q) • Intro (done) = ¼ + ¼ = ½ • Probability (done) • Draw, put back. Not 2 Kings? • Probability drawing King? • Probability Distributions (next) P(K’) x P(K’) = ¾ x ¾ = 9/16 P(K) = ¼ • Draw, don’t put back. • Draw, put back. Now? Not 2 Kings? P(K) = ¼ P(K’) x P(K’ | K’) = ¾ x 2/3 • Probability not King? = 6/12 = ½ P(K’) = 1-P(K) = ¾ • Draw, don’t put back. • Draw, put back. 2 Kings? King 2 nd card? P(K) x P(K) = ¼ x ¼ = 1/16 P(K’) x P(K | K’) = ¾ x ⅓ = 3/12 = ¼ Uniform Distribution Probability Distributions • Probability distribution – • “So what?” values and likelihood of those values that random • Can use known variable can take formulas • Why? If can model mathematically, can use to predict occurrences – e.g., probability slot machine https://goo.gl/jqomFI pays out on given day Mean = (1 + 6) / 2 = 3.5 – e.g., probability game server Types discussed: Variance = ((6 – 1 + 1) 2 – 1)/12 Uniform (discrete) hosts player today Binomial (discrete) – e.g., probability certain game = 2.9 Poisson (discrete) mode is chosen by player Std Dev = sqrt(Variance) = 1.7 Normal (continuous) – Also, some statistical techniques for some distributions only 4

Recommend


More recommend