Probability of ending up with Rhode island

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

Discussion Overview

The discussion revolves around the probability of ending up with a specific state, particularly Rhode Island, while playing a game of GeoGuessr where the objective is to visit all 50 states. Participants explore the mathematical modeling of this probability, considering both equal and unequal likelihoods of state selection, and the expected number of attempts required to achieve this goal.

Discussion Character

  • Exploratory, Technical explanation, Debate/contested, Mathematical reasoning

Main Points Raised

  • One participant suggests that if all states are equally likely, the expected number of tries to visit all states would be around 200, based on a logarithmic approach.
  • Another participant proposes a formula for calculating the probability that a specific state, such as Rhode Island, is the last one visited, introducing recursive functions to model the problem.
  • A different viewpoint indicates that if the game ends when all states are visited, the probability of any defined state being the last one would be 1/50 under equal likelihood conditions.
  • One participant challenges the assumption of equal likelihood, emphasizing the need to compute probabilities for cases where states are not equally likely, particularly for smaller states like Rhode Island.
  • Another participant mentions that the expected number of trials for the entire game, assuming equal likelihood, can be derived from a series of binomial experiments, leading to an approximation of 225 attempts.
  • There is a request for a more efficient computation method for the probability calculations, especially as the number of states increases.

Areas of Agreement / Disagreement

Participants express differing views on the likelihood of states being selected and the expected number of attempts needed, indicating that multiple competing models and assumptions exist regarding the probabilities involved.

Contextual Notes

Participants note the complexity of the problem increases when states are not equally likely, which introduces additional challenges in calculating probabilities and expected attempts.

willem2
Messages
2,134
Reaction score
395
Today the youtube algorithm directed me to a video of someone playing geoguessr in the US until he got all of the 50 states at least once.



If all states are equally likely this would take about 50*ln(50) tries. 50*(1+1/2+1/3+ ... 1/50), so about 200.
Of course all states aren't equally likely. I thought you'd end up clicking hundreds of times with only Rhode Island left. I saw 3 video's and they all ended with some other state. The process still takes hours.
I then wondered how to compute the probability you'd end up in with a certain state, and the number of maps you'd have to see.

I can only think of an algorithm with time complexity of n!, so this won't get far beyond 10.

S is a set of states.
pi with i ∈ S is the probability the state i comes up. The input for the algorithm
L(S, i) is the probability that i is the last state, if you start with the set of states S.
T(S) is the number of maps you have to view until you are done if you have the set of states S left.

L(S,i) = \frac { \sum_{j \in S \land j \ne i } p_j L(S \setminus \{ j \}, i) } { \sum_{j \in S} p_j }

T(S) = \frac { 1 + \sum_{j \in S} p_j T(S \setminus \{ j \} ) } { \sum_{j \in S} p_j }

and L({i}, i) = 1 en T({i}) = 1/p_i to kick off the recursion.

For each set of N states, you recurse once for each subset of N-1 states.

This can be done with a short if not efficient python program

Python:
prob = [0.01, 0.04, 0.05, 0.1, 0.3, 0.5]

def prob_last(s, i):
    if len(s) == 0:
        print ('Error')
        return 0;
    if len(s) == 1:
        return 1

    sum = 0
    for j in s:
        sum += prob[j-1]
    sumprob = 0
    for j in s:
        if j != i:
            sumprob += prob[j-1] * prob_last ([k for k in s if k != j], i)
    return sumprob/sum

      
for i in range (1, len(prob)+1):
    print( i, prob[i-1], prob_last(range(1, len(prob)+1), i))

with output

Code:
1 0.01 0.7210365685084836
2 0.04 0.14655804293227526
3 0.05 0.10298312628916247
4 0.1  0.027588400240604494
5 0.3  0.0015509841743875583
6 0.5  0.00028287785508652823

This takes less than a second for N = 10, but needs to be left overnight for N = 15
Can someone compute this quicker?
 
Physics news on Phys.org
Say the game ends when all the states are visited, the probability of a defined state which you said Rhode Island to be the goal would become ##\frac{1}{50}##.
 
willem2 said:
If all states are equally likely this would take about 50*ln(50) tries. 50*(1+1/2+1/3+ ... 1/50), so about 200.
Of course all states aren't equally likely. I thought you'd end up clicking hundreds of times with only Rhode Island left. I then wondered how to compute the probability you'd end up in with a certain state, and the number of maps you'd have to see.

Can someone compute this quicker?
What you have is a series of binomial experiments with changing probability. If there are ##n## states left, then the probability of picking one of them is ##n/50##. And, the expected number of trials until you get one is ##50/n##. The expected number of trials for the whole game is equal to $$\sum_{n = 1}^{50} \frac {50}{n} \approx 225$$
PS As above, each state is equally likely to be the last.
 
Note I am trying to compute this for the case where the states are not equally likely, and you are likely to end up with a small state like Rhode Island.
 
willem2 said:
Note I am trying to compute this for the case where the states are not equally likely, and you are likely to end up with a small state like Rhode Island.
Sorry, I missed that! Certainly makes it tricky.
 

Similar threads

  • · Replies 29 ·
Replies
29
Views
6K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
33
Views
3K
Replies
1
Views
2K