Does this algorithm guarantee equaprobable outcomes?

  • Thread starter Thread starter Bipolarity
  • Start date Start date
  • Tags Tags
    Algorithm
Click For Summary
The algorithm described does not guarantee equaprobable outcomes for the numbers in the list, as the last number has a 50% probability of being selected. Each number has a probability that is half that of its successor, except for the first number, which has the same probability as the last. Suggestions for achieving equaprobability include generating a random number directly to select an element from the list instead of using coin flips. Coin flips are not inherently equiprobable in this context. The discussion highlights the need for a different approach to ensure equal selection probability among all numbers.
Bipolarity
Messages
773
Reaction score
2
Suppose you have a list of numbers, say ##{1, 7, 9, 4, 5, 6}##.
You store the first number, and then iterate through this list.
For each number in the list, you flip a coin. If it is heads, you swap that element in the list with the number you stored. If tails, you do nothing. Either way, you move on to the next number in the list.

When you finish traversing the list, the resulting number is the number you stored. I am curious if all numbers in the list are equaprobably to be the final stored number, and if this is indeed the case, how might one prove this?

Thanks!

BiP
 
Physics news on Phys.org
No, the numbers are not equiprobable. The last number has a 50 % probability.
 
Ah I see, I suppose then that each number has half the probability of its successor?

Also, do you think there might be a way for me to tweak this so that the numbers are indeed equaprobable? This is for an application I'm trying to build.

BiP
 
Last edited:
Bipolarity said:
Ah I see, I suppose then that each number has half the probability of its successor?

Yes, apart from the first number which has the same.

Bipolarity said:
Also, do you think there might be a way for me to tweak this so that the numbers are indeed equaprobable? This is for an application I'm trying to build.
Yes, but the normal thing to do would be to simply generate a random number k between 1 and N, where N is the number of numbers you have and then select the kth number.
 
Coin flips aren't equiprobable , are they ?

ETA: never mind, I see the thread already :P
 
Hello, I'm joining this forum to ask two questions which have nagged me for some time. They both are presumed obvious, yet don't make sense to me. Nobody will explain their positions, which is...uh...aka science. I also have a thread for the other question. But this one involves probability, known as the Monty Hall Problem. Please see any number of YouTube videos on this for an explanation, I'll leave it to them to explain it. I question the predicate of all those who answer this...
There is a nice little variation of the problem. The host says, after you have chosen the door, that you can change your guess, but to sweeten the deal, he says you can choose the two other doors, if you wish. This proposition is a no brainer, however before you are quick enough to accept it, the host opens one of the two doors and it is empty. In this version you really want to change your pick, but at the same time ask yourself is the host impartial and does that change anything. The host...
I'm taking a look at intuitionistic propositional logic (IPL). Basically it exclude Double Negation Elimination (DNE) from the set of axiom schemas replacing it with Ex falso quodlibet: ⊥ → p for any proposition p (including both atomic and composite propositions). In IPL, for instance, the Law of Excluded Middle (LEM) p ∨ ¬p is no longer a theorem. My question: aside from the logic formal perspective, is IPL supposed to model/address some specific "kind of world" ? Thanks.

Similar threads

Replies
45
Views
5K
Replies
1
Views
2K
Replies
5
Views
2K
Replies
2
Views
2K
Replies
2
Views
2K
Replies
7
Views
4K
Replies
7
Views
2K