How do I find out the exact probability of this....

  • I
  • Thread starter Alanay
  • Start date
  • Tags
    Probability
In summary, the game has a range of 1-100. You can win if your guess is inside that range. The game has a probability of 42% of winning if your guess is within 45-55.
  • #1
Alanay
61
4
I am making a game, there are 1-100 numbers presented on a 10 by 10 table. To make your guess you choose a range from 1-100. So I can choose 45-55. Then the server generates a range from 1-100 and as long as my guesses range is inside of that range I win. How do I find the exact probability I will win on something like 45-55?

Ranges like 70-90 and 10-30 are possible. So starting from 1 a random number is chosen and it will blocks all numbers between 1 and that number and then the same thing happens but from the 0 side of the table.
 
Physics news on Phys.org
  • #2
The rules are too vague, particularly about what the server is doing. Can it be any size range? What is the probability distribution of the server range choices?

Guess range inside means completely inside or partially inside?
 
  • #3
mathman said:
The rules are too vague, particularly about what the server is doing. Can it be any size range? What is the probability distribution of the server range choices?

Guess range inside means completely inside or partially inside?
The server generates 2 random numbers, the lowest one will block 1-that number and the highest will block 100-that number. If they're the same number then no tiles will be blocked and no matter what you choose you win. All blocks in your range must be within the random range or you lose.
 
  • #4
so you mean that the PC chooses a lower number x and a higher number y and takes the range [x,y]
and you want your range [w,r] to be a subset of [x,y]?
 
  • #5
ChrisVer said:
so you mean that the PC chooses a lower number x and a higher number y and takes the range [x,y]
and you want your range [w,r] to be a subset of [x,y]?
If by subset you mean inside of then yes :D
 
  • #6
Wanna try it with just 1-6?
you choose let's say [3,4]
the possible PC choices are:
[1,2] , [1,3], [1,4], [1,5], [1,6]
_____ [2,3] [2 4] [2 5] [2 6]
__________[3 4] [3 5] [3 6]
_______________[4 5] [4 6]
____________________ [5 6]
Right? So it's 15...
Expanding the above logic not until 6 but until N, it is [itex]\frac{N^2 - N}{2}[/itex] (see it as a half-matrix?) with N the max number... for example the above is 6 : [itex] \frac{6^2 -6}{2} = \frac{36-6}{2} = \frac{30}{2} =15[/itex]
so, the total number of ranges the computer can choose (randomly I suppose you meant with a uniform probability for all) is [itex] R=\frac{N^2 -N}{2}[/itex]
For [itex]N=100 \rightarrow R = \frac{100^2 -100}{2} = 4950 [/itex]
Now then, the answer depends on your choice... so it depends on your minimum number [itex]k[/itex] and the length [itex]L[/itex]... if you choose [30,40] your minimum number is 30 and the length is 10.
Why? because then you can go to that matrix and choose the rows and columns to count of the computer that will lead to "victory".
let's say that you choose [45,55] (as your example). Any element then in the matrix that would have [46, ...] will be tossed out because it would make you lose... the length is also 10, so anything in the computer that has length less than that can be tossed because it would make you lose. Or another way is that you need to know your lowest [itex]k[/itex] and your highest number [itex]m[/itex].

Well back to my initial example of 1-6 with your choice [3,4], the winning ones are:
[X,X] , [X,X], [1,4], [1,5], [1,6]
_____[X,X] [2 4] [2 5] [2 6]
__________[3 4] [3 5] [3 6]
_______________[X X] [X X]
____________________[X X]
those that pass are 9 combinations... the probability is so 9/15 ~60%
If your choice was [2,5]:
[X,X] , [X,X], [X,X], [1,5], [1,6]
_____[X,X] [X X] [2 5] [2 6]
__________[X X] [X X] [X X]
_______________[X X] [X X]
____________________[X X]
4/15 ~ 27%

