Deprecated: Return type of Requests_Cookie_Jar::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home1/fupmxymy/public_html/ryanyang/wp-includes/Requests/Cookie/Jar.php on line 63

Deprecated: Return type of Requests_Cookie_Jar::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home1/fupmxymy/public_html/ryanyang/wp-includes/Requests/Cookie/Jar.php on line 73

Deprecated: Return type of Requests_Cookie_Jar::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home1/fupmxymy/public_html/ryanyang/wp-includes/Requests/Cookie/Jar.php on line 89

Deprecated: Return type of Requests_Cookie_Jar::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home1/fupmxymy/public_html/ryanyang/wp-includes/Requests/Cookie/Jar.php on line 102

Deprecated: Return type of Requests_Cookie_Jar::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home1/fupmxymy/public_html/ryanyang/wp-includes/Requests/Cookie/Jar.php on line 111

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home1/fupmxymy/public_html/ryanyang/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 40

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home1/fupmxymy/public_html/ryanyang/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 51

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home1/fupmxymy/public_html/ryanyang/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 68

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home1/fupmxymy/public_html/ryanyang/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 82

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home1/fupmxymy/public_html/ryanyang/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 91

Deprecated: Creation of dynamic property WP_Block_Type::$skip_inner_blocks is deprecated in /home1/fupmxymy/public_html/ryanyang/wp-includes/class-wp-block-type.php on line 357

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home1/fupmxymy/public_html/ryanyang/wp-includes/class-wp-term.php on line 198
Ryan Yang
Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home1/fupmxymy/public_html/ryanyang/wp-includes/class-wp-term.php on line 198
4/22: Physics (and math) of Basketball - Ryan Yang

4/22: Physics (and math) of Basketball

y.ryan.yang


Deprecated: strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home1/fupmxymy/public_html/ryanyang/wp-includes/functions.php on line 1123

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home1/fupmxymy/public_html/ryanyang/wp-includes/functions.php on line 1130

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home1/fupmxymy/public_html/ryanyang/wp-includes/functions.php on line 1133

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home1/fupmxymy/public_html/ryanyang/wp-includes/functions.php on line 1140

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home1/fupmxymy/public_html/ryanyang/wp-includes/functions.php on line 1143

4/22: Physics (and math) of Basketball


Deprecated: Creation of dynamic property WP_Block::$attributes is deprecated in /home1/fupmxymy/public_html/ryanyang/wp-includes/class-wp-block.php on line 179

Deprecated: Creation of dynamic property WP_Block::$attributes is deprecated in /home1/fupmxymy/public_html/ryanyang/wp-includes/class-wp-block.php on line 179

I don’t play that much basketball. I should be decent at basketball since I’m nearly 6′, but I’m not. I’ve started shooting for ~40 minutes once a week, but that’s it. I mainly practice because I feel like basketball is replacing golf as the social sport. For example, there was an Andrew Yang basketball game campaign event, which I didn’t attend because I’m terrible at basketball. Basketball also works a lot better in urban environments, imagine trying to play a full game of golf in Manhattan.

Anyways, here are two interesting ways to improve at basketball. (This is coming from someone who’s terrible at basketball, so take it with a grain of salt).

Leveraging Training – Taking More Shots Where You’re Weakest

Figure 1: Spots on the Court

Before I start shooting, I like to practice some shots at each of these three positions. All 3 spots are relatively equal in terms of difficulty.

The naive method would be to just take 10 shots at Spot 1, 10 shots at Spot 2, and 10 Shots at Spot 3. However, this doesn’t build in any kind of flexibility which makes it so that I take more shots if I’m missing a lot of my shots. I want to have a built-in metric that forces me to take more shots where I am most in need of practice.

The second method would be to shoot until I get 5 in. This is better than the naive method and makes it so that I more practice at spots where I’m not feeling it yet. However, you can do even better.

My (third) way is to shoot at each spot until I get 3 in a row. Firstly, this makes the third shot feel more stressful, which is always a good thing. One of the lessons I’ve learned from math competitions is that you’re performance significantly decreases when you go from “not stressed at all” to “a competition against other people.” But the largest benefit comes from leveraging:

Expected Number of Shots

I did not notice this immediately, but the “3-in-a-row” metric forces me to shoot at places where I’m weaker. Intuitively this makes sense since as the success probability p goes to 0, method 2 is O(1/p), and aiming for three in a row is O(1/p^3).

Lemma: The expected number of shots needed to get N baskets in a row where your accuracy is p is: 1/p + 1/p^2 + … 1/p^N

Credit to LR for sharing this with me. The following discussion uses flips=shots and heads=makes. LR outliend an argument where there’s a better betting at fair odds on it being heads for all flips k,k+1,…k+N-1 for each k.

Instead, I states bashed it. If you let E(x) be the expected number of flips needed where you already have x heads in a row, then E(n-1) = 1+(1-p) * E(0), and in general, E(n-m) = (1+p+..p^{M-1}) * (1+(1-p)*E(0)). Thus, E(0) = (1+p+…p^{N-1}) * (1+(1-p)* E(0)) = 1+p+…p^{N-1} + (1-p^N)*E(0), which rearranges to give E(0) = 1/p^N + 1/p^{N-1} + …. +1/p^2 + 1/p.

Link from Max L. for a Martingales argument: https://jeremykun.com/2014/03/03/martingales-and-the-optional-stopping-theorem/

Table 1 gives some example expected values at various shooting accuracies.

MethodExpected # of Shots at 40%at 80%Ratio of # of Shots
Total of 10 Shots10101
Shoot till 5 makes12.56.252
Shoot till 3 in a row24.3754.765> 5.1
Table 1: L + Ratio

Reflecting the Hoop

“Bank shots are HARD.” – Me before discovering this trick.

Figure 2: Reflected Hoop

When attempting bank shots, I imagine an imaginary hoop behind the backboard (Fig 2). I then attempt to shoot it directly into the imaginary orange hoop. That way, the ball’s original path was going to enter the reflected orange hoop, and when it hits the backboard it reflects so that it now enters the original red hoop.

Why is this useful?

It makes it easier to gauge how fast your shot should be. With the traditional method, in the words of someone on Choate’s varsity basketball team: “If I’m shooting a bank shot then I aim for a spot on the backboard and then I try to hit it.”

However, the search space of the traditional method is much larger, which means that the traditional method needs more practice shots to attain the same level of familiarity for each possible position. (Note that we work under the assumption that adding spin to the ball is not useful for mid/long-range shots)

Traditional Bank ShotReflected Hoop Method
Position Space2d: Any spot on the court is possible1d: The only thing that matters is how far the reflected hoop is
Shot Space3d: Angle of Release, Velocity, Left-Right angle2d: Angle of Release, Velocity. (Left-Right angle is fixed)
Table 2: Search Space Comparison

Conclusion

There’s some movie/tv scene where a smart guy (maybe played by John Malkovich?) effortlessly scores baskets and explains that it’s “just physics.” I kinda want to get really good at basketball so that I can say the same thing, and cite ideas like the two I’ve outlined in this post.