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

  • Topic:
  • Thread starter Thread starter mathworker
  • Start date Start date
  • Tags Tags
    Linear Probability
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
2 replies · 2K views
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: