After you click Calculate hash, you'll get a hex string in the results. The first four alphanumeric characters is the hex representation of your lucky number (from 0000 through ffff hex, or in decimal, 0 through 65,535 decimal). You can convert those values to decimal here:

I've spent all day re-downloading the blockchain after a hard drive failure corrupted my copy. Here's an update to the SatoshiDice stats. Looks like the site is up over 1000 BTC since the last time I posted.

Tried it a few times last night. Even picked the higher numbers. Lost every time.

What is the pick range of the magic number?

It's 0 through 65535 inclusive.

So when you play "lessthan 48000" you should win 73.2% of the time, and when you play "lessthan 64000" you should win 97.6% of the time.

I played lessthan 48000 3 times yesterday and only won once (luckily biggest of the 3 bets was the one that won). But the games are proveably fair - you can get the secret number they used to pick your magic number and validate that they did the maths correctly.

One guy was saying he lost over 60 "lessthan 8000" games in a row the other day, so long losing streaks are definitely possible, just very unlikely.

Tried it a few times last night. Even picked the higher numbers. Lost every time.

What is the pick range of the magic number?

It's 0 through 65535 inclusive.

So when you play "lessthan 48000" you should win 73.2% of the time, and when you play "lessthan 64000" you should win 97.6% of the time.

I played lessthan 48000 3 times yesterday and only won once (luckily biggest of the 3 bets was the one that won). But the games are proveably fair - you can get the secret number they used to pick your magic number and validate that they did the maths correctly.

One guy was saying he lost over 60 "lessthan 8000" games in a row the other day, so long losing streaks are definitely possible, just very unlikely.

I don't have very good luck with lotteries. Does the same carry over into bitcoin? :-P

I don't have very good luck with lotteries. Does the same carry over into bitcoin? :-P

Maybe. Lotteries usually have really bad house edges (around 50% or so), whereas SatoshiDice only currently takes 1.9%. So you're less likely to be unlucky at SatoshiDice, mathematically speaking. But when the flying spaghetti monster is out to get you, mathematical odds don't matter.

The house edge is determined by the payout when you win. The chance of winning is always the same - it picks a number between 0 and 65535 and you win if the number is less than 8000. Your calculation is off a little because 1 - 8000/65536 isn't 7/8, it's a little more than that.

I make it a one-in-17399 chance of losing all 75 bets, so still really unlucky. But then again 1-in-17k shots do happen. About once every 17k bets. And there have been over 600k bets.

>>> 1 / ((1 - 8000/65536.0) ** 75) 17398.822919111808

Quick comment: It's even unluckier than that, since it's 1 chance in 17399 of a run of 75 or less bets in a row not winning - so that's going to have required 17399 * 75 = 1304925 or more bets to make it likely to have occurred once.

Quick comment: It's even unluckier than that, since it's 1 chance in 17399 of a run of 75 or less bets in a row not winning - so that's going to have required 17399 * 75 = 1304925 or more bets to make it likely to have occurred once.

Enjoying you analysis so far - thanks for your work.

I'm not sure, but I don't think you should multiply by 75. Maybe add (75-1).

Consider flipping a fair coin. How many times do you need to flip before it is 'likely' to get 10 heads in a row?

It's a 1-in-1024 chance, so I would say you need to flip 1024 + (10-1) = 1033 coins to have a reasonable chance of 310 heads in a row.

By your (implied) logic would you say you need 1024*10 = 10240 flips to make it likely?

I just ran a simulation. Flipping coins until getting 10 in a row, and counting how many flips it took. I tried it 100,000 times. 116 (0.12%) of those times the first 10 coins were all heads. To have a 1% chance of getting 10 heads in a row I had to flip 29 times. For 10% I had to flip 221 coins, etc. Flipping 1033 coins gives a 39.71% chance of getting 10 heads in a row.

But flipping 10239 coins gives a huge 99.34% chance.

