Skip

Does an addn'l simple calculation on a random number alter randomness?
April 18, 2013 7:24 AM   Subscribe

Does an additional, simple calculation (add one, for instance) of a genuinely random number, if applied to all results, affect the integrity of the result's randomness?

Would a tacked-on calculation that consistently modifies a genuinely-random number, alter the randomness of the number?

Example 1: If it is agreed by all parties present to whom the roll would matter, that a 1d6 die creates sufficiently random results, would the rolling of a standard 1d6 die and then adding "1" to the result (whereas a 6 would become 1), affect the randomness of the result unmodified 1d6 roll?

Example 2: If it is agreed by all parties present to whom the roll would matter, that a coin flip creates a sufficiently random result, would the flipping of a coin and catching it in an upturned palm, but then flipping the palm over onto the back of the catcher's other hand (making a palm-result heads into tails, or tails to heads) affect the randomness of the result, compared to the randomness of the palm-caught result?
posted by Quarter Pincher to Science & Nature (33 answers total) 1 user marked this as a favorite
 
The modified result of your second example can also be achieved by letting the coin spin another half-turn in the air. So long as you don't have a standardized number of spins, flipping it onto your hand doesn't affect the randomness of the result.
posted by griphus at 7:28 AM on April 18, 2013


Neither of these make the outcomes any less random.

You can't predict the outcomes of the trials after these "modifications" have been applied any better than you can predict the outcomes before they have been applied, because it would be trivially easy to back out the pre-"modification" outcomes.
posted by milestogo at 7:32 AM on April 18, 2013


Neither of those would change the randomness. There are plenty of extra calculations that would though, basically any calculation that reduces the space of options (for example squaring a random integer between -10 and 10)
posted by empath at 7:34 AM on April 18, 2013 [1 favorite]


1d6+1 is just as likely to produce 3 (2+1) as 1d6 is to produce 2.

The action of palm-flipping might affect the result in that the coin would likely be caught at a slightly different place in its spin (i.e., the catcher is moving his hand upward in anticipation of the palm-flip), but if it were consistent, it wouldn't affect the randomness of the flip. Also, if the coin were normally allowed to bounce slightly before it came to rest, but the palm-flip "captures" it earlier in the process, then it might affect the outcome -- that is, if the coin were to hit the palm on its edge, the act of flipping would affect which side eventually landed on the palm -- but that wouldn't consistently bias it toward heads or tails.
posted by Etrigan at 7:37 AM on April 18, 2013


Here are a whole bunch of math based tricks that will reduce a random initial selection to a single possibility, too.
posted by empath at 7:38 AM on April 18, 2013 [2 favorites]


Remember that coin flipping is not necessarily a random process. I know it's possible with some practice to get a coin to land on a certain side with some regularity flipping it a short distance up, thus the call it in the air rule. Of course if you allow someone to flip the coin afterward, they might control the result.

And then there's the subtle influence of getting to call whether something is a 'good' flip or not - someone might give an improper flip/roll a pass if it ends up in there favor. Basically if you want good randomness, agree on exactly what counts beforehand.
posted by Zalzidrax at 7:45 AM on April 18, 2013


This is done often in statistical analysis and is called data transformation.

For example, datasets are often log transformed, or if you want to keep all values positive, log+1 transformed.
posted by Midnight Rambler at 7:59 AM on April 18, 2013


@ Zalzidrax -- The possibility for non-randomness of the (practiced or unpracticed) coin flip was negated by the acceptance of all parties to whom the coin flip was relevant that the coin flip is suitably random =)

@ All -- If the additional variable in these two examples creates an acceptably-random result, does the random selection of a door out of 3 in the Monty Hall Problem, mean that Monty's removal of one goat door is also random?

(backstory) In the Monty Hall Problem, there are 3 doors that if opened would reveal either a goat, another goat, or a car. Monty knows which is which, but the contestant does not. The contestant selects 1 out of 3 indistinguishable doors, and Monty removes the goat door from the remaining unselected doors. (/backstory)

I'm not arguing 33/66 or 50/50 on the final outcome, I just want to establish whether the door Monty removes is random, based on the understanding that the contestant's elimination-round selection is also random.

