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

  • Context: Undergrad 
  • Thread starter Thread starter Alanay
  • Start date Start date
  • Tags Tags
    Probability
Click For Summary

Discussion Overview

The discussion revolves around calculating the probability of winning in a game where players select a range of numbers and the server generates a random range. Participants explore the mechanics of the game, the implications of different range selections, and the mathematical reasoning behind determining winning probabilities.

Discussion Character

  • Exploratory
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant describes the game mechanics, stating that players choose a range (e.g., 45-55) and win if their range is entirely within the server's generated range.
  • Several participants express confusion about the rules, particularly regarding the size of the server's range and the meaning of "inside" in relation to the player's guess range.
  • A participant proposes a method to calculate the total number of possible ranges the server can choose, suggesting a formula based on the maximum number N.
  • Another participant provides a detailed breakdown of winning combinations for smaller ranges, illustrating the logic with examples and deriving a general formula for winning probability.
  • One participant suggests simplifying the problem by reducing the range to 1-25 for easier calculations and testing the derived formulas.
  • Another participant shares insights from a 2D plot they created, indicating that the most probable winning range for players is around [50,51] with a probability of about 50%.

Areas of Agreement / Disagreement

Participants express varying levels of understanding regarding the game rules and the calculations involved. There is no consensus on the exact probability calculations, and multiple approaches and interpretations of the game mechanics are presented.

Contextual Notes

Participants note the complexity of the problem increases with larger ranges, and some suggest that working with smaller numbers may yield clearer insights. There are unresolved questions about the distribution of server range choices and the implications of different interpretations of the rules.

Who May Find This Useful

Individuals interested in probability theory, game design, or mathematical reasoning may find this discussion relevant, particularly those looking to understand how to model winning conditions in games involving random number generation.

Alanay
Messages
61
Reaction score
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
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?
 
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.
 
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]?
 
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
 
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 \frac{N^2 - N}{2} (see it as a half-matrix?) with N the max number... for example the above is 6 : \frac{6^2 -6}{2} = \frac{36-6}{2} = \frac{30}{2} =15
so, the total number of ranges the computer can choose (randomly I suppose you meant with a uniform probability for all) is R=\frac{N^2 -N}{2}
For N=100 \rightarrow R = \frac{100^2 -100}{2} = 4950
Now then, the answer depends on your choice... so it depends on your minimum number k and the length L... 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 k and your highest number m.

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

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

So I give the answer for [45,55] to be:
P = \frac{45 \times (100-55+1)}{4950 } \approx 42 \%
 
  • Like
Likes   Reactions: Alanay
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 [k,m] (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   Reactions: Alanay
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!
 
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   Reactions: Alanay and jim mcnamara

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
851
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 72 ·
3
Replies
72
Views
7K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 29 ·
Replies
29
Views
6K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K