Skip to main content
gamedev.net
🔒 Locked

Statistics analysis

Started by guesst Mar 6, 2009 at 10:47 AM 3 replies 1k views
Original Post
guesst
guesst
Okay, I have a project that is more or less a game of luck. It can be expressed in the following way: I have 25 cards in my hand, 24 normal face cards and a joker. If you pick the joker you lose. You draw cards one at a time and you win when I only have 4 cards in my hand. So you draw the first card and your odds of losing are 1 in 25, right? When you draw the second card what are your odds? The odds of that hand are 1 in 24, but the odds of winning that hand aren't 1 in 24 because it took a 1 in 25 odds to get you there, so wouldn't it be 23/24ths of 24/25ths or 23/25th (am I right, multiply the fractions?) That being the case, the odds of winning become 4/25. Is that right, that out of 25 games you'll only with 4, assuming I don't do anything else to the game to let you improve or decrease your odds? I have a bachelors in mathematics, but statistics was never my strong point.
A new game every week. Visit www.cymonsgames.com
Bob Janova
Bob Janova
The chance of dying on hand n is 1/26-n
The chance of not dying on hand n is 25-n/26-n
The chance of not dying on or before hand N is the multiple of that series from n=1 to N

= (24×23×22...)/(25×24×23...)

= 25-n/25

For a 'win' n=21 so p=4/25

Surprising indeed ... but either I made the same mistake as you or your initial theory is right.
guesst
guesst
Yeah, the math got faster when I realized the canceling out that was happening. (I actually multiplied the fractions and reduced. Duh.)

Okay, so how about this, instead of 1 pile I have 4, each pile has a joker somewhere in it. The first 25 cards, the second has 20, the third has 15, the fourth has 10. To win you only need to draw 21 cards from any where. Only it's played like this: Start drawing from the tallest pile, when you don't trust that pile any more, you move on to the next, and so forth until you have 21 piles.
So you start on the tallest pile, figuring you have the best odds. But eventually the odds don't favor you there any more, so you move on to the next.

Have I significantly increased your odds of winning now or have I just disguised the fact that you're still going to loose more than you win?
A new game every week. Visit www.cymonsgames.com
alvaro
alvaro
For the original problem: You can think of the game as "pick 21 cards; if any of them is the joker you lose, otherwise you win." Now it should be more obvious that the probability of winning is 4/25.

For the second problem: What is the victory condition? if it's simply not picking a joker, the best strategy is to pick 12 cards from the first pile, 7 from the second pile and 2 from the third pile, which has a probability of winning of 13/25*13/20*13/15 ~= 0.292933333... So you have improved the odds quite a bit
guesst
guesst
Quote:
Original post by alvaro
For the original problem: You can think of the game as "pick 21 cards; if any of them is the joker you lose, otherwise you win." Now it should be more obvious that the probability of winning is 4/25.

For the second problem: What is the victory condition? if it's simply not picking a joker, the best strategy is to pick 12 cards from the first pile, 7 from the second pile and 2 from the third pile, which has a probability of winning of 13/25*13/20*13/15 ~= 0.292933333... So you have improved the odds quite a bit

Improved, but still a high chance of failure.

Still, I've made it seem like you're odds are better, and I've made the interactions much more... interactive.

This whole discussion has been for the purpose of my 7drl project which starts tomorrow, so thanks for your help. What this tells me is that the luck aspect of the gameplay is enough I don't need to worry about throwing combat which might kill you into the mix.
A new game every week. Visit www.cymonsgames.com

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.