I have a feeling this is a binomial distribution thing, so I should be able to work out the maths rather than doing it by simulation. But I think that after 17399 * 75 plays you're almost guaranteed to have a losing streak of 75 or more.

Oh, and the analysis I'm posting is based on work done by etotheipi - the OP in this thread. But I'm glad you appreciate it.

The number of times any one player must play before he wins at the 8000/65536 game is a shifted geometrically distributed random variable, p = 8000/65536. Let the term "round" indicate a series of plays ending in a win.

This means the probability of 75 or more plays before a win is given by the upper tail geometric distribution CDF:

Code:

(1-8000/65536)^75 = 5.747515e-05

So for every round played, there is a 5.747515e-05 chance the round will end after 74 plays. So, on average, we expect one in 17398.82 rounds to last 75 plays or more.

The mean number of plays per round is:

Code:

1/p = 8.192

So, converting rounds to plays, we expect a run of 75 or more losses in a row to occur once in 17398.82 * 8.192 = 142531.1 plays.

So I was out by a factor of almost 10.

For you (fair) coin flip example, calling a series of plays ending in a head a "round", 10 heads in a row has a probability of occurring determined by the probability density function, p*(1-p)^(k-1).

In this case, k = 10 and p = 0.5, so the probability of winning exactly 10 heads in a row for a given round is 0.5*(1-0.5)^9 = 1024

There is a mean of 2 flips per game, so we'd expect exactly 10 heads in a row once every 2048 flips.

Edit: If you want to know the probability of exactly 75 losses in a row occurring, use the geometric distribution probability density function: p*(1-p)^(k-1) = 8000/65536*(1- 8000/65536)^(75-1) = 7.99154e-06 or once in 125132.3 rounds. Since one round has a mean number of plays of 8.192, the expected number of plays before a round of exactly 75 losses before one win is 125132.3 * 8.192 = 1025084 plays.

Some more R code for you to try, simulating a game that ends a series of losses with a win, the probability of a win being 8000/65536:

There is a mean of 2 flips per game, so we'd expect exactly 10 heads in a row once every 2048 flips.

Is that 'exactly' where we are differing? The guy didn't have exactly 75 losses and then a win. He had 75 losses and quit playing. Who knows how many losses he would have had if he had kept playing.

I think we expect at least 10 heads in a row once every 1024 flips.

(exactly 11 heads is half as likely as exactly 10, exactly 12 is half as likely again,etc. 1/2 + 1/4 + ... = 1. ie. the chance of seeing exactly 10 is the same as the chance of seeing 11 or more. I see exactly 10 once every 2048 flips, I see 11 or more once every 2048 flips too. Combining these 2, I see 10 or more every 1024 flips.

This means the probability of 75 or more plays before a win is given by the upper tail geometric distribution CDF

except I was wrong - the upper tail CDF is (1-1/p)^(k-1). Ooops! Still, the basic idea remains the same - multiply by the number of expected rounds per game to get the number of plays before 75 losses on a row or more occurs.

(exactly 11 heads is half as likely as exactly 10, exactly 12 is half as likely again,etc. 1/2 + 1/4 + ... = 1. ie. the chance of seeing exactly 10 is the same as the chance of seeing 11 or more. I see exactly 10 once every 2048 flips, I see 11 or more once every 2048 flips too. Combining these 2, I see 10 or more every 1024 flips.

Sure. As per the first part of my post, you can find the probability of 10 or more heads by using the upper tail CDF: (1-p)^(k-1). In this case, it's (1-1/2)^9 = 1/512. This probability means that for a round defined as a series of flips ending in a tail, flipping 10 or more heads in a row should occur once every 512 rounds, or once every 1024 plays - as you saw in your simulation.

So going back to the original question - how many times would any one players be expected to play to experience 75 losses or more in a row? The upper tail CDF is (1-8000/65536)^(75-1) = 1/15274.94 and the mean number of plays per round = 8.192, so we would expected a run of 75 losses or greater to occur once every 125132.3 plays. Different from my original answer because I had the upper tail CDF function wrong. You can check with this simulation if you like: