# Thread: Mathematics and precedence rules

1. ## Re: Mathematics and precedence rules

Originally Posted by nedz
Assuming Einstein was right: then the universe has a parabolic geometry.

Euclidean geometry is hyperbolic. (See Euclid:postulate 5)
Rather by construction, hyperbolic geometry is non-Euclidean. Euclidean geometry extends neutral geometry with the parallel postulate: that for every line and every point not on that line, there exists a single unique line through the point parallel to the given line.

Hyperbolic geometry assumes the logical negation of this postulate given the axioms of neutral geometry: that there exists at least one line and at least one point not on that line such that there exists more than one line through the point parallel* to the given line. It's a fairly simple proof to show that in a hyperbolic geometry, for any line and any point not on the line, there exist infinite lines through the point parallel to the original line.

You can of course define pi as the limit of a sequence (and there are a lot of sequences that converge to pi) but I rather prefer the geometric definition. It's rather more aesthetically pleasing.

*In the sense 'does not intersect.' Maintaining the same distance across space, having common perpendiculars, etc turn out to be logically equivalent to the parallel postulate. As does the sum of interior angles of a triangle being 180 degrees, and the existence of rectangles.

(elliptic geometry assumes that parallel lines do not exist. Since the existence of parallel lines can be proven in neutral geometry, this makes it rather a separate beast than Euclidean/hyperbolic geometries, which simply extend the neutral axioms.)

2. ## Re: Mathematics and precedence rules

Originally Posted by Heliomance
PROBABILITY DOES NOT WORK THAT WAY!

An event with P(x) = 0 cannot happen. Ever. No, not even then. If it's technically possible, the probability is not zero. It can be infinitesimally small, but not zero.
http://en.wikipedia.org/wiki/Almost_surely , pi will be irrational in a given location.

3. ## Re: Mathematics and precedence rules

Originally Posted by Heliomance
Ah, but consider a 10' blast. It consists of 12 squares which have an area of 300 sq ft. Thus Pi must clearly be 3.
Pi is the ratio between the diameter and the circumference, now look at the template and measure the circumference, Pi=4

Originally Posted by warty goblin
Rather by construction, hyperbolic geometry is non-Euclidean. Euclidean geometry extends neutral geometry with the parallel postulate: that for every line and every point not on that line, there exists a single unique line through the point parallel to the given line.

Hyperbolic geometry assumes the logical negation of this postulate given the axioms of neutral geometry: that there exists at least one line and at least one point not on that line such that there exists more than one line through the point parallel* to the given line. It's a fairly simple proof to show that in a hyperbolic geometry, for any line and any point not on the line, there exist infinite lines through the point parallel to the original line.

You can of course define pi as the limit of a sequence (and there are a lot of sequences that converge to pi) but I rather prefer the geometric definition. It's rather more aesthetically pleasing.

*In the sense 'does not intersect.' Maintaining the same distance across space, having common perpendiculars, etc turn out to be logically equivalent to the parallel postulate. As does the sum of interior angles of a triangle being 180 degrees, and the existence of rectangles.

(elliptic geometry assumes that parallel lines do not exist. Since the existence of parallel lines can be proven in neutral geometry, this makes it rather a separate beast than Euclidean/hyperbolic geometries, which simply extend the neutral axioms.)
The analysis is generally done using an ideal line at infinity.

In a parabolic geometry parallel lines meet at infinity. This is the geometry used in computer graphics.

In Euclidean geometry they don't ever meet. Euclidean geometry is the degenerate case of a hyperbolic geometry where the number of parallel lines, through the given point, in the set = 1.

In Elliptical geometry the set of parallel lines meet before infinity.

4. ## Re: Mathematics and precedence rules

