# Gambling probability problem

#### zstudds

##### New Member
A slot machine works on inserting a $1 coin. If the player wins, the coin is returned with an additional$1 coin, otherwise the original coin is
lost. The probability of winning is 1/2 unless the previous play has resulted
in a win, in which case the probability is p < 1/2. If the cost of maintaining
the machine averages \$c per play (with c < 1/3), give conditions on the value
of p that the owner of the machine must arrange in order to make a prot in
the long run.

#### vinux

##### Dark Knight
What have you done on this problem? If it looks difficult, start with when c=0.

#### hlsmith

##### Less is more. Stay pure. Stay poor.
If the inputs are known, yup. Six sides to a fair die, number of cards in a deck or slots on a Roulette wheel, etc.

#### Dason

If the inputs are known, yup. Six sides to a fair die, number of cards in a deck or slots on a Roulette wheel, etc.
Come on now - you know better. This is a 3 year old thread about a homework problem. Let's not encourage resurrecting these threads with input that doesn't really add anything.

#### hlsmith

##### Less is more. Stay pure. Stay poor.
I couldn't remember if you couldn't post a thread until you commented say 6 time or vice versa. I am thinking it is vice versa. But I thought may be they we tryin to hit the eligibility criteria. But yeah, necromancing is all the rage!

See, I just added another non-contributing post to this gem of a relic!

#### gdrianuhillips

##### New Member
All 36 numbers are painted black and red equally (18 black and 18 red; only zero is green). You can choose whether to bet on "red" or "black. If you bet a chip on "red" and guess, the casino gives you back twice what you bet. Why double rather than triple or quadruple? Because the probability of guessing when betting on red or black is 18/36 or 1/2. And therefore, your reward will be twice the bet (i.e., equal to the fraction's denominator). According to roulette rules, you can put a chip on a specific number or the black-red and close several numbers at once with one chip. That is why the probability of winning in MGM99WIN is not tiny.

Last edited:

#### fed2

##### Active Member
long term prob of success about pstate1inf * .5 + ( 1- pstate1inf)*p, where
pstate1inf = .5*2*q/ (2*q + 1)
according to wolfram. solve recursion pstate1(t + 1) == .5 * pstate1(t) + q * ( 1- pstate1(t) ).

C-like:
p=.2
q = 1 - p;
State = .5; #1 = fair, #0 = p
probs = c(.5,p);

f = function(i){
y = rbinom(1,1,  State )

if (y ==1){State <<- probs[2] }
else if (y == 0){ State <<- probs[1] }
y
}

games = lapply(1:1000, f )
games = as.vector( unlist( games ) )

A = matrix( c(.5,p,.5,1-p), nrow=2, byrow = T)

# a recurrsion
#pstate1(t + 1) == .5 * pstate1(t) + q * ( 1- pstate1(t) )
#thanks wolfram, for solution.
state1p = function(n,q){

(   ( .5 - q)^n + 2*q ) /  (2*q + 1)

}

pstate1inf = 2*q/ (2*q + 1)
psuc = pstate1inf * .5 + ( 1- pstate1inf)*p
better late than ever.

Last edited:

#### Aurneriel

##### New Member
The 36 numbers are colored black and red equally, I have no idea how to do this!

#### hlsmith

##### Less is more. Stay pure. Stay poor.
I think the G-word caused the bots to attack this thread. All of these avatars are just too cool and polished.

SKYNET!!!!!!!!!!!!!!!!!!!!!!!!!!!!

We should test this by starting a new thread with the G-word in the title and do a little snake hunting. However, given I posted in this thread my days are already numbered until everything around me contain G-word adds.

#### hlsmith

##### Less is more. Stay pure. Stay poor.
The dog with a top hat is obvious the bot overlord. Proceed with extreme prejudice.

#### Dason

I'm always extremely prejudiced... Against raptors.

#### hlsmith

##### Less is more. Stay pure. Stay poor.
The horror, the horror, the horror...

You know what would be a good avatar, a captcha photo.

#### Dason

I love that you humans still think captcha photos are about trying to keep bots out. They help train the bots but they're not much of a detriment...

#### hlsmith

##### Less is more. Stay pure. Stay poor.
Sure... and my cat looks like guacamole.

#### fed2

##### Active Member
im still wondering why i felt compelled to respond to this thread. must be my skynet control chip got activated like the other bots. Like most people I had one installed with my covid vaccine.

#### hlsmith

##### Less is more. Stay pure. Stay poor.
@fed2 - these are robots. They love this thread because it includes the g-word. It is a honey pot. You can tell because the avatars are too cool and they link to post hyperlinks.

#### hlsmith

##### Less is more. Stay pure. Stay poor.
@fed2 RIP

Too late, they know you are a mark. They are scanning all your personal info and getting ready to inundate you with marketing. Game over!