# Calculate the probability that a robot is in a certain location

• Gjmdp
In summary: I just asked if my attemp was correct, that is if the probability that the observation is correct (0.8) is p(L(5,0)|o)). I know perfectly what the bayes theorem is and when it should be applied. It was my question whether in this case bayes theorem was innecesary as the problem statement already provided the answer. There is no need to be rude anyway, nor to assume that I don't know most of the mathematics that is required to solve the problem. I just asked whether my guess was correct. In summary, the conversation involves a discussion about a problem on a final exam related to Bayesian probability and conditional probability.
Gjmdp
Homework Statement
There is a 1x10 grid with 10 squares. A robot is located on 1 of this squares. It receives a reading (observation) o=5 from its left sensor,which means that the robot should be located on the 5th square starting from the left, location denoted by L(5,0). The probability that this is correct is 0.8, the probability that "it is unit more is 0.1 and that it is one unit less is 0.1". Calculate the probability that the robot is in location L(5,0) after observation o, this is, calculate p(L(5,0)|o)). We know that p(o |L(5,0))) = 0.6, p(o |L(4,0))) = 0.2, p(o |L(6,0))) = 0.2, and 0 for all other L
Relevant Equations
Bayes Theorem
A similar question was asked on a final exam. I assume that p(L(5,0)|o)) is actually 0.8 since it says "the probability that this is correct is 0.8", but isn't it like too easy? Am I making any mistakes? We are given extra information that we don't have to use at all?

What class is this for / is this a pen an paper exercise or a computational one?

The lack of formatting makes this very hard to read, though at a glance it feels like a hidden markov model setup.

It is a paper exercise one. You are only intended to use bayesian probabily formulas. I am happy to clarify anything that might seem confusing.

ok, so the 0.8 is the likelihood function. If you want to apply bayes you also need a prior distribution.

Equivalently, Bayes rule comes from conditional probability which says

##p\big(X=x\big \vert Y= y\big)\cdot p\big(Y=y\big) = p\big(X=x,Y=y\big) = p\big(Y=y\big \vert X=x\big)\cdot p\big(X=x\big) ##
- - - -
How can you take the information in your problem statement to fill out (most all) of the above equation? This is standard HW template stuff that people would ask for as part of an attempt at the solution and relevant equations...

StoneTemplePython said:
ok, so the 0.8 is the likelihood function. If you want to apply bayes you also need a prior distribution.

Equivalently, Bayes rule comes from conditional probability which says

##p\big(X=x\big \vert Y= y\big)\cdot p\big(Y=y\big) = p\big(X=x,Y=y\big) = p\big(Y=y\big \vert X=x\big)\cdot p\big(X=x\big) ##
- - - -
How can you take the information in your problem statement to fill out (most all) of the above equation? This is standard HW template stuff that people would ask for as part of an attempt at the solution and relevant equations...
I think I already made explicit my attempt. No, that formula (Bayes Rule) is not required to solve this problem. I don't have to fill it to solve the problem, as it is not necessary. As I already said, I think the problem is very simple, and I think that the solution for p(L(5,0)|o)) is 0.8, due to the description of the problem ("this [observation] is correct with probability 0.8"). However, I was just wondering if the problem could be that simple, given that extra information is provided.

Gjmdp said:
I think I already made explicit my attempt. No, that formula (Bayes Rule) is not required to solve this problem. I don't have to fill it to solve the problem, as it is not necessary. As I already said, I think the problem is very simple, and I think that the solution for p(L(5,0)|o)) is 0.8, due to the description of the problem ("this [observation] is correct with probability 0.8"). However, I was just wondering if the problem could be that simple, given that extra information is provided.

You problem statement doesn't seem to be that well worded. The fundamental issue, which you've now expanded on, remains and its that the problem statement says
this [observation] is correct with probability 0.8

I can't fix wording of questions -- that is something between you and your instructor. I can tell you that it looks like it is intended as a likelihood function. If the problem came up in a section where you are told to use Bayes theorem then your answer is quite likely to be marked wrong as you are not incorporating a prior distribution in your answer.

From what I've read so far I'm not remotely convinced you know what a likelihood function is, and in turn I'm not at all convinced you 'get' Bayes Theorem. A lot of math comes down to carefully reading and applying definitions. If you want to apply Bayes theorem to this problem, you can try it and actually attempt a correct answer. I can then plug gaps.

If not, then we may as well close the thread.

StoneTemplePython said:
You problem statement doesn't seem to be that well worded. The fundamental issue, which you've now expanded on, remains and its that the problem statement says
this [observation] is correct with probability 0.8

I can't fix wording of questions -- that is something between you and your instructor. I can tell you that it looks like it is intended as a likelihood function. If the problem came up in a section where you are told to use Bayes theorem then your answer is quite likely to be marked wrong as you are not incorporating a prior distribution in your answer.

From what I've read so far I'm not remotely convinced you know what a likelihood function is, and in turn I'm not at all convinced you 'get' Bayes Theorem. A lot of math comes down to carefully reading and applying definitions. If you want to apply Bayes theorem to this problem, you can try it and actually attempt a correct answer. I can then plug gaps.