Originally Posted by Saposhiente
http://en.wikipedia.org/wiki/Almost_surely , pi will be irrational in a given location.
Kolmogorov's axioms of probability don't work for all subsets of R, only Borel sets, which are generated by countably infinite unions/intersections of lengths. The Borel sets - even the extended Borel sets - are smaller in carnality than the power set of R, which means you can't make probability statements about a set without first ensuring it's in B. Strange things start to happen when you play with unmeasurable sets, like being able to dissemble solid sphere of radius one into disjoint pieces, move them through space without intersecting any of them, and assemble them into two or more disjoint solid spheres of radius one.

In this case, you can't easily. Writing I for the set of irrationals, it's not hard to see that I isn't a Borel set, since it contains an uncountable number of points - it follows that Q, the rationals, isn't either since the Borels are closed under complements and Q = I'.

With some limiting arguments that I honestly cannot remember, you can show that the Lebesque integral with respect to the Lebesque measure of f(x) = 0 (x rational), f(x) = 1 (x irrational) over a finite interval is zero. Because of the way the Lebesque integral is calculated, I'm fairly sure this can't be extended to (0, infinity) though.

Note however that showing an event has probability zero is somewhat different from saying it can't happen. Applied strictly, this would mean that any observation of a continuous variable has probability zero, despite having just been done. Usually people get around this by arguing that continuous random variables are really just approximations to a fabulously complicated discrete reality, but I don't think that really works here. If nothing else there's somewhere where gravitational curvature is continuous over an interval, which I think implies that circumference/diameter is also a continuous function. If it varies at all, it attains a rational value. You have probability zero of choosing a particular gravity such that this happens at random from all possible gravities , but that does not mean it doesn't happen.

For an easier example, consider the distribution f(x) = x over [0,1]. Y attains values 0, 1/2, and 1, but you have zero probability of choosing them at random from all values y attains.

(Unless one decides the entire universe is actually discrete, and continuity is always a vastly more tractable approximation, in which case all bets are off.)

5. ## Re: Mathematics and precedence rules

Originally Posted by nedz
Pi is the ratio between the diameter and the circumference, now look at the template and measure the circumference, Pi=4

The analysis is generally done using an ideal line at infinity.

In a parabolic geometry parallel lines meet at infinity. This is the geometry used in computer graphics.

In Euclidean geometry they don't ever meet. Euclidean geometry is the degenerate case of a hyperbolic geometry where the number of parallel lines, through the given point, in the set = 1.

In Elliptical geometry the set of parallel lines meet before infinity.
Ah, I see. We're using different, contradictory terminologies for essentially the same thing. I learned this stuff in terms of progressions of axioms, so that's how I classify it, but that way works too.

Although I'm a bit baffled by defining lines that intersect before infinity as parallel.

6. ## Re: Mathematics and precedence rules

Originally Posted by warty goblin

(Unless one decides the entire universe is actually discrete, and continuity is always a vastly more tractable approximation, in which case all bets are off.)
The entire universe is pretty much actually discrete. The jury is still out on how exactly it's discrete at the fundamental level, but everything else in the universe is discrete.

Just wanted to throw that out there.

7. ## Re: Mathematics and precedence rules

Since we have so many good mathematicians here, can someone please explain the Gambler's fallacy to me?

Let's imagine that I flip a fair coin. I throw 48 tails in a row.

It's still a 0.5 probability that I'll get tails again on the next throw.

On the other hand, the probability that I will throw 49 tails in a row is 0.5^49 = something e-15.

So ... the coin has no memory of my previous flips. Therefore I can't say that a heads flip is "due" or bound to happen. But at the same time, it would be very unwise of me to continue betting that I will continue to throw tails successively. I've already done terrible things to the laws of probability already to get this current result, and I can't assume I will continue to beat those odds forever.

So perhaps the gambler's fallacy, although logically inaccurate , nonetheless grasps an intuitive point: A gambler can instinctively tell when his streak, winning or losing, is exceeding reasonable probability and therefore it may be time to change his bet.

After all, in my example above, there are two ways of looking at the bet: One is a bet that I will flip the coin tails once out of 1 flip. The other is to view it as a bet that I will flip 49 tails in a row. The fact that 48 of those tails have already happened doesn't change the essential fact that I'm gambling that I can flip 49 tails in a row. And that is a bad bet.