see how the upper limit [itex]k+L=m[/itex] cut the collumn (first column starts with [...,m] )
also see how the [itex]k[/itex] cut the row (lowest elements start with [k,...])
It looks pretty much like [itex] k \times (N-m+1)[/itex] (box's area) can give the correct answer for the "winning" patterns. Eg to the above examples:
1 [k=3, m=4]: [itex] 3 \times (6-3)= 3 \times 3 = 9[/itex]
2 [k=2, m=5] :[itex] 2 \times (6-5+1)= 2 \times 2 = 4[/itex]

I think my logic is RIGHT, and so I deduce that the probability to win in general is:
[itex] P = \frac{ \text{success}}{\text{total}} = \frac{ k \times (N-m+1)}{ N ( N-1)/2 } [/itex]

So I give the answer for [45,55] to be:
[itex] P = \frac{45 \times (100-55+1)}{4950 } \approx 42 \%[/itex]
 
  • Like
Likes Alanay
  • #7
For such problems I would suggest bringing down the numbers to something that you can work with on a scrap of paper...Obviously 1-100 is not that easy to handle... Get practical!
Then try, instead of giving computational answers (in the above counting boxes), to give a general formula that contains information that you need in "any" dimension... in the above that's what I did by trying to find the successes in relation to the player's choice [itex][k,m][/itex] (which holds in any range game) or the total number of pc range-combinations [seeing it as a matrix]. Search and Find patterns!
Test that formula on your range... maybe create another easy range and test your formula on it too (I didn't do that here, but that's why I said 'I think my logic is RIGHT', because intuitively it felt right to me)... Convince yourself!
... and GET SOLUTION
Then you can deduce what's happening to any range... I'm pretty sure my answer holds for any:
[1-X] range game
and any player's choice [k,m].
 
  • Like
Likes Alanay
  • #8
Thank you for doing so much math to help me. I will take your advice and reduce the max possible range to 1-25 for simplicity and easier math. Thanks again!
 
  • #9
if you believe that 1-25 is easier... to me easy to write down on paper are 4,5,6 ... 7 at worst...
I even made a 2D plot giving the probability ... the x-axis is the player's lower choice, the y-axis is the player' higher choice...
So the most probable victory points for the player have small length/range and the lower value is around 50... and the most probable to win (with about 50% probability) is the player=[50,51]...
justforfun.jpg
 
  • Like
Likes Alanay and jim mcnamara

Related to How do I find out the exact probability of this....

1. How do I find out the exact probability of a certain event occurring?

The exact probability of an event occurring can be calculated by dividing the number of favorable outcomes by the total number of possible outcomes. This is known as the classical probability formula. However, in real-life situations, the exact probability may be difficult to determine and may require more complex calculations or statistical methods.

2. What is the difference between theoretical probability and experimental probability?

Theoretical probability is the probability of an event occurring based on mathematical calculations and assumptions. On the other hand, experimental probability is the probability of an event occurring based on actual observations and experiments. Theoretical probability is often used in ideal situations, while experimental probability is more applicable to real-life scenarios.

3. How do I find the probability of multiple events happening at the same time?

If the events are independent (meaning one event does not affect the other), then the probability of both events occurring is found by multiplying their individual probabilities. However, if the events are dependent, then the probability of both events occurring is found by multiplying the probability of the first event by the conditional probability of the second event.

4. What is conditional probability and how is it calculated?

Conditional probability is the probability of an event occurring given that another event has already occurred. It is calculated by dividing the probability of both events occurring by the probability of the first event occurring. This takes into account the relationship between the events and can often provide a more accurate probability than just looking at the individual events.

5. How do I use probability in decision making?

Probability can be used in decision making to determine the likelihood of different outcomes and make informed choices. By calculating the probabilities of different options, you can compare them and choose the one with the highest probability of success. However, probability should not be the only factor considered in decision making as it is not always a guarantee of what will happen.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
832
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
870
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
948
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
14
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
427
  • Set Theory, Logic, Probability, Statistics
Replies
9
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
Back
Top