Probability: Difference between revisions
1d4chan>Zecro |
1d4chan>Zecro m article links |
||
| Line 1: | Line 1: | ||
Can you into probability and statistics? | Can you into [[probability]] and [[statistics]]? | ||
* No? Start reading. | * No? Start reading. | ||
* Yes? Start editing. Know your audience, explain things for ordinary people. If I see any greek letters in here I'll bite off your kneecaps. | * Yes? Start editing. Know your audience, explain things for ordinary people. If I see any greek letters in here I'll bite off your kneecaps. | ||
Revision as of 23:45, 20 November 2012
Can you into probability and statistics?
- No? Start reading.
- Yes? Start editing. Know your audience, explain things for ordinary people. If I see any greek letters in here I'll bite off your kneecaps.
The Basics
Relevant for: Everything
Notation/How do I write this stuff?
I'm assuming you know that a d4 is a four-sided-die, and 2d4 is two four-sided-dice. If you're confused regarding dice notation, see dice.
In order to preserve the most information when writing anything, it's good practice to write your probabilities as (number of desired events)/(number of total possible events). The probability of rolling a 4, 5 or 6 is written as 3/6.
While 3/6 is numerically equivalent to 1/2, 50%, 0.5, or just .5, you do lose information regarding the total possible outcomes in simplifying fractions. However, it can be more informative to say 20% when saying "rolling a 16+ on a d20," though. Unless you're in a probability class, the way you present your answer won't matter.
The probability of an event E happening is written as P({E}). This is always a number between 0 and 1 (including 1 and 0). If you get something other than a number between 0 and 1, you're doing something wrong.
Inverse/What are the odds of something not happening?
If you're looking at a situation where something will either happen or not happen, then the odds of something not happening are equal to one minus the odds of it happening. So, the odds of rolling a 6 on a d6 is 1/6. The odds of not rolling one is 5/6. Add those together, you get 6/6, or 1. A lot of the time it's easier to work out the odds of something not happening and take the Inverse than to work out the odds of something happening.
Compound/What are the odds of several things happening?
The probability of any mutually exclusive events happening is the sum of the probabilities of each event. That is, since you cannot simultaneously roll a 1, 2, or 3 on a d6, they are mutually exclusive events. The probability of rolling a 1, 2 or 3 on a d6 is P({1})+P({2})+P({3})=1/6+1/6+1/6=3/6.
For multiple events happening in a specific order over multiple trials, (for instance, the odds of rolling a d20 and getting four natural twenties in a row) take all the odds and multiply them together. So, the odds of rolling one natural twenty is 1/20. Two in a row? That's 1*1 / 20*20, or 1/400. Three in a row? 1/8000. Four? 1/160000. Getting a 9 on a d10 and then getting a 75 or higher on a d100 is 1/10*25/100 or 25/1000 or 1/40.
What does that mean for your chances of rolling a nat 20 if you just rolled one? Absolutely fucking nothing. Your dice don't remember what you just rolled, and if they did they wouldn't care. This is known as the Lack of Memory property, and is obvious from each event (roll) being independent. In notation, it would be P({20}|{20}), or "the probability of rolling a 20, given that a 20 has already been rolled."
Keep in mind that this is NOT the same as saying "rolling a d20 two times and getting at least one natural 20." The probability of this happening is actually 9.75%. Why? P({rolling two 20s})+P({rolling a 20 first and any other number second})+P({rolling any number first and a 20 second}) = 1/20*1/20 + 1/20*19/20 + 19/20*1/20 = 1/400+19/400+19/400 = 39/400 = 0.0975. To check, we can also calculate "not rolling any 20s on 2d20" as 19/20*19/20 = 361/400 = 0.9025. The inverse probability of this is 1-0.9025=0.0975, so we have checked our answer by stating the problem in two different ways.
Rolling for successes/hits
Relevant for: Shadowrun, old WoD, new WoD, others
What are the odds of me succeeding with X many dice?
You can work out the chances of every individual result, but the quickest way to figure out if you're going to get any successes at all is to take the Inverse of rolling no successes at all.
So, you've got 4d10 and you need an 8, 9 or 10 to succeed? You've got a .3 chance of a success on one die, meaning you have a .7 chance a failure on one. You're rolling four dice, so the odds of all of them being failures is .7^4, or 0.7*0.7*0.7*0.7, or 0.2401. The inverse of that, the odds of getting anything other than zero successes, is 0.7599.
Incidentally, if you're working with that Target Number 8 in the last paragraph and you want a quick way to work out your chance of success... The odds of failing outright with two dice are 0.49, or about 1/2. That means the odds of failing with four dice are about 1/4. Six dice gives you 1/8, eight gets you 1/16, or 15/16 chance of getting at least one success. Repeat as many times as you like.
There are tables floating around, but I cannot into embedding images. http://wiki.white-wolf.com/exalted/index.php?title=Dice_Probability/Heroic,_TN_7
General Polyhedral Dice
Relevant for: Dungeons and Dragons
What are the odds that dX beats dY?
Want to know if a d6 is going to beat a d12? First, there are 72 ways this could come out (6 times 12, from the two dice), so the answer will be X/72. Next, look at it this way:
If the d12 lands on a 6 or higher, then the d6 will not be higher than it. If it lands on a 5, then one of the results on the d6, the 6, would be higher than it. So that's 1/72 so far. If it lands on a 4 then there are two results, if it lands on a 1 then there are five. There's a total of 1+2+3+4+5 results that would make the d6 the higher die, 15 in total. The odds of a d6 being higher than a d12 are 15/72.
d10 vs d12? That's 9+8+etc / 10*12, so 45/120.
What are the odds that adX beats bdY?
step 1: AdX (sum the results) yields a number between A (when you roll all ones) and A*X (when you roll all X's (i.e. 6's). The trick here is that there are more results than sums, and so you need to work out how often these sums occur for your results.
lets look at 2d6 : there are 36 unique unique combinations of 1 through 6 (taken twice)
2 can occur 1 way (1/36)
3 can occur 2 ways (2/36)
4 can occur 3 ways (3/36)
5 can occur 4 ways (4/36)
6 can occur 5 ways (5/36)
7 can occur 6 ways (6/36)
8 can occur 5 ways (5/36)
9 can occur 4 ways (4/36)
10 can occur 3 ways (3/36)
11 can occur 2 ways (2/36)
12 can occur 1 way (1/36)
lets look at the corresponding 2d10: there are 100 unique combinations of 1 through 10 (taken twice) these can sum up to
2 can occur 1 way (1/100)
3 can occur 2 ways (2/100)
4 can occur 3 ways (3/100)
5 can occur 4 ways (4/100)
6 can occur 5 ways (5/100)
7 can occur 6 ways (6/100)
8 can occur 7 ways (7/100)
9 can occur 8 ways (8/100)
10 can occur 9 ways (9/100)
11 can occur 8 ways (8/100)
12 can occur 7 ways (7/100)
13-20 can occur 36 ways (36/100)
So for 2d6 to beat 2d10:
one way is 2d6 =3 and 2d10 = 2 (2/36)*(1/100)
one way is 2d6 =4 and 2d10 = 2 (3/36)*(1/100) or one way is 2d6 =4 and 2d10 = 3 (3/36)*(2/100)
one way is 2d6 =5 and 2d10 = 2 (4/36)*(1/100) or one way is 2d6 =5 and 2d10 = 3 (4/36)*(2/100)or one way is 2d6 =5 and 2d10 = 4 (4/36)*(3/100)
add up all the results and you have your answer!