The tacked-on instruction, similar to adding 1 to a 1d6 die roll, or flipping a palm-caught coin flip, is "remove (a/the) remaining goat door from among the doors the contestant has not selected," and does not vary based on which door the contestant selects, in the same way that "add 1" is applied to all 1d6 die rolls in the example. My question has nothing to do with probability -- it involves *exclusively* the integrity of the randomness of Monty's goat-door removal, since the contestant's choice is also random. Any answer involving probability is off-topic.

1. Random Coin flip + palm-to-back = random
2. Random 1d6 die roll + adding one = random
3. Random 1-in-3 door choice + removal of one of 2 remainders = random?
posted by Quarter Pincher at 8:06 AM on April 18, 2013


In the Monty Hall problem, you're making the pool of possible results smaller by removing a door. To affect randomness in a similar manner, you'd have to remove a face off the die, or a side from the coin, rather than add a digit or flip it again.
posted by griphus at 8:11 AM on April 18, 2013 [1 favorite]


If the additional variable in these two examples creates an acceptably-random result, does the random selection of a door out of 3 in the Monty Hall Problem, mean that Monty's removal of one goat door is also random?

An additional constant -- e.g., 1d6+1 -- won't change the underlying randomness of the 1d6. But the Monty Hall door removal generally isn't understood to be constant -- that is, Monty doesn't always say, "Okay, you picked Door [1d3], so I'll expose Door [1d3]+1." So we're reduced to asking whether Monty knows which door has the goat (which destroys the randomness), or he doesn't (which means he's essentially flipping a coin). So you're asking -- in essence -- whether the result of 1d3-1d2 is as random as 1d3.

1d3-1d2 has the following possibilities:
1-1=0
2-1=1
3-1=2
1-2=-1
2-2=0
3-2=1

As you can see, you have an uneven distribution of results -- 0 or 1 is twice as likely as -1 or 2.
posted by Etrigan at 8:17 AM on April 18, 2013


@griphus -- I'm talking only about the door-elimination round, not the upcoming final round. The pool of possible results from all door-elimination rounds are the same:

1. If you flip a coin, you get a result. Flipping it again resets the variables back to 1 of 2.
2. If you roll a 1d6 die, you get a result. Rolling again resets the variables back to 1 of 6.
2. If the contestant chooses 1 door of 3, one goat door is removed. To play this round again, the variables are reset back to 1 door of 3, from which one is elected and a goat door is removed based on that selection.

@Etrigan -- I am only talking about the door-elimination round, not the final round. My question has nothing to do with the final round. I'm not talking about The Monty Hall Problem, per se, I'm asking whether, based on the understanding that a 1d6 roll and coin flip are random, and that the aforementioned, single, simple, additional calculation appended to the determination of that result is also random, whether the removal of the goat door is therefore random.
posted by Quarter Pincher at 8:25 AM on April 18, 2013


@Etrigan -- to clarify, Monty's choice in your calculation isn't a 1d2, it's a constant. There are two unselected doors, and (a/the) goat door must be removed, and is constant throughout all possible selections of the contestant.

1. If the palm-caught result is heads, the flipped result is the opposite.
2. If the palm-caught result is tails, the flipped result is opposite.

1. If the 1d6 roll is 1, the result is 1+1
1. If the 1d6 roll is 2, the result is 2+1.
1. If the 1d6 roll is 3, the result is 3+1.
1. If the 1d6 roll is 4, the result is 4+1.
1. If the 1d6 roll is 5, the result is 5+1.
1. If the 1d6 roll is 6, the result is 6+1.

1. If the contestant chooses the car door, Monty removes a goat door.
2. If the contestant chooses a goat door 1, Monty removes a goat door.
3. If the contestant chooses a goat door 2, Monty removes a goat door.
posted by Quarter Pincher at 8:31 AM on April 18, 2013


I believe this is actually the classic Monty Hall problem.

If Monty knows which door is which, "removal of the goat door" is not a constant that is added to the ostensibly random pick of a door. If the car is behind 1:
The contestant picks 1. Either door 2 or 3 can be removed. The contestant can win if he does not switch.
The contestant picks 2. Only door 3 can be removed. The contestant can win if he switches.
The contestant picks 3. Only door 2 can be removed. The contestant can win if he switches.

