Stats and Gaming - The making of an Anonymous LotterysteemCreated with Sketch.

If you have ever watched the movie 21, then you will understand at least the basic premise of the Monty Hall problem.

The Monty Hall problem is a mathematical puzzle based on statistical variable probability, named after Monty Hall the original host of the US based television game show lets make a deal.

The problem is very simple. Present a person with 3 equal choices, after they have made their decision, change the variables and offer them the decision again.

I am going to show you a clip from the movie that make it much easier to understand than I can writing it out.

Coin Flipping Madness

Most people believe that there are a statistical odds of 50/50 when flipping a coin, however that is only true if you flip a coin 1 single time.

If you are going to flip a coin two times, the statistics are entirely different. Why?

Allow me to explain.

Before flipping a coin two times, you have a 66.6% chance that you will flip the same side of a coin twice in a row vs 33.3% chance of flipping opposite sides of a coin.

Pre-flip you have the possibility of flipping a heads, heads combination; a tails, tails combination; or a heads, tails combination.

Because of that, your odds when flipping are entirely different. If your first flip is a heads, you have a 66.6% chance that your next flip will in fact be heads - not a 50/50 chance. Equally true if you flip tails.

If you are going to flip 3 times,there are 8 potential combinations, and thus 3/8 or 37.5% per flip chance per combination. Thus each eliminated combination, increases the statistics of other flips.

Confusing right?

Online Gaming Problems

Most people don't realize this but gaming online is vastly rigged. There is nothing don't by sheer chance. Casino's invest countless dollars into random number hardware such as white noise random number generators to combat this issue.

A computer cannot truly do anything randomly without help from outside forces.

This means every single game that exists online that relates to gambling, also relates to statistical odds.

In most cases the statistical odds of winning a game are rigged in favor of those running the game. However as with all statistics, ones ability to understand and read them, can vastly change the outcome of the games.

This is why I stay away from developing gaming sites. Because they have to be completely rigged in my favor to genuinely create money - and outside of that there always exists the person who can cheat the system and take it all away.

Its just never been a risk I am willing to take on. Instead I stick to games like poker which are against other players and can't be rigged - the house gets its cut know matter who wins.

So when an anonymous lottery was first suggested to me, I thought "can't be done". Mainly because I don't want to run the risk of the system being gamed which is incredibly likely to happen.

Then I slept on it a few days. I plugged numbers, thought of existing systems, thought of every possible way to make a fair and anonymous lottery - and thats when it hit me.

The 50/50 Bitcoin Raffle

There is in fact a type of lottery that cannot be gamed. A 50/50 lottery. The reason it can't be gamed is because in order to cheat the odds, you have to spend more than you can ever win.

Assume for a minute 20 people enter a $1 USD 50/50 raffle. That means the value of the raffle is $10, 50% of the total value of sold tickets.

If someone wanted to try to game the system the best they can do is get 50/50 odds - which would make them no money.

In the above example someone would have to buy $20 worth of tickets to get 50/50 odds of winning, and then if they win they only win their money back. Because buying $20 worth of tickets would make the overall value of tickets sold $40 and the overall win prize $20.

If the person tried to increase the odds above and beyond 50% they would spend more than they would win - thus making it impossible to cheat such a lottery statistically.

So I decided to give it a whirl.

The anonymous factor

I expected to make it anonymous would be incredibly simple. I figured people could send me bitcoins to my address, and I would use their wallet address as a ticket.

Ha! Little did I understand the blockchain attempts to mask the person who sent you a payment. This is why most sites use accounts and dynamically generated bitcoin addresses to link user to payment.

Accounts means tracking people, and tracking people means not actually anonymous. So I had to come up with something else.

What I learned is I can scan the transaction information for a specific wallet address if I know for certain that particular address did in fact send a payment to my address.

This was the key.

So instead of creating accounts, I simply ask a visitor to send their bitcoin address after a payment is made. We verify payments by tracking out wallet value based on a stored value on our system, and if there is a difference we can tell a payment has been made.

We display 50% of the wallet address as the total value of the lottery, and each lottery runs for 1 week. At the end of the week a random winner is selected from all stored bitcoin addresses and we send that winner the total winings.

After the winner is selected a new address is displayed for the next week.

This way we don't have to track IP's, usernames, real names, or any other identifying information to be able to credit a winner. Its also a system that requires no accounts and a system which has been created so it is not rigged in favor of or against anyone from the owner to the entree.

Buy the anonymous lottery script

This script has infinite potential and infinite uses. It can be used inside members areas to run private bitcoin raffles,, it can be altered relatively easily to pick winners monthly, yearly, daily, or however often one would like.

The actual amount of winnings can be adjusted to 10/90 ot 40/60 there is nothing requiring it stay as a 50/50 raffle script. It can also be altered to pick 1 in 5 to win double their money back - or any number of things really.

If you would be interested in purchasing a copy of the script I will sell it for Ƀ0.07 per copy.

If you would like to see it developed more or want to help recover from time I have invested already, please consider buying a weekly ticket and recommending others do the same.

The cost of a ticket is Ƀ0.003.

If you would like to enter please visit Anonymous Lottery

If you have any other questions please ask below, or if you are interested in purchasing a copy please comment below and I will send you an anonymous email address to contact in reply.

Sort:  

Thought this would be about the gaming industry ^^ Maybe you should have said "Stats and Gambling" instead. An interesting article nonetheless. One thing, with the flipping coin you said: "If your first flip is a heads, you have a 66.6% chance that your next flip will in fact be heads - not a 50/50 chance."
I think this is false, it still is a 50% chance. It is different than the clip you showed with 3 doors (awesome movie btw!). In the case of the 3 doors you chose 1, another gets opened known by the host it is the wrong door, so chances are higher that the not chosen one is actually the right one. In the case of a single flip it is always a 1/2 chance.

Sorry I mislead, I thought the words anonymous lottery in the title might be a giveaway :)

In terms of statistics its a very tricky subject and that was my point. There are in fact HUGE algorithms that exist for determining values of coin tosses but the point behind this was that stats can actually be read and if one understand the laws of variable changing they can have better chances of beating the system. This is why Casino's use 4 and 5 decks of cards at blackjack tables - because ones ability to count cards increases their statistical ability to determine the outcome of game - of course not 100% o the time, but enough to win more than they lose.

It means all statistical games have to be rigged in someone favor - either the house, or the player and it makes statistical games very risky - especially if you are not a pro at stats.

(as I said in my last post, this post was going to be very different from my usual, so hope it doesn't discourage you from other posts I make) :)

Don't worry, still love ur posts ;)

Hey, thanks for great article. I am interested in your script but your website is not up. Can you please let me know how can I connect with you? Thank you.

Coin Marketplace

STEEM 0.20
TRX 0.25
JST 0.038
BTC 98087.08
ETH 3474.73
USDT 1.00
SBD 3.09