MHB Probability of Winning a Game with Random Number 0-1/2

  • Thread starter Thread starter mathworker
  • Start date Start date
  • Tags Tags
    Linear Probability
AI Thread Summary
B is playing a game where he selects a number A between 0 and 1/2, with his probability of winning defined as A^2. The discussion explores the probability of winning when A is chosen randomly from this range. Assuming a uniform probability density function (pdf) for A, the calculations show that the probability of winning is derived from the integral of A^2 over the interval [0, 1/2]. The resulting probability is calculated to be 1/12, approximately 0.0833. The conversation highlights the importance of the pdf choice in determining the winning probability in this game.
mathworker
Messages
110
Reaction score
0
B is playing a game in which he has to choose a number A between 0 and 1/2 and his probability of winning if he choose A is $$A^2$$.

What is the probability that he wins if he chooses a number randomly between 0 and 1/2?

I have encountered this at middle of some-other problem and couldn't make a move...
 
Last edited:
Physics news on Phys.org
mathworker said:
B is playing a game in which he has to choose a number A between 0 and 1/2 and his probability of winning if he choose A is $$A^2$$.
I have encountered this at middle of some-other problem and couldn't make a move...

If f(x) is the unknown p.d.f. of A, then $\displaystyle \int_{0}^{A} f(x)\ dx = A^{2} \implies f(x) = 2\ x$, so that the requested probability is $\displaystyle P = \int_{0}^{\frac{1}{2}} 2\ x\ dx = \frac{1}{4}$...

Kind regards

$\chi$ $\sigma$
 
mathworker said:
B is playing a game in which he has to choose a number A between 0 and 1/2 and his probability of winning if he choose A is $$A^2$$.
I have encountered this at middle of some-other problem and couldn't make a move...

If I choose $$A=a$$ my probability of wining is $$p_w(a)=a^2$$.

Now the distribution of $$A$$ is not specified, so let its pdf be $$f_A$$, which has support $$[0,1/2]$$. Then the probability of winning is:

$$P({\rm{win}})=\int_0^{1/2} a^2 f_A(a)\;da$$

Given the wording of the problem a natural assumption might be:

$$f_A(x)=\begin{cases} 2,&x \in [0,1/2]\\0,&{\rm{otherwise}} \end{cases}$$

Then:

$$P({\rm{win}})=\int_0^{1/2} 2\; a^2 \;da=\left[ \frac{2\;a^3}{3} \right]_0^{1/2}=\frac{1}{12}$$

Code:
--> N=100000;
--> a=rand(1,N)*0.5;
--> b=rand(size(a));
--> w=b<=a.^2;
--> sum(w)/N

ans =
    0.0832

--> 1/12

ans =
    0.0833

-->

.
 
Last edited:

Similar threads

Back
Top