Philip Migas
United States Akron Ohio

I need some help with my math. Event A happens 26.6% of the time when a card is drawn. Each card has a 26.6% chance of triggering Event A. If a card is drawn 20 times, what is the probability that Event A happens 8 or more times? What if there is now 30 cards drawn instead of 20?
(Edit for Clarity)

Ben Draper
United States Seattle Washington

I'm not sure you've given us enough info. Are you saying that each individual card has a 26.6% chance, or that 26.6% of the cards are successful 100% of the time? If it's the latter, we need to know how many cards are in the deck overall (thus also giving us the number of successful cards in the deck).

Ian Klinck
Canada Toronto Ontario

Also, are you interested in knowing if it happens exactly 8 times, or at least 8 times?

Philip Migas
United States Akron Ohio

BennyD wrote: I'm not sure you've given us enough info. Are you saying that each individual card has a 26.6% chance, or that 26.6% of the cards are successful 100% of the time? If it's the latter, we need to know how many cards are in the deck overall (thus also giving us the number of successful cards in the deck). Each individual card has a 26.6% chance of triggering Event A.
iklinck wrote: Also, are you interested in knowing if it happens exactly 8 times, or at least 8 times? At least 8 times.

Morten Brobyskov
Denmark Odense sv

quick answer is 1(0.634^13(23)) since this is the probability that you dont hit the event 13(23) times respecticaly for the 8 times out off 20 times and 8 out of 30 times

Tommy Occhipinti
United States Decorah Iowa
Magic Fanboy

Unless the deck is reshuffled, or the probability this event happens is somehow always the same regardless of game state, the numbers in this problem suggest to me the deck size is probably relevant.
Edited to add an example:
An even has a 1/4 chance of happening with each card I turn up. I turn up 52 cards. What is the probability that event happened exactly 13 times?
If the deck is a standard playing card deck, and the event is "the card is a club" then the answer is certainly 1. If the deck is two playing card decks shuffled together and the vent is "the card is a club" then the answer is certainly not 1 (indeed it is about 18%). These things matter.

Ben Draper
United States Seattle Washington

pmigas wrote: Each individual card has a 26.6% chance of triggering Event
I think you missed this.

Tommy Occhipinti
United States Decorah Iowa
Magic Fanboy

BennyD wrote: pmigas wrote: Each individual card has a 26.6% chance of triggering Event I think you missed this.
Ahh, I think you're right!

Philip Migas
United States Akron Ohio

Madhatterdk wrote: quick answer is 1(0.634^13(23)) since this is the probability that you dont hit the event 13(23) times respecticaly for the 8 times out off 20 times and 8 out of 30 times
This equals 99.7%? How did you get 13 & 23?
Tommy, Thank you for being concerned. Yes the deck does play a factor. But that is not what I am asking about.

Ben Draper
United States Seattle Washington

pmigas wrote: Madhatterdk wrote: quick answer is 1(0.634^13(23)) since this is the probability that you dont hit the event 13(23) times respecticaly for the 8 times out off 20 times and 8 out of 30 times This equals 99.7%? How did you get 13 & 23? Tommy, Thank you for being concerned. Yes the deck does play a factor. But that is not what I am asking about.
The (23) is not meant to be included in the equation. It is a replacement for the 13 when calculating for 30 draws (instead of 20).
Each of these numbers represents the minimum number of unsuccessful events necessary to fail in reaching 8 successful events.



pmigas wrote: I need some help with my math. Event A happens 26.6% of the time when a card is drawn. Each card has a 26.6% chance of triggering Event A. If a card is drawn 20 times, what is the probability that Event A happens 8 or more times? What if there is now 30 cards drawn instead of 20?
(Edit for Clarity)
What you want is the binomial theorem. This describes the likelihood of each outcome in terms of number of cards drawn (more generally, trials) and the probability of success.
For the 20 card case, there is a 13.6% chance of 8 or more successes. For the 30 card case, this becomes 56.6%.
More generally, you can use the calculator here. Entering probability (from 01, so you want .266) trials (number of times you draw a card) and sucesses (in this case 8) will give you these results (or any others you care to calculate). Because you wanted 8 or more successes, note that you should be looking at the final row  'probability that x is greater than or equal to 8' Feel free to follow up if you have more questions on how this works
Edit to add: The problem with the previous answer (by Madhatterdk) is that it calculates the odds of failure on 13 (or 23) consecutive draws. What if you had 10 failures, 7 successes, then 3 failures? The binomial theorem accounts for this by adding a factor to account for every such permutation.
Edit to add II: I have assumed here that each card has the same chance of triggering the event (e.g. every time a card is drawn you roll a die to check for triggering) as opposed to each card either triggering or not triggering the event and the having a chance of drawing the relevant one (e.g. normal playing card deck, clubs triggers the event...)

Christopher Dearlove
United Kingdom Chelmsford Essex
SoRCon 11 2325 Feb 2018 Basildon UK http://www.sorcon.co.uk