The application of a constant would be if [door]+1 were always removed:
The contestant picks 1. Door 2 is removed. The contestant can still win.
The contestant picks 2. Door 3 is removed. The contestant can still win.
The contestant picks 3. Door 1 is removed. The contestant cannot win.
That is as random as the initial pick, and the constant does not affect the result.
posted by Etrigan at 8:38 AM on April 18, 2013


@Etrigan -- The constant is "from the two unselected doors, remove (a/the) goat door," and applies to all possible results from the contestant's selection. The final round is irrelevant in this particular topic (whereas winning or non-winning depends on the final round) -- we're discussing the truth of whether the removal of a goat door is eligible to be considered random, based on the fact that the contestant's choice is also random.

1. If the contestant chooses door 1, Monty removes a goat door from the remaining 2 doors.
2. If the contestant chooses door 2, Monty removes a goat door from the remaining 2 doors.
3. If the contestant chooses door 3, Monty removes a goat door from the remaining 2 doors.
posted by Quarter Pincher at 8:44 AM on April 18, 2013


"Goat door" in this case is not a constant. Let's assume that Car Door is 1. Goat Door is 2 or 3.

Contestant picks 1 -- Monty removes 2 or 3.
Contestant picks 2 -- Monty removes 3.
Contestant picks 3 -- Monty removes 2.

Monty is not applying a constant, because his choice depends, in two of the three possibilities, on the contestant's selection.

Imagine if you were to roll a die and subtract 1, but with a minimum result of 1. That's not 1d6-1, it's 1d6-(1 or 0). "1 or 0" is not a constant. It doesn't affect the underlying randomness of the 1d6, but it skews your result toward 1.
posted by Etrigan at 8:52 AM on April 18, 2013


Monty's choice depends on all of the contestant's possible selections, and is therefore constant.

If the doors are named, and if the car door is 1:

1a1. The contestant randomly chooses door 1, Monty applies the constant, and removes door 2.
1a2. The contestant randomly chooses door 1, Monty applies the constant, and removes door 3.
1b. The contestant randomly chooses door 2, Monty applies the constant, and removes door 3.
1c. The contestant randomly chooses door 3, Monty applies the constant, and removes door 2.

If the doors are named, and if the car door is 2:

2a. The contestant randomly chooses door 1, Monty applies the constant, and removes door 3.
2b1. The contestant randomly chooses door 2, Monty applies the constant, and removes door 1.
2b2. The contestant randomly chooses door 2, Monty applies the constant, and removes door 3.
2c. The contestant randomly chooses door 3, Monty applies the constant, and removes door 1.

If the doors are named, and if the car door is 3:

3a. The contestant randomly chooses door 1, Monty applies the constant, and removes door 2.
3b. The contestant randomly chooses door 2, Monty applies the constant, and removes door 1.
3c1. The contestant randomly chooses door 3, Monty applies the constant, and removes door 1.
3c2. The contestant randomly chooses door 3, Monty applies the constant, and removes door 2.

In each case, the constant is applied and produces a result based on the constant's random selection.

"Remove (a/the) goat door from the two unselected doors" is the constant. All possible results from the contestant's random selection result in the removal of a goat door, regardless of which door the contestant selects.
posted by Quarter Pincher at 9:09 AM on April 18, 2013


The example of the minimum result of 1 of a 1d6 roll cannot be applied to this situation, because the the constant I describe can be applied to all possible choices the contestant makes.

With the 1-1=1, there is one situation in which the constant could not be applied to a 1d6 roll.

There is no situation that the contestant can make to which the constant cannot be applied.
posted by Quarter Pincher at 9:20 AM on April 18, 2013


Remove (a/the) goat door from the two unselected doors" is the constant.

Using a slash in that definition renders it non-constant.
posted by Etrigan at 9:24 AM on April 18, 2013


Monty's choice depends on all of the contestant's possible selections, and is therefore constant.

You are not describing a constant, you are describing a function. If Monty were applying a constant, then the value of the constant would not be dependent on the position of the car nor on the contestant's first choice. Put another way, just as in your examples the [random event] plus [constant] gives the same possible range of values as [random event], so too would Monty's choice have to give the same possible range of values as the contestant's choice. But it does not, because Monty will never choose the car door.
posted by solotoro at 9:26 AM on April 18, 2013 [2 favorites]


