Tossing a coin 500 times

To be honest, one of the reasons for starting the thread was to get other people to take part themselves & compare results (and let other people share the donkey work!).

I'm short this now 20 flips of a thai 50 satang coin.jpg
 
Aren't you reinventing the wheel. Over the very long term, it will be 50:50. You can just do a monte carlo simulation, if you must.
 
Aren't you reinventing the wheel. Over the very long term, it will be 50:50. You can just do a monte carlo simulation, if you must.

Well 500 flips isn't long term enough then (or perhaps 500 is too long term) as it had a 52:48 split when i did it. How long term do i need to go to achieve a 50:50 split?

Still 52:48 is fairly even.
 
To be honest, one of the reasons for starting the thread was to get other people to take part themselves & compare results (and let other people share the donkey work!).

Ok, I didn't do the toin cossing but I did another thing couple of years ago.
Picking 4 cards from a full deck trying to get at least a pair.

Amazingly enough, at one point I had a 4 four a kind...
You realize what the odds for that are? About 1 in a 6,5 million.

Let's see if I can come up with 50 heads in a row :cheesy:
 
Well 500 flips isn't long term enough then (or perhaps 500 is too long term) as it had a 52:48 split when i did it. How long term do i need to go to achieve a 50:50 split?

Still 52:48 is fairly even.

What do you mean with a 50:50 split? Chances that you will achieve a perfect 50:50 split are slim, but unless you define the maximum error, you have no way to calculate how many times you need to flip a coin.

I'll give an example later on.
 
What do you mean with a 50:50 split? Chances that you will achieve a perfect 50:50 split are slim, but unless you define the maximum error, you have no way to calculate how many times you need to flip a coin.

I'll give an example later on.

From my 500 - i have 260 heads and 240 tails. If i continue to flip, eventually i will get back to a perfect 50:50 split. Perhaps that is when i should stop flipping.
 
I was having a conversation with a friend yesterday about consecutive losing trades. He knew of one chap who was previously profitable when he then managed to make 36 consecutive losing trades. The odds of that must be quite low.

Also one of the best statisticians I have come across is T2W member Scripophilist. I was looking through his site one day and was interested to see that he often approaches probability from a different angle such as rather than trying to determine the probability of an event turn it round and work out the probability of the event not happening.

As an example: How many people would you need to have in a room to have a high probability that two have the same birthday ?


Paul
 
I was having a conversation with a friend yesterday about consecutive losing trades. He knew of one chap who was previously profitable when he then managed to make 36 consecutive losing trades. The odds of that must be quite low.
....
Paul

Yes this is (part of) the kind of reason why i did the flipping experiment. To see how long A can persist over B, when there is seemingly a 50:50 chance.

Not that with every tpe of trade there is a 50:50 chance of failure:success - although this is probably so given the optimum SL and PT for example.

I was thinking about for one of my strats, exiting a trade and S.A.R.ing early, minutes before the start of a new bar, ofr practicality reasons, if the SAR looks like a certainity. This would mean that -
1) it makes no difference as price will be at the same level in 1 minute.
2) you miss out as - eg. close a long and open a short, but at the open of the new bar price has moved higher, so you didn't make as much as you should have done on the long, and the short was opened at a lower price than it could/should have been.
3) You gain - eg. close a long and open a short, but at the open of the new bar price has moved lower, so you exited the long for more profit, and entered the SAR short at a better/higher price than you would have done if you'd waited for the open of the next bar.

Number 1 = makes no difference to results overall. i basically just pay the spread.
Numbers 2 & 3 = there should be a 50:50 split in terms of benefit v's losing out, given this 50:50 split.

I just wanted to examine the probability of a 50:50 chance - being just that - an even split, or working for or against you.
 
Last edited:
Yes this is (part of) the kind of reason why i did the flipping experiment. To see how long A can persist over B, when there is seemingly a 50:50 chance.

Have you considered Russian Roulette? Much better odds, I hear.
 
Also one of the best statisticians I have come across is T2W member Scripophilist. I was looking through his site one day and was interested to see that he often approaches probability from a different angle such as rather than trying to determine the probability of an event turn it round and work out the probability of the event not happening.

As an example: How many people would you need to have in a room to have a high probability that two have the same birthday ?

Paul

Most statistical problems are solved much faster by turning the question around. It's very common to use the standard approach, but often looking at the question from the other viewpoint will make you find the solution much easier. Example:

Suppose chances are 1 out of 10 that you get the flu after coming in touch with one infected person (we call these odds 'p'). Suppose you come in touch with two different persons who have the flu. Your chances would increase right? However, must people will multiply the odds and come up with 1/10 x 1/10 = 1/100 which is obviously incorrect.

