# Probability of choosing a real number between 0 and 1

When randomly choosing real numbers in range (0,1).
What's the probability that if we chose x, the first decimal digit in $$x^2$$ is 3?
In other words, if we chose x from (0,1), what the probability that $$x^2$$ looks like $$0.3\square\square\square\square.....$$ ?

The only thing is I'm sure about is that X~U(0,1) which means $$Pr[X\le x]=F(x)=x$$
So if we wanted to choose a number which looks like $$0.1\square\square\square\square.....$$ this means $$0.1\le x<0.2 \to Pr[0.1\le X< 0.2]=F(0.2)-F(0.1)=0.1$$

• What's the smallest $x$ that works? What's the largest?
– lulu
Commented Feb 15, 2020 at 17:24

For $$x>0$$, $$0.3\leq x^2 <0.4 \;\iff \; \sqrt{0.3}\leq x < \sqrt{0.4}$$ Then $$\mathbb P(0.3\leq x^2 <0.4)=\mathbb P(\sqrt{0.3}\leq x < \sqrt{0.4}) = \sqrt{0.4} -\sqrt{0.3}\approx 0.084732975.$$

$$x$$ must be in the range $$[\sqrt{0.3},\sqrt{0.4})$$

So the size of the range is $$\sqrt{0.4}-\sqrt{0.3}=\frac{2\sqrt{10}-\sqrt{30}}{10}$$ (because $$\sqrt{0.4}=\frac{\sqrt2}{\sqrt5}\cdot\frac{\sqrt5}{\sqrt5}=\frac{\sqrt{10}}{5}$$ and similarly $$\sqrt{0.3}=\frac{\sqrt{3}}{\sqrt{10}}\cdot\frac{\sqrt{10}}{\sqrt{10}}=\frac{\sqrt{30}}{10}$$)

This is your probability because the range of possible values between $$0$$ and $$1$$ is $$1$$

• Radicals are much nicer expressed in whole numbers Commented Feb 15, 2020 at 17:38
• Yes. I noticed when I tried to solve it myself. Good point Commented Feb 15, 2020 at 17:44
• Also overlooked that I could simply rewrite the square-roots of the decimals. I just know no examiner I've been under would accept $\sqrt{0.4}-\sqrt{0.3}$ Commented Feb 15, 2020 at 17:59
• Examiners I've been under would probably prefer the form in with radicals, mostly because writing a number in decimals is unwarrated in most courses. However, I think they'd recognise that $\sqrt{0.4}-\sqrt{0.3}$ is the same thing as $\sqrt{\frac15}-\sqrt{\frac3{10}}$, which is as good as any other notation.
– user239203
Commented Feb 15, 2020 at 18:05