So .. anyone want to unravel this web of assumptions? Preferably somebody who is good at both math AND gambling? :)

Respectfully,

Brian P.

8. ## Re: Mathematics and precedence rules

You're making the same mistake as the fallacy is talking about--you're thinking, deep in your heart, that probability must have some sort of memory and thus there is such a thing as having too much good luck. This is not the case. If you get heads 100 times while flipping a coin, the probability of the next coin being heads is still 50/50.

Casinos and other gambling establishments play on this--they set up the odds in such a way that you have a reasonable chance of winning, because not even the most foolish gambler will keep playing a game they never win at; however, the overall result will always be that the house takes more money from the gamblers than the gamblers win back from the house. In the simple heads/tails example, they might charge 50p for a coin flip and allow you to win 90p if you get heads but nothing for tails; on average, this still nets them £1 in income for every 90p they pay out, so they're happy, and the gamblers still win often enough to keep them playing.

9. ## Re: Mathematics and precedence rules

I'm not sure I follow. You're right in that this is what gambling houses do. I'm told that casinos calculate their expected earnings for a given table thus:

Revenue = House Edge * Bets.

Where "bets" is the total money put down and "house edge" is the probability that the house will win any given bet.

So from a Casino's point of view, the gambler's fallacy would encourage me. If I were to walk the floor and see someone winning twenty hands of blackjack in a row, I would first send Vinnie and Louis the Louse to ensure he wasn't cheating. Once I was sure this really was the result of blind luck, I'd let him continue playing. After all, the laws of probability can't be mocked forever. If he keeps playing at that probability, not only will I eventually win it all back but I'll get his starting stake too. It may not happen on the next hand or the next twenty hands. It may take several years, but it will happen. Meanwhile the winnings will encourage OTHER people to put down money at bad bets, resulting in even more cash for me.

How am I , as the Casino owner, not succumbing to the gambler's fallacy?

This leads up to my sure-fire foolproof system to winning at gambling: Buy a casino and make the laws of probability work for, rather than against, you :).

Respectfully,

Brian P.

10. ## Re: Mathematics and precedence rules

