Golf putting example (isn't it arctan?)

Hi folks …

was looking at the golf putting example in the pymc gallery Model building and expansion for golf putting — PyMC example gallery
based on Gelman’s example …
Model building and expansion for golf putting

Am I taking crazy pills? Because I could swear the max angle error is



… because remember SOH CAH TOA … and here,
opposite = R-r and adjacent = distance = x … so

tan(max angle) = opposite/adjacent = (R-r)/x

But sin would be

sin(max angle) = opposite/hypotenuse = (R-r)/h

Now for large x, h is close to x, so that is why I think this did not cause much error … (if indeed I am not crazy and this really is an error )


CC @colcarroll

Good question, and glad someone doublechecked the math!

Been a few years since I thought about this one, and I was pretty convinced you were right, but Gelman is rarely mistaken on this sort of work. Indeed, if you think about what happens as the ball gets closer to the hole, the dotted lines are tangent to the circle, not hitting the “north pole” and “south pole” of the hole.

1 Like

Thanks for your feedback! I still think it is arctan …

right, alpha is angle on the left, dotted line = hypotenuses, radius = height, x = adjacent to angle
tan(alpha) = opp/adj = radius/x … [and sin(alpha) = opp/hyp = radius/dotted line]

I noticed in the python textbook they have arctan for similar soccer example …

1 Like

And, to address your point about the dotted line going to the top of the dotted circle … that is fine because the dotted circle (of radius R -r) is the one we are referring to in the formula …

(sorry, was travelling!)

I think we’re still talking past each other! My point was that the right angles are not at the center of the hole, they are at the edge of the circles. In the soccer example, x is convenient to write down, but not the hypotenuse. In this case, the hypotenuse of the triangles is the distance to the hole.

Here’s an example of what happens when the ball moves very close to the cup, to emphasize how the triangles are oriented.



Oh I see! Thanks very much, Collin.
Yes, that makes sense. The line drawn from the ball is tangent to the hole (I missed that subtle point); yes, that is correct; and then arcsin is correct. Thanks for taking the time, appreciate it!

(oops and you did say that in your original reply; apologies for missing that, thanks again).