Why you should invest in a web app

We like to tell people that we don’t build websites any more. Just as their eyebrow raises in surprise, we tell them: we build Web Apps. So what is a web app, and why are Starberry so crazy about…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Optimal Strategy for Predicting Independent Events

This article presents an optimal (as I think) method to predict independent events. Hope you will enjoy it.

Note:

* Unless otherwise noted, I consider only equally probable independent events like head and tail (probability of each 0.5/0.5) or numbers on the dice.

* Event generation is random and evenly distributed.

The more diverse the list of items, the more different structures can be made from this list. If there is minimal diversity, so there is only one item, let us call it A, then It is possible to make only one structure. For example: A if the size of the list is 1, or AA if the size of the list is 2, and so on. However, if there are two types of the items in the list, then more structures are possible. For example: AB, BA if size is 2. In addition, if there are A and B items in both lists of equal size, then more structures will be possible to make from a list where the difference between number of A and number of B is less. For example, from the list [A, A, A, B] are possible next structures: AAAB, AABA, ABAA, BAAA. However, out of the list [A, A, B, B] is possible: AABB, BBAA, ABAB, BABA, ABBA, BAAB. Therefore, if to proceed with the coin, it is possible to split all experiments on batches of the same size, where all combinations will have equal chances to happen. For example, equal chances have (H — head; T — tail): HH, TT, HT, TH. However, those 4 examples are created from 3 lists of outcomes: [H, H], [T, T], and [H, T]. So [H, T] list is twice as probable as [H, H] or [T, T]. Thus if one takes into account information about diversity, then the most probable are lists containing heads and tails in equal numbers. That is why there is the tendency to equal numbers of heads and tails, for example.

Note:

* It is not a gambler’s fallacy, all I am saying is that if there is a sequence of independent events with length n, and N different independent events, then it is more likely that each event will be happening n/N times, so I do not referring the order of events in any way. However, it is possible to misinterpret the statement. I also get confused sometimes. For example, I am not saying that getting head increases probability of tail. Because after getting head we already step into sequence and half of previous possibilities are gone. However, before getting the head I can say that the possibility of getting a sequence that contains 1 tail and 1 head (equilibrium) is greater than the possibility of getting a sequence of 2 tails or 2 heads.

Because equilibrium cannot last more than for 1 experiment, numbers of events will continuously cross the point of equilibrium over and over again. Therefore, equilibrium will be more frequent than the other states. This fact can be used for predictions and as I think this fact makes the method presented in this article optimal.

Because of the tendency, it is useful to divide any sequence of independent events into periods from equilibrium to equilibrium. While it is possible for a particular sequence to end in the middle of a period, at first, for simplicity, I only consider sequences that end exactly when the period ends, but sequences can contain more than one period.

If one predicts only one particular event, then the period can be divided into two parts. The first — when the event is happening fewer times than it should by probability. To understand what I mean by “should by probability” I will give an example: if there are two events, probability of each is 0.5, and number of experiments is 100, then each event should happen 50 times. The second part of the period — when the event catches up with the number by probability, so it is happening more times than it should by probability. The reverse order of the parts is also possible, but I’m not interested in it, because only after getting the first event of the period one can know what event will be dominating in the fitst part of the period and what event will be dominating in the second part.

If one predicts only one event the entire period, then the number of right predictions will be equal to the average for the random guessing. Not bad for a starting point :)

If one makes predictions only in the second part, then one gets more right predictions more, than by probability of the event, because in the second part the event is happening more times than it should by probability. For example, if there are 2 events, and one saw the future and knows that there are 100 experiments in the period, then after getting in the first 50 experiments 30 times the first event and 20 times the second, one knows that there are 20 times of the first event and 30 times of the second event left. It means that if one predicts only the second event the remaining 50 experiments one will get 30 out of 50 right, or 60% of right predictions.

There is a way to get into the second part of the period. I also think that this is an optimal way, though I currently do not want to prove this. I think it will take a lot of time to think it through. If at the start of the current period, one predicts that the second part of the current period will start after the same number of experiments as in the previous period (length of previous period divided by two) one can get great results. There are 3 possible scenarios that can come up if one is using this strategy. First, one gets it right and gets into the second part — great. Second, one gets it wrong and starts predicting from some point of the first part — not really bad, because one reduces the number of predictions made in the first part, so it is better than random guessing. Third, the half of the previous period is greater than the entire current period — one stops this process after finishing the current period and starts a new one for the next period. On average one will be precisely getting in the center of the period, because events are evenly distributed.

Great, but let us lift limitations and consider cases when one can stop in the middle of the period, so one has some limitations on the number of predictions, for example. I think the presented strategy is still doing well, because nothing in the nature of independent events really changes with this. There is still the tendency to equilibrium, and there are still periods, thus the method will work, maybe even be optimal, though results can be not so great. Even considering that one gets into the second part of the period, it is possible to get more wrong predictions than right ones just because of the noise of the event generator. One can simply get into such a section of the second part of the period where the event number is temporarily descending relatively to the number of the event by probability. Limited number of predictions may not let one get to the end of the descending section and little farther to compensate for descending, not to mention getting to the end of the period. Also one never knows the length of the period, because it is random. However, the probability of the infinite sequence is zero, thus the period cannot be infinite, at least that’s comforting :) It is logical that the longer one can make predictions, the more periods one will get, and the less significant will be the last period in the middle of which one stops.

Also because only periods are considered, and periods are sequences of independent events, then there is 0.5 probability that period will end on 1 head and 1 tail, 0.375 probability that sequence will end on 2 heads and 2 tails, and so on. Thus the less events in the period the more probable period is. It is the only thing I am not sure about and it is certainly interferes with gambler’s fallacy.

One can think it is possible to do better after studying event generation, but if it is indeed random, I reckon there is no point in doing so.

I hope you have enjoyed this. Thank you for keeping your brain fit. Good luck!

Add a comment

Related posts:

I Do Not Write Every Day To Feed The Algorithm Monster

some days batching a small army of poems other weeks dry and barren save for a fragment of thought gracing the land like a roaming tumbleweed. With this wax and wane rhythm, I stumble against the…

Connect Leap wallet to Questify

Many people have questions: “how to connect your Leap Wallet to the app.questify.gg site?”. I will try to explain the basic steps. Step 0. For those who already have Leap Wallet installed, you can go…

US Begins Monkeypox Vaccine Rollout

Here are the key facts of this story, as agreed upon by NBC, Forbes, NPR Online News, and CBC.. “US Begins Monkeypox Vaccine Rollout” is published by Improve the News in Improve the News.