Code Monkey home page Code Monkey logo

Comments (7)

AllenDowney avatar AllenDowney commented on June 13, 2024 1

You're right -- it does ask about remaining sentence. In that case, I think you can take the answer in the book and divide by 2.

But even if that's correct, I think it distracts from the focus of the question, so I'll leave this issue open for now and revise the question when I have a chance.

Thank you!

from thinkbayes2.

AllenDowney avatar AllenDowney commented on June 13, 2024

Thanks for the question.

Computing the remaining time is an interesting question, but the book asks how long is the sentence being served.

The focus of the question is the update, which depends on the likelihood of observing people with different sentences.

I'll close this issue for now, but let me know if you still think there's an error.

from thinkbayes2.

mrclary avatar mrclary commented on June 13, 2024

Computing the remaining time is an interesting question, but the book asks how long is the sentence being served.

The books asks two questions:
"What is the probability that they are serving a 3-year sentence? What is the average remaining sentence of the prisoners you observe?"

The focus of the question is the update, which depends on the likelihood of observing people with different sentences.

This is true regarding the first question, but not the second.

If I have misinterpreted "average remaining sentence", could you please clarify?

from thinkbayes2.

mrclary avatar mrclary commented on June 13, 2024

I think you can take the answer in the book and divide by 2.

I don't understand why this is the case; can you explain?

from thinkbayes2.

AllenDowney avatar AllenDowney commented on June 13, 2024

If you arrive at random and observe a person serving a sentence of length x, you are equally likely to observe them at any point during their sentence, so the expected remaining time is x/2.

Given the posterior distribution of sentences, we can find the distribution of remaining time by dividing all values by 2.

from thinkbayes2.

mrclary avatar mrclary commented on June 13, 2024

@AllenDowney, thanks for your patience. I now see what I did wrong.
In the original post I used a discrete distribution for the remaining time, between 1 and y, rather than a continuous distribution between 0 and y. The difference between them is exactly 1/2 and accounts for the difference in our result for the average remaining time: 1.67 vs 1.17.

from thinkbayes2.

AllenDowney avatar AllenDowney commented on June 13, 2024

I'm glad you were able to track it down!

from thinkbayes2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.