If not, then we may as well close the thread.
I just asked if my attemp was correct, that is if the probability that the observation is correct (0.8) is p(L(5,0)|o)). I know perfectly what the bayes theorem is and when it should be applied. It was my question whether in this case bayes theorem was innecesary as the problem statement already provided the answer. There is no need to be rude anyway, nor to assume that I don't know most of the mathematics that is required to solve the problem. I just asked whether my guess was correct. The bayes rule that you provided on past replies is unnecesary in this case. We are expected to know bayesian and conditional probability, which does not mean that we need to use its formula explicitly. Thank you for assuming that I don't "get" Bayes formula, but I do :)

Gjmdp said:
I know perfectly what the bayes theorem is and when it should be applied.
Your posts did not make that at all clear and your taking umbrage at having that fact pointed out is not helpful. Here on PF, someone's trying to help you by pointing out apparent or perceived flaws in your logic should not be taken personally. @StoneTemplePython was not being snippy towards YOU, he was pointing out the apparent flaws in your logic.

StoneTemplePython
phinds said:
Your posts did not make that at all clear and your taking umbrage at having that fact pointed out is not helpful. Here on PF, someone's trying to help you by pointing out apparent or perceived flaws in your logic should not be taken personally. @StoneTemplePython was not being snippy towards YOU, he was pointing out the apparent flaws in your logic.
I'm sorry about that, my mistake then. Could you tell me what those flaws in my logic are, and how my posts didnt make clear that I don't know what the bayes theorem is? Thank you

phinds
phinds said:
Your posts did not make that at all clear and your taking umbrage at having that fact pointed out is not helpful. Here on PF, someone's trying to help you by pointing out apparent or perceived flaws in your logic should not be taken personally. @StoneTemplePython was not being snippy towards YOU, he was pointing out the apparent flaws in your logic.
It reminds me a lot of this problem to be honest:

For what it's worth, I 'learned' bayes formula originally in a stats class, but I didn't 'get' it until much later. There's a lot of depth buried in something that formally is simple.

Gjmdp said:
I'm sorry about that, my mistake then. Could you tell me what those flaws in my logic are, and how my posts didnt make clear that I don't know what the bayes theorem is? Thank you
I think you didn't mean that double negative in your last sentence there since what you asked me to comment on is how your posts show you DID know it

Anyway, your continued persistence that you don't NEED Bayesian Analysis for this problem is what convince me of it (it being that you DIDN'T know it, or know it well), and I assume stonetemplepythone as well. I agree w/ him that the problem wording is poor and your assumption would not seem so far off were it not for the fact that you stated that for the problem Bayesian Analysis was the "relevant equation"

phinds said:
I think you didn't mean that double negative in your last sentence there since what you asked me to comment on is how your posts show you DID know it

Anyway, your continued persistence that you don't NEED Bayesian Analysis for this problem is what convince me of it (it being that you DIDN'T know it, or know it well), and I assume stonetemplepythone as well. I agree w/ him that the problem wording is poor and your assumption would not seem so far off were it not for the fact that you stated that for the problem Bayesian Analysis was the "relevant equation"
I just asked if my guess was correct, this is, whether the answer was actually 0.8, so that Bayes formula is not required. The fact that you haven't answered whether that is actually right or wrong, instead questioning whether I know Bayesian probability, makes me wonder whether there was time spent in reviewing my guess. The wording was already fixed. Thank you :)

## 1. What is the formula for calculating the probability of a robot being in a certain location?

The formula for calculating the probability of a robot being in a certain location is the number of favorable outcomes divided by the total number of possible outcomes. This is known as the classical probability formula.

## 2. How do you determine the number of favorable outcomes for calculating the probability of a robot's location?

The number of favorable outcomes can be determined by dividing the area of the desired location by the total area of the environment in which the robot can be located. This is known as the geometric probability formula.

## 3. Can the probability of a robot's location change over time?

Yes, the probability of a robot's location can change over time as the robot moves and explores its environment. This can be accounted for by using conditional probability, which takes into account the previous location and movements of the robot.

## 4. How accurate are the calculations for the probability of a robot's location?

The accuracy of the calculations for the probability of a robot's location depends on the accuracy of the information and assumptions used in the calculation. It also depends on the complexity of the environment and the movements of the robot.

## 5. Are there any limitations to calculating the probability of a robot's location?

There are several limitations to calculating the probability of a robot's location, such as the assumption that the robot's movements are independent and the assumption that the environment is static. Additionally, the accuracy of the calculations may be affected by sensor errors or environmental factors.

• Set Theory, Logic, Probability, Statistics
Replies
16
Views
1K
• Introductory Physics Homework Help
Replies
28
Views
616
• Set Theory, Logic, Probability, Statistics
Replies
11
Views
954
• Precalculus Mathematics Homework Help
Replies
2
Views
2K
• General Math
Replies
13
Views
1K
• Quantum Physics
Replies
8
Views
1K
• Set Theory, Logic, Probability, Statistics
Replies
11
Views
955
• Quantum Interpretations and Foundations
Replies
47
Views
2K
• Introductory Physics Homework Help
Replies
6
Views
2K
• Programming and Computer Science
Replies
1
Views
1K