Originally Posted by pendell
It's still a 0.5 probability that I'll get tails again on the next throw.
Assuming a fair coin and a fair thrower, yes, the odds will always be 50% of heads or tails, no matter what has happened before. (Ignoring the possibility that the coin could land on it's edge, or for some reason, not land at all.)

Originally Posted by pendell
On the other hand, the probability that I will throw 49 tails in a row is 0.5^49 = something e-15.
The odds of throwing any specific combination of 49 results would be the same. The odds of getting a random-seeming result were exactly the same, you happen to exist in the universe where that one particular sequence came up.

11. ## Re: Mathematics and precedence rules

Originally Posted by warty goblin
Kolmogorov's axioms of probability don't work for all subsets of R, only Borel sets, which are generated by countably infinite unions/intersections of lengths. The Borel sets - even the extended Borel sets - are smaller in carnality than the power set of R, which means you can't make probability statements about a set without first ensuring it's in B. Strange things start to happen when you play with unmeasurable sets, like being able to dissemble solid sphere of radius one into disjoint pieces, move them through space without intersecting any of them, and assemble them into two or more disjoint solid spheres of radius one.

In this case, you can't easily. Writing I for the set of irrationals, it's not hard to see that I isn't a Borel set, since it contains an uncountable number of points - it follows that Q, the rationals, isn't either since the Borels are closed under complements and Q = I'.

With some limiting arguments that I honestly cannot remember, you can show that the Lebesque integral with respect to the Lebesque measure of f(x) = 0 (x rational), f(x) = 1 (x irrational) over a finite interval is zero. Because of the way the Lebesque integral is calculated, I'm fairly sure this can't be extended to (0, infinity) though.

Note however that showing an event has probability zero is somewhat different from saying it can't happen. Applied strictly, this would mean that any observation of a continuous variable has probability zero, despite having just been done. Usually people get around this by arguing that continuous random variables are really just approximations to a fabulously complicated discrete reality, but I don't think that really works here. If nothing else there's somewhere where gravitational curvature is continuous over an interval, which I think implies that circumference/diameter is also a continuous function. If it varies at all, it attains a rational value. You have probability zero of choosing a particular gravity such that this happens at random from all possible gravities , but that does not mean it doesn't happen.

For an easier example, consider the distribution f(x) = x over [0,1]. Y attains values 0, 1/2, and 1, but you have zero probability of choosing them at random from all values y attains.

(Unless one decides the entire universe is actually discrete, and continuity is always a vastly more tractable approximation, in which case all bets are off.)
Surely its easier to just use elementary analysis ?

If f(x) is continuous and i1 < p/q < i2; where i1, i2 ϵ I and p/q ϵ R then f(p/q) must exist.

Originally Posted by warty goblin
Although I'm a bit baffled by defining lines that intersect before infinity as parallel.
Welcome to Elliptical geometry.

12. ## Re: Mathematics and precedence rules

Originally Posted by pendell
I'm not sure I follow. You're right in that this is what gambling houses do. I'm told that casinos calculate their expected earnings for a given table thus:

Revenue = House Edge * Bets.

Where "bets" is the total money put down and "house edge" is the probability that the house will win any given bet.

So from a Casino's point of view, the gambler's fallacy would encourage me. If I were to walk the floor and see someone winning twenty hands of blackjack in a row, I would first send Vinnie and Louis the Louse to ensure he wasn't cheating. Once I was sure this really was the result of blind luck, I'd let him continue playing. After all, the laws of probability can't be mocked forever. If he keeps playing at that probability, not only will I eventually win it all back but I'll get his starting stake too. It may not happen on the next hand or the next twenty hands. It may take several years, but it will happen. Meanwhile the winnings will encourage OTHER people to put down money at bad bets, resulting in even more cash for me.

How am I , as the Casino owner, not succumbing to the gambler's fallacy?

This leads up to my sure-fire foolproof system to winning at gambling: Buy a casino and make the laws of probability work for, rather than against, you :).

Respectfully,

Brian P.
Ah, probability confusion! Something I'm actually somewhat qualified to talk about!

So your confusion from your first post stems from not taking conditional probabilities into account.

In your first example, you are correct that the odds of your next flip being heads is 1/2. You are also right that your probability of getting 49 heads in a row is very, very bad. But your chances of getting 49 heads in a row given you have gotten 48 heads in a row is the same as the probability of getting heads on any flip of the coin: 1/2

You can think about this intuitively. At this point in time, you have flipped 48 heads. After the forty-ninth flip, you can have either of two outcomes: 49 heads in a row, or 48 heads followed by one tail. Since heads or tails are equally likely, both have probability 1/2 of happening, given you already have the 48 heads. Ergo, given 48 heads, the probability of getting a 49th is 1/2.

In more theoretical terms, conditional probability for events is defined as P(A | B) = P(A and B)/P(B), where A is any event (such as getting 49 heads), B is any event with non-zero probability. The | is read 'given' here.