pmigas wrote: Yes the deck does play a factor. But that is not what I am asking about.
Except that you are. If the deck size is a factor (as it is) then it affects the answer, which is what you were asking about.
The calculation you were given assumed independence, that is, that one event has no effect on the next event. Dice are like that. Cards are not like that, unless the deck is reshuffled for every card. When events are nt independent you need to work out the answer in a different way (which may be easier sometimes, or more difficult sometimes, depending on the problem). And then the deck size makes a difference. If the deck is very big then the answer you get assuming independence will be roughly right. But if it is not (as would appear to be the case here) then the answer may be completely different.

Christopher Dearlove
United Kingdom Chelmsford Essex
SoRCon 11 2325 Feb 2018 Basildon UK http://www.sorcon.co.uk

old_gamer wrote: What you want is the binomial theorem.
Binomial distribution rather than binomial theorem. Except that you don't, because it assumes independence.
Let's assume that the 26.6% figure means 4/15. We might have a deck of 30 cards with 8 cards in it that cause event A. If we draw 30 cards what's the chance of 8 results that are event A? 100%. That's just a simple example of a nonbinomial distribution result.

Ben Draper
United States Seattle Washington

old_gamer wrote: Edit to add: The problem with the previous answer (by Madhatterdk) is that it calculates the odds of failure on 13 (or 23) consecutive draws. What if you had 10 failures, 7 successes, then 3 failures? The binomial theorem accounts for this by adding a factor to account for every such permutation.
Ah, yes. I missed this, as well as the subtraction error (1.266=.634?)

Philip Migas
United States Akron Ohio

old_gamer wrote: pmigas wrote: I need some help with my math. Event A happens 26.6% of the time when a card is drawn. Each card has a 26.6% chance of triggering Event A. If a card is drawn 20 times, what is the probability that Event A happens 8 or more times? What if there is now 30 cards drawn instead of 20?
(Edit for Clarity) What you want is the binomial theorem. This describes the likelihood of each outcome in terms of number of cards drawn (more generally, trials) and the probability of success. For the 20 card case, there is a 13.6% chance of 8 or more successes. For the 30 card case, this becomes 56.6%. More generally, you can use the calculator here. Entering probability (from 01, so you want .266) trials (number of times you draw a card) and sucesses (in this case 8) will give you these results (or any others you care to calculate). Because you wanted 8 or more successes, note that you should be looking at the final row  'probability that x is greater than or equal to 8' Feel free to follow up if you have more questions on how this works Edit to add: The problem with the previous answer (by Madhatterdk) is that it calculates the odds of failure on 13 (or 23) consecutive draws. What if you had 10 failures, 7 successes, then 3 failures? The binomial theorem accounts for this by adding a factor to account for every such permutation. Edit to add II: I have assumed here that each card has the same chance of triggering the event (e.g. every time a card is drawn you roll a die to check for triggering) as opposed to each card either triggering or not triggering the event and the having a chance of drawing the relevant one (e.g. normal playing card deck, clubs triggers the event...)
Thank you. I gave you a tip. I am working in Excel so the formula is =1(BINOMDIST((S1),T,P,TRUE)) where S = #successes, T= # trials, P = Probability.
The probability of the event happening will vary because of card draw throughout the game. I can not possibly calculate the values throughout the game in a reasonable time. I am using an average for several different items in order to get them reasonable mathematically balanced. This is just a starting point for the game so IMO it does not need to be prefect.
Thank You everyone that Answered.



Dearlove wrote: old_gamer wrote: What you want is the binomial theorem. Binomial distribution rather than binomial theorem. Except that you don't, because it assumes independence.
Yes, the binomial distribution. Which is described by the binomial theorem. ;) Assuming independence of cards appears to be an approximation accepted by the OP.
pmigas wrote: Thank you. I gave you a tip. I am working in Excel so the formula is =1(BINOMDIST((S1),T,P,TRUE)) where S = #successes, T= # trials, P = Probability.
The probability of the event happening will vary because of card draw throughout the game. I can not possibly calculate the values throughout the game in a reasonable time. I am using an average for several different items in order to get them reasonable mathematically balanced. This is just a starting point for the game so IMO it does not need to be prefect.
Thank you! Now I have to figure out what to do with geekgold :)
If you want to get accurate answers for what you appear to be doing (for example, I have 100 cards and 10 succeed, drawing without replacement), what you want is a hypergeometric distribution. You can find a calculator for this here. Notice that as the population size gets very large, the answers approach those for the binomial theorem.
Since you're using excel, you can use the hypgeom.dist function (or hypgeomdist if you're using an older version). If you use =1HYPGEOM.DIST(7,30,26,100,TRUE) you will get the probability of drawing 8 successes or more in a sample of 30 from a population of 100 with 26 successes. The TRUE sets the cumulative distribution function, meaning you get the total probability of 7 or less successes (hence the '1' part, to make it 8 or more successes). If you are using an older version of excel you'll find that hypgeomdist does not have the CDF option, so you'll have to do this manually.
Good luck, have fun making your game!

Christopher Dearlove
United Kingdom Chelmsford Essex
SoRCon 11 2325 Feb 2018 Basildon UK http://www.sorcon.co.uk

old_gamer wrote: Yes, the binomial distribution. Which is described by the binomial theorem.
They are related in that you need the binomial theorem to show that the binomial distribution is welldefined. But they are different, and you need the right one. (To take the most obvious example, Google for binomial theorem and you'll mainly find stuff that won't help.)


