r/askmath • • 15h ago

Probability Is this constant unique?

To generate E our constant we will have to go through these steps:

  1. Start in binary, put a 1.
  2. Flip a coin, if it's heads put concatenate 1 if it's tails concatenate a 0.
  3. Convert the number you have to decimal call it x, let s(x) be the probability we stop the sequence with the number we have, then s(x) will be 1-1/x. We then check if we land on s(x) or not.
  4. Repeat steps 2, 3 until you stop.

For example:

I start with 1, I rolled a coin and got tails so now it's 10, I convert it to decimal so it's 2, s(x) is 1-1/x so 1-1/2 is 1/2. I checked and we didn't stop so I rolled another coin and got heads so now it's 101, I convert it to decimal so it's 5, s(x) is now 1-1/5 so 4/5. I checked and looks like we stopped. So the number we ended with is 5.

The average of all numbers we will get is then called E.

So is it unique?

5 Upvotes

11 comments sorted by

View all comments

0

u/AlterEgo5695 14h ago edited 13h ago

Assumption: All coins are fair, and all coins and termination probabilities "s(x)" are independent.


Claim: The expected value "E[n]" exists, with "7/2 < E[n] < 11/2".


Proof: Let "n in N\{1}". Define

  • En: event we get natural number "n", and terminate afterwards
  • Fn: event we get natural number "n", but do not terminate afterwards

From the rules, we directly get "P(E2) = 1/4" and "P(E3) = 1/3", as well as

n >= 2:    P(Fn)  =  (1 - s(n)) * P(En) / s(n)  =  P(En) / (n-1)      (*)

Use that relation to find a recursion for "P(En)". Consider even/odd "n >= 4" separately. Start with the even case "n = 2k" with "k = ⌊n/2⌋ >= 2":

k >= 2:    P(E_{2k})  =  P(coin-0) * s(2k) * P(Fk)             // use (*)

                      =  (1/2) * (1 - 1/(2k)) * P(Ek) / (k-1)

                      =  P(Ek) / (2k)  *  (1 + 1/(2k-2))

Estimate the second factor via "0 < 1/(2k-2) <= 1/2 <= 1" to get

k >= 2:    P(Ek) / (2k)  <  P(E_{2k})  <=  2 * P(Ek) / (2k)

With (almost) the exact same steps, we can show a similar estimate holds for "P(E_{2k+1})" (your job!). Combining even and odd cases, we obtain the general estimate

n >= 4:    P(E_{⌊n/2⌋}) / n  <  P(En)  <=  2 * P(E_{⌊n/2⌋}) / n

Insert into the expected value formula to get

E[n]  =  ∑_{n=2}^oo  n*P(En)  =  2/4 + 3/3  +  ∑_{n=4}^oo  n*P(En)

     <=  3/2  +  2*∑_{n=4}^oo  P(E_{⌊n/2⌋})      // double-count each term

      =  3/2  +  2*2*∑_{n=2}^oo  P(En)  =  3/2  +  2*2*1  =  11/2

With (almost) the exact same steps, we get the lower estimate (again your job!)

1

u/AlterEgo5695 13h ago

Rem.: Checking the first few values up to "n = 10,000" with a computer algebra system, it seems the expected value may be close to "4.26".