Using a slash in that definition renders it non-constant.

No, because the constant applies to both, not just one. The contestant's selection is what determines whether (a/the) is applicable, not Monty.

You are not describing a constant, you are describing a function.

Except that the function itself is constant, and applies to all possible situations without exception.

~

If the doors are instead named Heads, Tails, and Wildcard, whereas Wildcard becomes the name of the door removed:

1. If the car is behind door Heads:

1a1. If the contestant chooses Heads, Tails is removed and Wildcard becomes Tails, leaving Heads and Tails.
1a2. If the contestant chooses Heads, Wildcard is removed, leaving Heads and Tails.
1b. If the contestant chooses Tails, Wildcard is removed, leaving Heads and Tails.
1c. If the contestant chooses Wildcard, Tails is removed, leaving Heads and Tails.

2. If the car is behind door Tails:

2a. If the contestant chooses Heads, Wildcard is removed, leaving Heads and Tails.
2b1. If the contestant chooses Tails, Wildcard is removed, leaving Heads and Tails.
2b2. If the contestant chooses Tails, Heads is removed and Wildcard becomes Heads, leaving Heads and Tails.
2c. If the contestand chooses Wildcard, Wildcard is removed, leaving Heads and Tails.

3. If the car is behind door Wildcard:

3a. If the contestant chooses Heads, Tails is removed and Wildcard becomes Tails, leaving Heads and Tails.
3b. If the contestant chooses Tails, Heads is removed and Wildcard becomes Heads, leaving Heads and Tails.
3c1. If the contestant chooses Wildcard, Heads is removed and Wildcard becomes Heads, leaving Heads and Tails.
3c2. If the contestant chooses Wildcard, Tails is removed and Wildcard becomes Tails, leaving Heads and Tails.
posted by Quarter Pincher at 9:36 AM on April 18, 2013


..so too would Monty's choice have to give the same possible range of values as the contestant's choice. But it does not, because Monty will never choose the car door.

But by that reasoning, the addition of +1 to a 1d6 would mean that the result could never be what the pre-modified die roll resulted in, too, making it 1:5.

The addition of a +1 value to a heads/tails (being 1 or 2, where 2+1=1) would mean that the available results of a palm-caught coin could never be what the palm-caught result would be, making the only possible result 1:1 after modification.
posted by Quarter Pincher at 9:41 AM on April 18, 2013


[Hey OP not really okay to make this into a discussion thread. Take side conversations to MeMail and stick to the question you originally asked?]
posted by jessamyn at 9:45 AM on April 18, 2013


@jessamyn: We are still attempting to discern whether a simple calculation, when appended to the result of an agreed random, creates or destroys the randomness (which is the original question) and I have thus far remained on-topic..

I am pointing out contradictions in the line of reasoning that suggest Monty's constant is not actually constant, which directly impacts whether or not a constant appended to a random results in a random..
posted by Quarter Pincher at 9:56 AM on April 18, 2013


You're moving the goalposts. You took care of those constraints by setting 6+1 equal to 1 for the dice, and tails +1 equal to heads for the coin. I'll try one more time:

You are acting as if the car door is randomized at the same time as the contestant's choice, but that is not the case. It's not actually a variable when your contestant is choosing - it is known to Monty, and he will never pick it. Therefore, when contestant picks a goat door, he cannot apply a constant, because if he did, half the time he'd remove the car.

To make your dice analogy more accurate, you would need to roll another, hidden die ahead of time, and tell yourself you'll add a constant of plus one to whatever the other person rolls, *unless that would give the value of your die*, in which case you'd do something else. You're no longer adding a constant, you're adding a variable that is a function of what the other person rolled.
posted by solotoro at 10:23 AM on April 18, 2013


[Seriously folks, question is about numbers. If you need the Monty Hall problem explained or wish to debate it, maybe take it to chat?]
posted by jessamyn at 10:55 AM on April 18, 2013


