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 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 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:


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?


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?


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.


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.


Here is the program to create this data.


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


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've got to follow through. If you don't your arm is slowing down and twisting before you release.