Binomial distribution: gamification for online casino This'll be my first post here and I haven't done any statistics in 10 years, so I need some help getting back into it.
So I'm working on a gamification system for an online casino and I'm trying to figure out the likelyhood of certain events, and a fair prize for completing the event.
Slot $X$ has a hit frequency of $44.9$%.
The odds for winning $3$ times in a row (binomial distribution) is $9.05188$%
How many times, on average, do I need to spin to win 3 times in a row? 
Any help would be greatly appreciated!
 A: I will rephrase the problem in the familiar terminology of coin flipping. If I understand correctly, you are asking how many tosses are on average needed to get three consecutive heads. The coin is biased, and comes head with a probability $p = 0.449$.
An equation for $Z_3$, the expected number of tosses to get three successful outcomes, can be set as follows, as a sort of weighted average over likely values. 
You perform the first toss. If it is tails (probability $1-p$), one trial is gone and you will still need $Z_3$ trials for your “three-in-a-row-heads” sought outcome.
If your first toss is heads, then you consider separately the two next chances: either heads again, or not. If not (probability $p (1-p)$, you have lost 2 trials, and still need $Z_3$ attempts. 
If yes, you consider the third attempt. If after two heads you get a tails (probability $p^2 (1-p)$ 3 trials are gone, and you still need $Z_3$. If the third is heads (probability $p^3$), you got the streak you were looking for, and $Z_3$ equals 3 with said probability.
Putting all together, one gets
$$ Z_3 = (1-p) (Z_3+1) + p(1-p)(Z_3+2) + p^2 (1-p)(Z_3+3)+3p^3$$
A litte re-arrangement yields
$$ Z_3 = \frac{1 + p + p^2}{p^3} $$
and substituting the value you gave for $p$ one estimates that 19 tosses will be needed.
A: It should be possible to tackle this by treating it as a Markov process and setting up 
stochastic matrix
 to represent the transition between states.
Let 1 represent a success and 0 a failure and let $p$ represent the probability of a success.
Assume we have a long stream of trials, for any three successive trials there are eight patterns of 1's and 0's and each of these is a state: $\{000, 001, \ldots 111\}$
For a given state, there are two possible states that can follow it. E.g. if the current state is $011$, the next individual trial will give a 1 or a 0 so the next state will either be $110$ (with probaility $q = 1-p$) or $111$ (with probability $p$).
We can build the $8 \times 8$ stochastic matrix $M$ to collect together all of these transitions.
Let $v_k$ represent the $8 \times 1$ state probability vector after $k+3$ trials.
We have $v_0 = (q^3, q^2p, \ldots , p^3)^T$ and and the transition matrix is applied as follows
$$
v_{k} = M v_{k-1}
$$
So that 
$$
v_k = M^{k-1} v_0
$$
Evaluating the successive powers of $M$ will give us the probabilities of all states after different numbers of trials. In particular it can be used to obtain the probability of the state $111$ (three successive wins) for different numbers of trials. I appreciate this is not quite the same as giving the average number of trials required for three successive wins but it does provide a distribution over all numbers of trials which may serve as well.

Edit: It was too tempting not to have a go at this myself. Below is the code I used to implement the outline above. The estimated number of steps matches that given by @BruceET.
this is in Python 2
Set up some variables:
import numpy as np

# prob success
p = 0.449
# prob fail
q = 1 - p

q3 = q**3
q2p = q*q*p
qp2 = q*p*p
p3 = p**3

#   indices:    0      1      2      3      4      5      6      7 
state_list = ['000', '001', '010', '011', '100', '101', '110', '111']
init_probs = [q3   , q2p  , q2p  , qp2  , q2p  , qp2  , qp2  , p3]

Set up transition matrix:
# transition matrix
M = np.zeros((8,8))

# Set the transition values from state i to state j:

M[0,0] = q
M[0,1] = p

M[1,2] = q
M[1,3] = p

M[2,4] = q
M[2,5] = p

M[3,6] = q
M[3,7] = p

M[4,0] = q
M[4,1] = p

M[5,2] = q
M[5,3] = p

M[6,4] = q
M[6,5] = p

# state '111' is an absorbing state.
M[7,7] = 1.0

Now run the transitions forward:
# Vector that will undergo transition
v = np.asarray(init_probs)

# Number of transitions to apply
n_reps = 1000

# Cumulative probability for state 111, the value at index k 
# will represent the sum of the probabilities of reaching this 
# state in the current or previous iterations. The k^th index
# of this array corresponds to the step k+3 in the game.
p_cumulative = np.zeros((n_reps,))

for k in range(n_reps):  
    p_cumulative[k] = v[-1]
    v = np.dot(M.T, v)

# Figure out the probabilities of reaching state 111 in each step.
p = p_cumulative.copy()

# This sets p[k] = p_cumulative[k] - p_cumulative[k-1] for k>=1
p[1:] = p[1:] - p[:-1]

Finally, estimate the expected number of steps taken to reach state '111'
steps_taken = range(3, 3+n_reps)

e_steps = np.sum(p * steps_taken)

print 'Estimated steps needed: {:0.4f}'.format(e_steps)


Estimated steps needed: 18.2349

A: Let $P(n)$ be the probabilty that you hit 3 wins in a row for the first time on your $n$-th try.
You hit 3 wins in a row for the first time on your $n$-th try iff:


*

*You win the $n$-th, $(n-1)$-th and $(n-2)$-th games,

*You lose the $(n-3)$-th,

*You never won three times in a row during your $n-4$ first tries.


Hence,
$P(0)=P(1)=P(2)=0$
$P(3)=0.449^3$
$P(n)=0.449^3*(1-0.449)*(1-\sum_{k=0}^{n-4}P(k))$
This doesn't yield a closed form easily but should be enough if you want to compute the result with an algorithm.