This all depends on the nature of the transformation. Is it reversible? Is it one-to-one? Set theory and linear algebra explore this territory. If we translate one finite sized set to a set with a smaller size, we've definately lost randomness (that's the case with Monty Hall). Add 1 and multiply by five? The set of answers is the same size and, in fact, the transformation is reversible.

Roll a six sided die, divide by three and round up? Your start set was [1, 2, 3, 4, 5, 6]. Your end set is [1, 2].

It's been a long time since I studied these things (and sometimes poorly studied) but hopefully this answer can spur some search terms for you or spur another answerer?
posted by Skwirl at 11:17 AM on April 18, 2013


@jessamyn: We're not discussing the Monty Hall Problem, which is about probability -- we're discussing one whether a constant can modify a random without interrupting the randomness.

One single aspect of the MHP (and not the MHP cumulatively) merely serves as an illustration point to discern whether a constant can or cannot modify a random without destroying its randomness.

We might similarly be accused of getting sidetracked on the merits of maritime maintenance when the question is about the sky being blue, whereas an illustration is being employed to explain the sky being blue in comparison to how waves ripple from each supporting pole of a dock when waves crash against it in like manner that blue light scatters when it collides with air particles.

In the way that the illustration about docking support poles dispersing waves does not equate to the discussion of the merits of maritime maintenance, neither does our use of one aspect of the MHP equate to the discussion of MHP itself.

@solotoro -- The constant itself is what eliminates the possibility of removing the car door, though, just as the +1 constant eliminates the possibility of a 1d6 roll resulting in a roll being modified by 0, -1, -2, -3, -4, -6, +2, +3, +4, +5, or +6. Monty need not be concerned with whether or not to remove the car door, because the constant is unaffected by any situation that would result in the possibility of removing the car door.

The fact that "Monty will not choose the car door" is merely an outsider's observation, not a rule, just as the string of -1, -2, etc numbers in this paragraph is also an observation. The constant itself eliminates the requirement of adding "don't remove the car door" and "don't subtract 1, 2, 3, etc" since the constant itself is what eliminates all possibilities of those occurring.
posted by Quarter Pincher at 11:19 AM on April 18, 2013


@Skwirl -- The purpose of the transformation is to eliminate one of the three doors from being selectable, as a set-up for the final round which involves 2 doors (a round which is irrelevant to this matter).

All possible combinations of contestant selection from any door result in the the removal of one of the 3 doors, resulting in 2 doors remaining. The transformation can be reversed by adding the single goat door that was removed, resulting in the original 1 car, 1 goat and 1 goat..

Is it possible to substantiate that the resulting smaller set, after transformation, is not random, even if there is equal possibility for each of the smaller set's numbers to result? 1/3, 2/3, and 3/3 would all round to 1, and 4/3, 5/3, and 6/3 would all round to 2.
posted by Quarter Pincher at 11:48 AM on April 18, 2013


You are asking a question about what happens when you compose two probability density functions. See wiki for more details.

Simplified answers[1]:

(1) If you compose two probability density functions each of them having uniform distribution, the result also has uniform distribution.

(2) If you compose a probability density function with uniform distribution together with a second probability density function that does NOT have uniform distribution, the result will NOT have uniform distribution.

The examples you gave in the OP fall under (1).

The Monty Hall examples discussed above fall under (1) or (2), depending on the particulars of the rule Monty follows.

But if Monty follows a rule that entails him always avoiding the door with the car, the situation definitely falls under (2), and the result is not an uniform distribution. This is because, by definition, a uniform probability distribution has an even chance of selecting any of the three choices.[2] A probability distribution with one of the three choices completely eliminated is not uniform!

[1]This is really hand-wavy and ignores a lot of important details, most notably the domain and range of the functions involved, but if you really want to understand the issues at hand (rather than just argue with people about the Monty Hall Problem) do some work on probability distribution functions and what happens when you compose two such functions together.

[2] One place people get confused in a problem like this is how to correctly figure out the probability distribution for a discrete function with numerous possible cases. I'm not going to get into this because you've already been round and round about these issues above and the internet is not a great place to try to explain things of this sort. But suffice it to say that any possible rule that Monty follows that entails him always avoiding the door with the car, cannot possibly be a uniform distribution. So (2) applies and the overall distribution is not uniform.

