AllenDowney / ThinkStats2

Text and supporting code for Think Stats, 2nd Edition
http://allendowney.github.io/ThinkStats2/
GNU General Public License v3.0
4.02k stars 11.31k forks source link

Minor typo and clarification for exercise 3.4 #202

Closed IamAdiSri closed 1 year ago

IamAdiSri commented 1 year ago

There's a typo in exercise 3.4 where the book says that the observer is running at 7.5 mph whereas the Python notebook says 7 mph.

I also have a question; the problem statement for exercise 3.4 says "Compute the distribution of speeds you would observe if you ran a relay race at 7.5 mph with this group of runners." Wouldn't this be the same graph as the original, just shifted to the left with the x-axis being the relative velocities of the observed runners with respect to the observer? On the other hand, the ObservedPmf function in the solution file relay_solution.py computes "the chance of observing a runner given their speed" which is not the same thing as a distribution of velocities.

I think the question might need rephrasing, but please let me know if I might be missing something.

AllenDowney commented 1 year ago

Hi Aditya, Thanks for letting me know about the inconsistency.

The question asks for "the distribution of speeds you would observe", so it depends on the likelihood that you observe each runner, which depends on their speed and yours.

I hope that helps!

IamAdiSri commented 1 year ago

I see I misunderstood the question; thank you for taking the time to explain.

I also just wanted to say that I've really been enjoying working through the book, and the code and exercises make statistics a lot more tangible and palatable. Thank you!

AllenDowney commented 1 year ago

You're welcome!