Can You Number the Number Cubes?¶

Fiddler¶

I think the random number generator on my calculator might be malfunctioning. Oh no!

Under normal conditions, it should generate random numbers between 0 and 1. But my suspicion is that the calculator is “tanked,” meaning it only generates random numbers between 0 and some value 0 < a < 1. Beyond that, I have no knowledge regarding the value of a. At the moment, it’s equally likely to be any value from 0 to 1.

As an experiment, I ask the calculator to generate one random number. It produces a value of exactly 0.5. (While this is, admittedly, infinitely unlikely, let’s roll with it!)

Based on this result, what can I expect the value of a to be, on average?

Solution¶

Let the likelihood of $a = 0.5$ be $p$. The likelihood of any other value of $a$ is $\dfrac{0.5p}{a}$.

Averaging all of these values,

\begin{align*} EV_a &= \dfrac{0.5}{1-0.5} \int \limits_{r=0.5}^1 \cdot \dfrac{1}{r}{dr} \\ &=\big[\ln r \big]_{0.5}^1 \\ \end{align*}

Answer¶

$$a = \boxed{-\ln 0.5 = \ln 2 \approx 0.693}$$

Extra Credit¶

Frustrated with my old calculator, I toss it in the trash and buy a new one. But now I’m concerned this second calculator is also “tanked.” As before, every value of a between 0 and 1 is equally likely at first.

I ask my friend to generate one random number using this second calculator. My friend does so, and smirks. “I won’t tell you what the number is,” my friend says, “but it’s somewhere between 0 and 0.5.”

On average, what can I expect the value of a (for this second calculator) to be?

Solution¶

The $0.5$ from the above integral is now another variable to integrated over.

\begin{align*} EV_a &= \dfrac{1}{0.5-0} \cdot \int \limits_{q=0}^{0.5} \dfrac{q}{1-q} \cdot \int \limits_{r=q}^1 \dfrac{1}{r} dr dq \\ &= 2\int \limits_{q=0}^{0.5} \dfrac{q}{1-q} \cdot \big[\ln r \big]_{q}^1 dq \\ &= 2\int \limits_{q=0}^{0.5} \dfrac{q\ln q}{q-1} dq \\ \end{align*}

Answer¶

Integral Calculator gave me
$$\boxed {\dfrac{\pi^2}{6} + (\ln 2)^2 - \ln 2 - 1 \approx 0.4322}$$

Rohan Lewis¶

2026.06.22¶