The 'surprise' in the Monty Hall problem is that few to no people, not even mathematicians or those who work in probability on a daily basis, expect the distribution of Monty's selection function to be non-uniform. But when you examine it carefully, it is indeed non-uniform.[3] So, a big surprise that goes against our intuituion! And that's exactly why the Monty Hall problem is famous.

[3] In the original game show, Monty would never reveal the car, he always revealed the goat. So this is an explicit or implicit assumption of the Monty Hall Problem.

posted by flug at 12:23 PM on April 18, 2013 [3 favorites]


Does an additional, simple calculation (add one, for instance) of a genuinely random number, if applied to all results, affect the integrity of the result's randomness?

To more concisely answer your original question: An additional simple calculation can indeed affect the integrity of the result's randomness.

Whether or not it does in fact "affect the integrity of the result's randomness" depends on the precise nature of the "simple calculation".
posted by flug at 1:21 PM on April 18, 2013 [1 favorite]


I'm speaking strictly of past-tense than of probability, if that matters. The Monty Hall Problem largely considered to be a probability problem, and I'm not speaking about the MHP, per se, but rather one aspect the MHP illustrates the specific situation to which I'm referring.

For me to be clear, please repeat any of your previous answer (without referring to probability or future-related calculation) in context with these items --

A number is established as random [or a number that is produced from a given set that is so complicated it its arrival (dice weight, material, air flow, table surface material, table surface traction, angle of throw, degree of spin, and degree of effort required to duplicate the identical conditions in which one throw or another was conducted, to name a few) that all involved parties agree as suitably random] in this case with 3 possible values.

At what point does a constant, despite modifying all possible rolls equally, differ in disrupting the randomness of the original roll, from one that does not disrupt said randomness?

As an aside:

Could the random-disruptive nature, of the constant in question, still be said if Monty proposed the contestant select 2 doors, from which Monty would remove one goat door and thus "ignore" the unselected door?
posted by Quarter Pincher at 1:39 PM on April 18, 2013


Unfortunately I don't think it's possible to answer this question without talking about probability.

So just to nail the terminology down: when you're saying "random" here, like flug, I'm pretty sure you actually mean "uniform." That is, uniformly distributed, such that each choice is equally likely. This isn't trivial, because variables can be random and not be uniform. For example, deaths in the Prussian military from being kicked by a horse have a Poisson distribution. Likewise, an unfair die that had a 1/2 probability of rolling a 6 and a 1/10 probability of rolling a {1, 2, 3, 4, 5} would be described as random, but not uniform.

Probably the easiest way to determine whether a given transformation is going to give you a uniform distribution is to plot the distribution. Uniform distributions form flat horizontal lines when plotted. In your d6 example, you get a probability of 1/6 for the die faces 1, 2, 3, 4, 5, and 6 (and zero for any other result) - when you plot this, you get a horizontal line, or more precisely a horizontal series of dots. When you add 1 to the face value of the die, the probability of rolling an n+1 is exactly equal to the probability of rolling an n previously, so you again get the same horizontal series of dots, just shifted over one. Same thing for the coin (you are essentially just changing the labels). If you have a horizontal line here, you have something that I think you would describe as "acceptably random" (i.e., uniform).

The reason the Monty Hall problem is different (well, there are a few differences, but I think this is the one you're looking for) is because the distribution of results is no longer uniform after the goat is revealed. At the beginning, doors A, B, and C each have a 1/3 chance of yielding a car. Say you selected door A, door B was opened to reveal a goat, and door C is the remaining closed door. For this to still be a uniform distribution, doors A and C would have to both have a 1/2 chance of yielding a car - yet as you know, now door A has a 1/3 chance but door C has a 2/3 chance and door B has a 0/3 chance, so the distribution has been drastically skewed from uniform.

HTH.
posted by en forme de poire at 3:38 PM on April 18, 2013 [1 favorite]


As a side note for those curious (as I was after reading about the Monty Hall Problem here), here is the solution to MHP as explained by Business Insider.
posted by thewildgreen at 4:27 PM on April 21, 2013


« Older How do you explain to your mot...   |  I wonder if someone translates... Newer »
This thread is closed to new comments.


Post