Multiplying the odds of not getting infected (9 out of 10 or '1-p') will give you the right answer: 9/10 x 9/10 = 81/100 => meaning there is a 19% chance you will get infected after coming in contact with two persons who have the flu.

Btw, could you give me the URL of Scripophilist's site? I don't know him, but it sounds interesting...
 
365+ would give a better than 50% chance i think.

This is one of the very popular misconceptions where people mistakenly assume the odds to be much smaller than they are in reality.(*)

A rule of thumb for making an estimate about how high the minimum number of values (in this case, people) who share a common aspect (in this case, day of birth) has to be in order to be >50% (more than just random), is to take the square root of 1.4 times the number of possible values.

In the bday example, this results in:

sqrt of (1.4 x 365) = 22,61. As we are talking about 'complete' persons, we have to round this to the upside so the answer is 23; as rightly posted by Bramble.

__________

(*)
Talking about common misconceptions and counterintuitive problems, the next one is one of my personal favourites:

Suppose you're on a game show, and you're given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1, and the host, who knows what's behind the doors, opens another door, say No. 3, which has a goat. He then says to you, "Do you want to pick door No. 2?" Is it to your advantage to switch your choice?
I won't elaborate on this, because it might get a bit off-topic, but it's a classic, known as the Monty Hall problem. Anybody who thinks they should not change doors, should really look it up.
 
Last edited:
I will send it by PM as I am not sure if he would want it posted in the board.


Paul
 
And to think i started this thread with the intention of a serious discussion :eek:.

I do apologize JT, :eek:, for my frivolity.
Flipping coins may not be as applicable to trading, as there is a spread to pay.
eg, with spread, you may have to win 103 pips to every 100 pips lost to break even, etc

if you have a sense of trend, you are essentially betting on an unfair coin, in that it the market/coin is already tending to move up/down, giving you a chance to bet when the direction may already be known

coin flips do not factor in different risk/rewards. trades can be 3:1, but coins always 1:1

all kinds of stuff.
the only advice I could give is dont flip coins when the 1:30pm PPI news is coming out, else you could get royally spiked.
(memo to self: print off the days major news events and nail it to my screen)
 
From my 500 - i have 260 heads and 240 tails. If i continue to flip, eventually i will get back to a perfect 50:50 split. Perhaps that is when i should stop flipping.

Ok, I promised I'd give you an example. Firstly you need to define what a 50:50 split is. Are you happy with a 49,99 versus 50,01 split? Or do you want a 49,9999 versus 50,0001 accuracy? In case you want a perfect split - as Tony said - stop reading and continue flipping coins ;)

If on the other hand, you're getting bored, than this might interest you.

Suppose you want the maximum error to be no more than 1% (the % distribution is 49 <> 51), then let n be the number of times you have to flip a coin.

n equals z^2 / (4*max_error^2), so n = z^2 / (4*0.01^2)

What is z? Z is the standardized z-value we use to denote the confidence interval we need in order to determine how reliable are results are. If we want to be 95% sure are results are reliable, we have a Z-value of 1.9599 (**).

So this means n = (1.9599)^2 / (4* 0.01^2) = 9603 flips.

If you want the maximum error to be no more than 0.01% (the % distribution is 49.99 <> 50.01), then you need to flip n = (1.9599)^2 / (4* 0.0001^2) = 96030200 flips.

Let me know when you're finished Jtrader ;)


_______
(*) Using standardized values makes it easier to calculate the solution. The empirical rule denotes that around 68% of all the values from a normal distribution are within one times the standard devation away from the mean; 95% of the values are within two standard deviations and about 99.7% are within 3 times the stdev.

(**) I had to look up z-values because I don't know all of them by heart (I used to, but I'm getting old lol) in a standard score statistics table for a normal distribution.
 
Most statistical problems are solved much faster by turning the question around. It's very common to use the standard approach, but often looking at the question from the other viewpoint will make you find the solution much easier. Example:

Suppose chances are 1 out of 10 that you get the flu after coming in touch with one infected person (we call these odds 'p'). Suppose you come in touch with two different persons who have the flu. Your chances would increase right? However, must people will multiply the odds and come up with 1/10 x 1/10 = 1/100 which is obviously incorrect.

Multiplying the odds of not getting infected (9 out of 10 or '1-p') will give you the right answer: 9/10 x 9/10 = 81/100 => meaning there is a 19% chance you will get infected after coming in contact with two persons who have the flu.

Btw, could you give me the URL of Scripophilist's site? I don't know him, but it sounds interesting...

I don't think this is correct. It is an OR function, not an AND function: OR is adding the odds, AND is multiplying.

You have a 1/10 chance if you touch person A OR B, so 1/10 + 1/10 = 2/10 = 20%
 
Top