Variation in throwing a ball

I might as well make a new tag called "basketball throws" because I can't stop with the analysis of these crazy basketball shots. Watch - in the end someone is going to post a video about how all these were faked (and I have said there is no clear evidence they are fake). Oh, if you want to see some shots that I am talking about - just search for Dude Perfect on youtube.

Physically, these crazy shots are possible. Time of flight in the video is comparable to a numerical model. But, the question is: how difficult are these shots? Are these one in a million? Are they easy? Are they essentially impossible? One way to answer this is to get some estimate of the variation in the angles and speed of a shot basketball. Oh yes, here comes the data.

How do you know the variation in throwing a ball? You throw a ball. So, that is what I did. I didn't want to use basketballs because that would be harder to setup. Instead I throw some wiffle balls in the hallway. My goal was to aim at a small target about 1.5 meters away and see where the balls landed and how fast (and at what angle) I threw them.

i-6bd7855d842aa80f4598aa935d0041fa-2010-08-24_untitled.jpg

I let two video cameras record this. A Flip Mino HD was used for the side shot. Then I mounted the Nokia N97 mini to get the video looking down at the target. Yes, I have both videos on youtube in case you want to analyze these yourself (but other than that, they are boring). Those videos are posted at the end. Tracker Video (don't know why, but the normal location of tracker video is broken) was used to get x-y data for where each ball landed (from the top video) and launch speed and angle from the side video.

There were 14 balls and I threw them 3 times. Here is the distribution of where the balls landed.

i-b80d174d4c56710274e9ac533c3f8197-2010-08-24_untitled_2.jpg

I added the target spot that I was aiming for. Yes, I am not the best shot. This plot may be interesting, but I really want the left-right angle of each shot. If the target is 1.5 meters away (and there is the issue of the exact location that the ball was release - but I will pretend like that was constant) then I can calculate the left-right angle as:

i-edd43b69ef4a2277837303883ceaa904-2010-08-24_la_te_xi_t_1.jpg

Here, d is the distance from the throwing point to the target. Think of a large right-triangle. The y-position is the opposite side and d-x is the adjacent side. Doing this, what does the distribution of launch LR angles look like?

i-b94d4f71d705cb49b1c8b15e678c8206-2010-08-24_thetalr_histopng.jpg

This data has an average angle of -0.019 radians with a standard deviation of 0.062 radians. I know it doesn't look like a normal distribution, but I am going to assume it is normal (because I know how to deal with this).

Now, what about the magnitude of the launch speeds?

i-0efc5a9c0213f96d66efe40286ac92e8-2010-08-24_launchspeed_distropng.jpg

The average launch speed is 3.81 m/s with a standard deviation of 0.30 m/s.

Finally, here is the vertical launch angle. Actually, it turns out that 38 of the throws had a negative angle (aimed down). The other 4 were aimed up. I guess these last four were "lobbed". Here is the data for just the ones aimed down.

i-7917cc4ceeb1000e72871c1e3aba912d-2010-08-24_updownlaunchnegpng.jpg

This has an average of -0.054 radians with a standard deviation of 0.00073 radians. Interestingly small.

What is next?

How can I use this for basket ball stuff? Well, now that I have averages and standard deviations I can generate random-normal values. Essentially I will be able to do a Monte-Carlo calculation of throwing a basketball in these cases. This will tell me how often a goal is scored under these conditions.

Some adjustments will need to be made. For a basketball, it will be thrown at a different initial speed - but I can adjust that. Oh, I know that throwing a basketball is different than a little ball. It is probably easier to be consistent with a basketball than this little wiffle ball. I can make the standard deviation a little smaller for my simulation.

How do you do this in python?

Really, this is a reminder for myself. Suppose I want to make some more data. Here are 42 (just like above) launch angles with a normal distribution from a population with the same average and same standard deviation.

i-e7dcef9cd956f4b2cf8c467a089df59e-2010-08-24_sim_launchangledist_42png.jpg

Here is the program to create this data.

i-74426712518161815785f711c7617a76-2010-08-24_python_sample.jpg

I would never want to throw a thousand balls, but I can simulate it pretty easily.

i-429f5cc9f86371f9219c255999ccb6a0-2010-08-24_sim_1000_anglepng.jpg

Boom. I am ready to run some simulations. Oh, here are the videos I promised. Warning, don't watch them unless you need them.

More like this

No wonder you suck...you've got to follow through. If you don't your arm is slowing down and twisting before you release.