The intuition for this weird definition is that since B has happened, you are only interested in the parts of A that can happen concurrently with B. You divide by B because you have to adjust for the change in P(A and B) due to B having happened - intuitively you are counting the number of outcomes in A and B, then dividing by the number in B. (This last sentence is technically incorrect in many cases, but don't worry about that here)

Take-away: You aren't betting on getting 49 heads, you're betting on getting one more head.

OK, for your second confusion, casinos care mostly about expected values, which are probability weighted averages. Simply put, you take each outcome of a game, multiply that by the probability, and add 'em all up. If all outcomes are equally likely, this is just your bog standard arithmetic mean. It's easiest to think about it as the value the average winnings approach as you play lots and lots of games.

So here's an example. Suppose the buy-in for a game is \$5. Suppose furthermore than the gambler will win \$10 with probability 1/4, and therefore lose with probability 3/4. The casino's expected income is
5*P(gambler loses) - 10*P(gambler wins)
= 5(3/4) - 10(1/4) = 5/4, or \$1.25

Assuming the casino has a reasonable amount of money in the vault, it won't care about whether or not somebody wins or loses an individual game. It won't even matter if somebody always wins (as long as they aren't cheating). They are, on average, making money.

The difference between this and the first example is that the casino is basically playing the long game. The gambler only cares about the next flip. You shouldn't gamble not because you will lose money, but because you will probably eventually lose money, and the more you gamble, the more likely it is that you come out behind.

Hope that helps.

13. ## Re: Mathematics and precedence rules

Originally Posted by Saposhiente
http://en.wikipedia.org/wiki/Almost_surely , pi will be irrational in a given location.
...nothing to see here. I didn't just make a fool of myself, no sir.
*flees*

Originally Posted by nedz
Pi is the ratio between the diameter and the circumference, now look at the template and measure the circumference, Pi=4
Alternatively, it's the ratio between the square of the radius and the area. In Euclidean space, that definition works just as well.

14. ## Re: Mathematics and precedence rules

Originally Posted by pendell
Since we have so many good mathematicians here, can someone please explain the Gambler's fallacy to me?

Let's imagine that I flip a fair coin. I throw 48 tails in a row.

It's still a 0.5 probability that I'll get tails again on the next throw.

On the other hand, the probability that I will throw 49 tails in a row is 0.5^49 = something e-15.

So ... the coin has no memory of my previous flips. Therefore I can't say that a heads flip is "due" or bound to happen. But at the same time, it would be very unwise of me to continue betting that I will continue to throw tails successively. I've already done terrible things to the laws of probability already to get this current result, and I can't assume I will continue to beat those odds forever.

So perhaps the gambler's fallacy, although logically inaccurate , nonetheless grasps an intuitive point: A gambler can instinctively tell when his streak, winning or losing, is exceeding reasonable probability and therefore it may be time to change his bet.

After all, in my example above, there are two ways of looking at the bet: One is a bet that I will flip the coin tails once out of 1 flip. The other is to view it as a bet that I will flip 49 tails in a row. The fact that 48 of those tails have already happened doesn't change the essential fact that I'm gambling that I can flip 49 tails in a row. And that is a bad bet.

So .. anyone want to unravel this web of assumptions? Preferably somebody who is good at both math AND gambling? :)

Respectfully,

Brian P.
Well...I dropped stats, I'm just going by common sense, but if you had bet at the beginning that you would get 49 tails in a row, that would have been a long shot. But if you've already gotten 48 tails in a row, and you're betting on the outcome of the next flip, odds are even either way. The issue is that if you're betting on the single flip, people tend to factor in the previous 48 when that actually has nothing to do with the next flip. There's no cosmic balancing book that says the number of heads and tails absolutely has to balance; it's just highly likely that it will after a while. Even so, I once sat and flipped a coin a thousand times and got something like 560-something heads, if I remember that rightly.

15. ## Re: Mathematics and precedence rules

Originally Posted by Heliomance
Alternatively, it's the ratio between the square of the radius and the area. In Euclidean space, that definition works just as well.
But for a 5' blast, by the area method, Pi = 4

More seriously: I find it interesting that in the square board geometry Pi is always an integer ?

16. ## Re: Mathematics and precedence rules

I don't think it is, not if you calculate it by the area. On a square board, the ration of diameter to circumference is always exactly 4. I think that the ration of the radius squared to area approaches pi as the "circle" increases in size, though, if memory serves.

17. ## Re: Mathematics and precedence rules

OK - that's what I get for just using 2 samples.

two more examples

20' radius = 44 squares = 1100 square feet so Pi = 2.75

40' radius = 172 squares = 4300 square feet so Pi = 2.6875

I think that this may require more thought ?

18. ## Re: Mathematics and precedence rules

Originally Posted by warty goblin
Note however that showing an event has probability zero is somewhat different from saying it can't happen. Applied strictly, [...]
Umm yeah, that's kind of exactly what I said.
Originally Posted by pendell
Gambler's fallacy stuff
Here is the difference:
The probability of a fair coin coming up heads 50 times in a row is 1/250 (Very small). The probability of a fair coin coming up heads 50 times in a row given that the first 49 flips are guaranteed to come up heads (In this case, because you have already observed that they have. But you can also pretend that you're a time traveler and looked into the future before flipping. Etc...) is 50/50.

One thing to note though, is that while the number of times heads has come up in a row doesn't change the probability of the next flip being heads on a fair coin, it does increase the probability that the coin is not actually fair. So if given even odds on a real-life coin, after 49 headflips, you should bet on heads. Thus, the gambler's fallacy suggests the opposite of the correct move*

*Unless you're using a guaranteed-fair pseudorandom computer RNG. RNGs use an algorithm to effectively just cycle through a long list of random numbers where each number comes up the same number of times. Thus, if a bunch of the numbers in the list that cause one thing to happen come up at the same time, those instances of those numbers aren't going to come up again until the list is run through (which is almost never; instead it's generally when you restart your computer/program). Of course the list is so large that the effect is negligible, and other more complicated things can negate the effect; thus unless you are absolutely certain that the coin is indeed fair you should still take the advice opposite of the Gambler's Fallacy.
(If none of that made any sense, try replacing the coin with a deck of cards with face cards removed, with heads being even numbers and tails being odd numbers. The Gambler's fallacy will hold true with this for similar reasons.)

Casino stuff: House edge isn't the probability that the house wins; it's how much more likely it is for the house to win (Adjusted as necessary if the house gets less money when it whens than it has to give out if the player wins). Eg. even the best blackjack player can still only win ~47% of the time without cheating. The 47% where the player wins cancels out with 47% that the house wins, leaving 53%-47%=6% where the house gains the bet in money on average.

nedz: It should approach pi, however rounding methods can change this.

19. ## Re: Mathematics and precedence rules

Originally Posted by Saposhiente
nedz: It should approach pi, however rounding methods can change this.
Yes I know. What I'm interested in is why it doesn't.
I suspect that the issue is with the WotC circle templates.

20. ## Re: Mathematics and precedence rules

Can we establish what it does approach, I wonder. How big do the templates go, and how easy is it to extrapolate larger?

21. ## Re: Mathematics and precedence rules

The only other one is the 80 foot one, which is: 684 squares = 17100 feet2
So Pi = 2.671875 here

Time to get the compasses out I think

22. ## Re: Mathematics and precedence rules

OK - they are rounding very badly.
The 20' radius should look like

OOOOOOOO
OOOOOOOO
OOOOOOOO
OOOOOOOO
OOOOOOOO
OOOOOOOO
OOOOOOOO
OOOOOOOO

Rather than

OOOOOOOO
OOOOOOOO
OOOOOOOO
OOOOOOOO
OOOOOOOO
OOOOOOOO
OOOOOOOO
OOOOOOOO

i.e.
52 squares instead of 44 squares
Yielding a Pi of 3.25.
Which is a lot better than the 2.75 we got previously.

23. ## Re: Mathematics and precedence rules

Originally Posted by nedz
OK - they are rounding very badly.
The 20' radius should look like

OOOOOOOO
OOOOOOOO
OOOOOOOO
OOOOOOOO
OOOOOOOO
OOOOOOOO
OOOOOOOO
OOOOOOOO

Rather than
OOOOOOOO
OOOOOOOO
OOOOOOOO
OOOOOOOO
OOOOOOOO
OOOOOOOO
OOOOOOOO
OOOOOOOO

i.e.
52 squares instead of 44 squares
Yielding a Pi of 3.25.
Which is a lot better than the 2.75 we got previously.
Wait since when did we think WotC knew how to do things right?

24. ## Re: Mathematics and precedence rules

Originally Posted by noparlpf
Wait since when did we think WotC knew how to do things right?
Given that they're modeling things that often should be following the inverse square law, rounding area down seems pretty reasonable. Let's face it, most people don't play RPGs for their accurate approximations of mathematical constants.

If they did, pretty much everybody would just play as 'e' anyway, and have irrational fears about forests. It's well known that pieces of wood can reduce an exponentially good time to a linear railroaded crawl. Fortunately since default mathematical adventures are set in the real plane, trees are only supported in 'applied' computer science sorts of modules scorned by most 'pure' math players. There would of course be the occasional annoying dude who insists on playing as 'i' and complains when magnitude monsters conjugate all his imaginary abilities away, leaving him perfectly flat.

...dear god, that may be the nerdiest thing I've ever written.

25. ## Re: Mathematics and precedence rules

Originally Posted by warty goblin
Given that they're modeling things that often should be following the inverse square law, rounding area down seems pretty reasonable. Let's face it, most people don't play RPGs for their accurate approximations of mathematical constants.
Its not the constant that's the problem, its the badly drawn circle.
Originally Posted by warty goblin
If they did, pretty much everybody would just play as 'e' anyway, and have irrational fears about forests. It's well known that pieces of wood can reduce an exponentially good time to a linear railroaded crawl. Fortunately since default mathematical adventures are set in the real plane, trees are only supported in 'applied' computer science sorts of modules scorned by most 'pure' math players. There would of course be the occasional annoying dude who insists on playing as 'i' and complains when magnitude monsters conjugate all his imaginary abilities away, leaving him perfectly flat.
I'm sure that the default is Complex, definitely something imaginary involved.

26. ## Re: Mathematics and precedence rules

Originally Posted by nedz
Its not the constant that's the problem, its the badly drawn circle.
Well as I said, rounding downwards makes sense for blast templates.

I'm sure that the default is Complex, definitely something imaginary involved.
Imagination in numbers is highly overrated*. Except for eleventeen and thirtytwelve, but you have to be a tiger to use them.

*Complex Analysis: where joy goes to die.

27. ## Re: Mathematics and precedence rules

Originally Posted by warty goblin
Well as I said, rounding downwards makes sense for blast templates.
I haven't done the integration, though its not hard so I might, but by eye they have rounded 0.85 down !

Originally Posted by warty goblin
Imagination in numbers is highly overrated*. Except for eleventeen and thirtytwelve, but you have to be a tiger to use them.

*Complex Analysis: where joy goes to die.
Euler's Identity says "Hi"

28. ## Re: Mathematics and precedence rules

Originally Posted by warty goblin
Ah, probability confusion! Something I'm actually somewhat qualified to talk about!

Spoiler

So your confusion from your first post stems from not taking conditional probabilities into account.

In your first example, you are correct that the odds of your next flip being heads is 1/2. You are also right that your probability of getting 49 heads in a row is very, very bad. But your chances of getting 49 heads in a row given you have gotten 48 heads in a row is the same as the probability of getting heads on any flip of the coin: 1/2

You can think about this intuitively. At this point in time, you have flipped 48 heads. After the forty-ninth flip, you can have either of two outcomes: 49 heads in a row, or 48 heads followed by one tail. Since heads or tails are equally likely, both have probability 1/2 of happening, given you already have the 48 heads. Ergo, given 48 heads, the probability of getting a 49th is 1/2.

In more theoretical terms, conditional probability for events is defined as P(A | B) = P(A and B)/P(B), where A is any event (such as getting 49 heads), B is any event with non-zero probability. The | is read 'given' here.

The intuition for this weird definition is that since B has happened, you are only interested in the parts of A that can happen concurrently with B. You divide by B because you have to adjust for the change in P(A and B) due to B having happened - intuitively you are counting the number of outcomes in A and B, then dividing by the number in B. (This last sentence is technically incorrect in many cases, but don't worry about that here)

Take-away: You aren't betting on getting 49 heads, you're betting on getting one more head.

OK, for your second confusion, casinos care mostly about expected values, which are probability weighted averages. Simply put, you take each outcome of a game, multiply that by the probability, and add 'em all up. If all outcomes are equally likely, this is just your bog standard arithmetic mean. It's easiest to think about it as the value the average winnings approach as you play lots and lots of games.

So here's an example. Suppose the buy-in for a game is \$5. Suppose furthermore than the gambler will win \$10 with probability 1/4, and therefore lose with probability 3/4. The casino's expected income is
5*P(gambler loses) - 10*P(gambler wins)
= 5(3/4) - 10(1/4) = 5/4, or \$1.25

Assuming the casino has a reasonable amount of money in the vault, it won't care about whether or not somebody wins or loses an individual game. It won't even matter if somebody always wins (as long as they aren't cheating). They are, on average, making money.

The difference between this and the first example is that the casino is basically playing the long game. The gambler only cares about the next flip. You shouldn't gamble not because you will lose money, but because you will probably eventually lose money, and the more you gamble, the more likely it is that you come out behind.

Hope that helps.
It does, thank you.

The "gambler's fallacy" is the assumption that the next event is dependent when, in fact, it is independent. So a bet on a coin flip should be made without regard to previous history, assuming a fair coin.

By contrast, the casino isn't using the gambler's fallacy to predict a single event . It is, instead, playing the averages. It can reasonably expect that, if the probability of a casino win is 0.75 and a player win is 0.25, then the casino will make money *in the long run*, because the averages will smooth out deviations caused by someone being 'lucky'.

The casino is correctly using probability to predict an expected outcome over a statistically significant sample. The gambler is not, because he is attempting to use probability that works over long averages to predict a single event.

Incidentally, I once did some research to find out how professional gamblers make their living. Short answer: By having a great tolerance for debt and by being subsidized by casinos, as a professional gambler can be a sort of marketing stunt, since he advertises by example that gambling can be a 'success', even though it isn't.

Respectfully,

Brian P.

29. ## Re: Mathematics and precedence rules

The quick answer is this. The probability (now) that the coin already landed the way it did is 100%. It isn't a random event after it has happened.

So the probability that I will flip 49 heads in a row is 0.5^49 (roughly 0.0000000000000018).

But if I already flipped the first 48 heads, the probability that the 49th will also be heads is 0.5.

So Prob(49 heads in a row, given that 48 have already happened) is not the same thing as Prob(49 heads in a row, starting now).

If you want to understand it well, pick up a book on Bayesian probability. Budget a fair amount of time.

30. ## Re: Mathematics and precedence rules

Originally Posted by pendell
Incidentally, I once did some research to find out how professional gamblers make their living. Short answer: By having a great tolerance for debt and by being subsidized by casinos, as a professional gambler can be a sort of marketing stunt, since he advertises by example that gambling can be a 'success', even though it isn't.
It is possible to make a living as a professional gambler without being subsidized in that fashion, but it places heavy constraints on how you gamble. You do need a high tolerance for temporary debt regardless, but the main key is that you have to play games where skill can tip the odds and you have to have enough skill to tip the odds past the 50% point.

Perhaps the most famous example of this is black jack. It is possible, with absolutely statistically perfect play, to get the odds in black jack very close to 50-50 in general. It is further possible, assuming a standard 52-card deck, for variations in which cards have not yet been dealt to tip the odds past that point, and careful calculations can detect when this has happened. Most importantly, this happens frequently enough and by large enough margins that increasing the size of your bets when it happens can shift the overall odds in your favor. Do it well enough, and you can reliably beat the house.

A group of students from MIT famously took advantage of this in the 1980s to make quite a bit of money, but it suffers from the drawbacks of requiring extremely rigorous adherence to calculated strategy and provoking a hostile reaction from the casinos. Poker and its many variations offer the same possibility of skill tipping the odds, while being more interesting (in my opinion) and not offending the casinos because the losers are the other players. On the other hand, the standard of skill required is relative to your competition rather than an absolute, which puts you in an eternal arms race with all the other people with the same ambition.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•