Hacker News new | ask | show | jobs
by wodenokoto 838 days ago
No. I would go so far as to say, if it’s not uniformly random, it isn’t random.

My reasoning is, if you are counting cards in a game, you are giving yourself an advantage. But what really happens is that from your point of view cards will be drawn less and less uniformly randomly. Or put in another way, if you know the distribution is normal, you can bet on the the result being near the center and come out on top, but if it’s uniformly random distribution all hopes are out.

7 comments

Random (in statistics) means you cannot conclude the next value ahead of time. That's different than saying the next value is uniformly likely to be any value and the two concepts are actually orthogonal. E.g. If I had a bag with 99 red balls and 1 blue ball then randomly selected one you may assume there is a high chance there will be a red ball, based on the odds, but you aren't able to actually know which ball will be next until it's drawn.
The second pick will have better odds of a blue ball, assuming the first one picked was red and the ball was not put back however - correct?

Even more so if you’ve gone 50 picks like that, and are now down to 49 red balls and one blue ball.

That is what card counting helps you with - knowing the odds based on your current state, as compared to the initial state.

Depends if the balls are placed back or not. Similar to cards, any game which never replenishes the deck and lets you draw all the cards down to the last one lets the last pick (but not the prior ones) be non-random.
I literally stated ‘if the balls don’t get put back’.

And the last card was still random, btw. But can be guessed now with perfect precision due to the process of elimination.

Random at shuffle doesn’t mean unguessable or unpredictable as the game goes on.

Sorry, meant to say the more generic "replenished" but typed a bit of your comment while reading it at the same time :p. That's what I was saying by the next part, it doesn't matter _how_ it's replenished just that the pool doesn't dwindle to 1 option for any reason. E.g. you could not put them back pull and mix from multiple decks/ball sources as the game progresses and even though 51 cards/99 balls are discarded you don't know what n+1 is for certain yet.

I disagree the last card is "still" random, at least in the sense of statistics. It "was" random up until the measure of uncertainty of the next event reaches 0 (i.e. entropy reaches 0). At that point it's no longer a "guess", there is no uncertainty and the remaining pattern is always 100% predictable in that regardless which proceeding events occured to get there it can always be known what the next value is without uncertainty. Since there ceases to be any uncertainty in what the remaining pattern will be there ceases to be randomness in the next value generated. That the card's value was not known at n=0 does not affect whether the n+1 card still is/isn't random when n=51. In another form, that you didn't previously know the value of card n=52 with past information holds no influence whether the value is random or not with new information. Statistical randomness is all about what you know of the future predictability, not about how something came about.

This is also true of events which fall into predictable patterns at any point along the path. E.g. if I had a (relatively useless) hardware random number generator that generated random numbers 0-127 once per second until it generated a 0 at n=17, at which point it ceased being able to pull randomness from it's dead circuits and always produced 0 afterward, the first 17 values were all statistically random at the time of their draw but n=[18,inf) are all now predictable and no longer random from that point on.

I think you’re getting confused? Or we’re talking past each other?

Knowing the outcome of a die roll after the roll doesn’t make the roll of the die non-random.

Any more than the die coming up 6 a bunch of times in a row does. Though maybe it would be a good idea to check the weight/balance of it, hah.

Knowing what the last card has to be after all the other cards have been played doesn’t make the process which made that card the last card any less random either.

Picking cards off a deck isn’t a randomization/non-randomization event, shuffling the deck is what does that.

Probability however, which directly impacts gameplay in some kinds of games, is directly impacted by knowledge exposed during gameplay.

So for instance, the second to last card (and also the last card) can be known with about 50/50 odds (probability wise) if someone is good at counting, which is damn good! Way better than 1/2704 odds of guessing a sequence of two cards at the start of the deck.

In the example of the broken hardware random number generator, knowledge of the defect can be used to attack a system if it assumes a continuous probability distribution out it’s outputs, if the attacker knows this.

The same as an attacker at a casino could probably manipulate a game to make money if they knew something was broken in the deck shuffling and the same two cards were always at some position in a ‘new’ deck.

But if you’re given a double or nothing bet option on each draw, you know there’s a range of strategies that vary from maximum winnings, to most likely winnings. You want a good story you go for max. You need a few thousand to head off a problem with your car, you bet a different way.
The uniform distribution is in some sense the most random distribution you can choose, given that you have a finite number of cards. Formally, it's the maximum entropy distribution on a finite domain.

But what if the domain isn't finite? e.g. the entire real line? Then we can't define a uniform distribution, because the total probability can never sum to one. We can still define a maximum entropy distribution, but only by making some more assumptions. The normal distribution is the maximum entropy distribution on the real line, given a particular mean and variance.

Other examples: on the positive real line, the exponential distribution is maximum-entropy for a given mean. Poisson distribution is the equivalent on the non-negative integers.

There are plenty of things that are random, that are not uniformly random. The hardware RNGs that are used for physically based RNG are not uniform, including the great lava lamp wall or geiger counters, etc.

The problem is if you are doing something that requires uniform random values, and your random source is not uniform, then things will go wrong.

A simple example of non-uniform randomness is the two-dice roll.

Rolling two dice gives you a number which is random in [2, 12], but not uniform -- 7 is far more likely than 2 or 12.

By that criteria, wouldn't a discrete distribution with infinite support be even more random?

Finite support somehow seems less random because you can still say something interesting about its mean and bounds in the same way you can say something about the mean and variance of a normal distribution.

> Or put in another way, if you know the distribution is normal, you can bet on the the result being near the center and come out on top, but if it’s uniformly random distribution all hopes are out.

That’s just because the payout distribution and real distribution are different, and there’s a place the payout is at a loss.

If you bet on a uniform distribution of 2 through 12 that payed out according to a normal distribution, you’d make a killing betting on 2 or 12 (the “outliers”). If you roll 2d6 (normalish) and get paid according to a uniform distribution, you’ll make a killing betting on 7.

A normal random variate is just a uniform random variate that's gone thru a 1-1 function.