If one understands the basics of probability theory, then in roulette especially it is very easy to test betting systems mathematically. Here is the step by step logic of applying probability in roulette to the possible outcomes.
First, all the mathematics used here is based on a European single 0 wheel since the house edge is half the American version.
We know that the probability of an event happening is the chances of that event compared to all the possible events. For instance, when you flip a coin there are 2 possible outcomes: heads, tails. If you want to know what is the probability that the coin will come up heads, then that would be: heads / (heads + tails) = 1/2 = .5. Likewise when playing an even money bet at roulette, that option covers 18 of the 37 possible outcomes: 18/37=.48648649.
To find out the effect the odds have on a measurable outcome, we can apply that outcome to all possible results. So if we’re playing $1 on black, then we know that for 18 of 37 outcomes we will net $1 profit, and for 19 of the 37 possible outcomes we will net a $1 loss. ((18/37)*1)+((19/37)*-1)=-.02702703. This shows the house advantage on any single spin applied to your bankroll. We know that if you place $1 on any even number bet on average you will loose almost three cents per spin or $27 over 100 spins.
This is valuable when looking at more complicated betting within the layout of the table. For instance, if you consider on the thirds position that the return is 2:1. Let’s look at the extremes. If you place a bet on one of the three options, then you are obviously playing against probability: 12/37=.32432432 probability to win. If you place $1 on all three of the possible options, then for 36 of 37 numbers you will loose $2, make $2, and have the bet on the winning third returned to you for a net profit of $0. This of course makes no sense at all, but you’ll win almost every time if you’re in it to feel like a winner however if your considering a system you’re trying to make money. If we hedge the single bet with the second possible bet and place $1 on the first two of the thirds, then we cover 24 of 37 numbers 24/37=.64864865. We’re guaranteed to lose one bet, but if the other hits then we make $2, minus the one lost, plus the winning bet returned makes a net profit of $1 – and here’s the kicker – our chance of winning on any single bet is greater than 50% (64.86% to be precise).
We know that roulette is an independently random game where the results of one action does not affect the odds of a second action, so presented like this one might see this a winning system of finding a way to shift the odds in your favor. However if we analyze all the possible outcomes we see that the proposition is a losing one. 24 of 37 possible outcomes net us $1. On 13 of 37 possible outcomes we loose $2. So we plug in our formula: ((24/37)*1)+((13/37)*-2)=-.05405405. This is even worse than playing even money odds.
Now we come full circle. Almost all systems are based on the premise that the likelihood of an event happening repeatedly gets exponentially smaller the more times in a row one seeks that option. Probability will never rule out a roulette table showing the number 36 100 times in a row, but it will tell us exactly how unlikely it is. The premise is that the probability of an event happening once is multiplied by the likelihood of the second event multiplied by the third event and so on. For instance, for a single number to come up 100 times we multiply (1/37)*(1/37)*(1/37)… for one hundred times. This is a tiny number but we can see how fast it adds up:
The likelihood of a number coming up four times in a row is only 0.000053%, but it happens. Just go to Global Player Casino and check out the roulette results for the year. But I digress, the strategies say if you chase a loss long enough it won’t lose any more, and systems like the Martingale set it up so that you realize a profit when that condition fails. However, it’s still a losing system because we can plug in our formula to this just as easily as we can plug it into a single event.
But first let’s examine what it is we’re looking at. If we’re analyzing a system there are only two options we’re interested in: win or loss. Let’s not get too complicated and assume that one loss will exit the system and return the player to the starting state such as the Martingale.
If the first spin loses then we go to a second spin, and if the second spin loses then we go to the third and so on. So we know that for however many levels we examine all the preceding spins will be losses. In other words, if 51.4% of spins will lose, then we are looking at 51.4% of 51.4% will lose twice in a row and 48.6% of 51.4% will win on the second round. Therefore, 51.4% of 51.4% of 51.4% will lose thrice, and 48.6% of 51.4% of 51.4% will win.
For a single level we know that the formula is the probability of a win times the net result and the probability of a loss times the net result.
To check the second level, the probability of a loss followed by the probability of a win times the net result is compared to two losses and the net result.
To extrapolate the third, fourth, and fifth level:
We can see no matter how far we go on the Martingale system it’s always more likely a losing proposition than a winning proposition, and the deeper one goes the more likely one is to lose a greater sum of money. Of course this isn’t a surprise since the odds are already against us.
More on other systems and hedge betting later.
Any system can be analyzed like this for any game. If the result is positive, the odds are in the player’s favor. If the result is negative you’re trusting Lady Luck. I haven’t found a formula that results in a positive number. Of course, if I had I'd be in a casino right now.
In practice, most betting systems redistribute the amounts of the wins and losses: an increase in the chance of winning is balanced against a greater loss once it does occur, as it will sooner or later. The oldest and most common betting system is the martingale, or doubling-up, system on even-money bets, in which bets are doubled progressively after each loss until a win occurs. This system probably dates back to the invention of the roulette wheel. 
Martingale is the most common betting system in roulette. The popularity of this system is due to its simplicity and availability. When playing on Martingale, it creates the deceptive impression of quick and easy wins. The essence of the Martingale roulette game system is as follows: we bet on an even chance of roulette (red-black, even-odd), for example, on "red": we bet on roulette at $ 1; if you lose, we double the bet and bet $ 2. If we lose at roulette, we lose the current bet ($ 2) and the previous bet ($ 1) by an amount of $ 3. If we win, we win $ 4, eg. wins two bets (1 + 2 = $ 3) and we have $ 1 net win from roulette. If you lost at roulette for the second time using the Martingale roulette system, let's double your bet again (it is now $ 4). If we win, we will win back the previous two bets (1 + 2 = $ 3) and the current one ($ 4) from the roulette wheel, and again we win $ 1 against the casino. 
This is a well presented maths explanation of the odds against the player when betting at roulette.But it confuses probability with certainty.Probability Theory deals with uncertainty not certainty. Roulette, like all gambling, is a game of chance so , obviously, chance is involved. This does not mean that only chance is involved. If the roulette wheel is random then no one can predict with certainty that we will win or lose. That certainty belongs to astrology not maths. There is no reason why the wheel should not give the same number continuously for a hundred, a thousand or even a million spins if it is truly random; incidentally, unless we are going to live till eternity then "The Long Run" is irrelevant in real time betting. The writer errs when dealing with betting the First and Second dozens together. Using the 1-18 bet we can lower the odds against us. Placing three chips on 1-18 and one chip on the six-line 19-24 benefits us should zero occur whereas betting the two dozens does not. To my mind, there is an all too casual attitude to discussing roulette and this is exemplified in this article.Also- but not here -there is usually a knee-jerk reaction to anyone who rejects the notion that you are certain to lose. Claims of certainty -to win or lose -are unjustifiable where uncertainty clearly reigns. Gambling is Gambling is Gambling .