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

  • Context: MHB 
  • Thread starter Thread starter mathworker
  • Start date Start date
  • Tags Tags
    Linear Probability
Click For Summary
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 probability of winning when A is chosen randomly from this range is calculated using the probability density function (p.d.f.) $$f_A(x) = 2x$$, leading to a winning probability of $$P = \int_{0}^{1/2} 2x \, dx = \frac{1}{4}$$. Additionally, under the assumption of a uniform distribution for A, the winning probability is $$\frac{1}{12}$$, which approximates to 0.0833 when simulated with 100,000 trials.

PREREQUISITES
  • Understanding of probability density functions (p.d.f.)
  • Knowledge of integral calculus
  • Familiarity with random number generation in programming
  • Basic concepts of probability theory
NEXT STEPS
  • Explore the properties of probability density functions (p.d.f.)
  • Learn about Monte Carlo simulations for probability estimation
  • Study integral calculus applications in probability
  • Investigate different distributions and their implications in probability theory
USEFUL FOR

Mathematicians, statisticians, game theorists, and anyone interested in probability calculations and simulations.

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

  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
17K
  • · Replies 53 ·
2
Replies
53
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K