Probability of scoring

1. Jan 7, 2014

Panphobia

1. The problem statement, all variables and given/known data
(This is just a question for fun, not homework or anything)
Barbara is a mathematician and a basketball player. She has found that the probability of scoring a point when shooting from a distance x is exactly (1 - x/q), where q is a real constant greater than 50.

During each practice run, she takes shots from distances x = 1, x = 2, ..., x = 50 and, according to her records, she has precisely a 2 % chance to score a total of exactly 20 points.

3. The attempt at a solution
Would I need to iterate through all the q's and figure out all combinations of x's to get the answer? Or is there a smarter solution that I am just missing?

2. Jan 7, 2014

D H

Staff Emeritus
This is a bad question. Is it 20 points or 20 baskets? If it's points rather than baskets, whose three foot rule is being used?

3. Jan 7, 2014

Panphobia

Scoring from any point x gives only one point. So it is baskets.

4. Jan 7, 2014

lendav_rott

Let the probability score be P and not score be P'.
The probability of Not scoring from any given x is
1 - (1 - x/q) , which is just x/q = P'
The probability of missing 30 points with the constant q is 98%

5. Jan 7, 2014

Panphobia

Yea I know that, I set up the question like that too. But I am not sure of how to figure out q without iterating through all combinations of x, Binomial[50,20] = 4.7129212e+13, which is not feasible.

6. Jan 7, 2014

D H

Staff Emeritus
That 50 choose 20 is a *big*number is a big part of the problem. The other big part of the problem is that no two of the individual probabilities are the same.

7. Jan 7, 2014

Panphobia

Are you hinting something with *big*? Also when you say no two of the individual probabilities are the same, isn't that kind of intuitive? How does that help with getting an answer?

8. Jan 7, 2014

lendav_rott

Well, if she were to miss all of the shots the probability of it would be 50! / q50

The problem is the distance is changing. Can't treat it like a simple dice problem anymore. Now we would have to calculate each and every combination out differently and there are...4.7something * 10something different combinations to calculate :S

I will try and see what happens if she has 4(x= 1, 2, 3 and 4) shots with x/q chance to miss and has to score , say, 2 points with the probability of 70% of Not succeeding. Maybe there's a pattern to how the calculation performs. I don't know :/

9. Jan 7, 2014

Panphobia

Which is basically what I said, iterating. But for this, even using a computer, it would take a REALLY long time to compute. So there is obviously a better solution.

10. Jan 7, 2014

Ray Vickson

Assuming the successive scores are independent (but distance-dependent, of course) and N = number of successful shots, we want $P\{ N = 20 \} = 0.02$, by adjusting the value of q. This can be done using a generating function and a computer algebra package: $P\{ N = 20\} =$ coefficient of $z^{20}$ in the expansion of
$$F(z) \equiv Ez^N = \prod_{i=1}^{50} \left[ \frac{i}{q} + \left( 1 - \frac{i}{q}\right) z \right]$$
I used Maple to find the coefficient for a given numerical value of q; each such computation is essentially instantaneous on an HP Probook. One can just keep trying various values of q (or let Maple try to solve the equation numerically). Here are the commands I used in the 'manual' approach, and with two nearby values of q:
f:=seq(i/q+(1-i/q)*z,i=1..50):
fqz:=seq(subs(q=52.649456,f),i=1..50): <---- q = 52.64956
Fqz:=mul(fqz,i=1..50):P:=evalf(coeff(Fqz,z,20));
P := .01999999536 <-------------------- P(N = 20}
fqz:=seq(subs(q=52.649457,f),i=1..50): <---- q = 52.649457
Fqz:=mul(fqz,i=1..50):P:=evalf(coeff(Fqz,z,20));
P := .02000000102 <-------------------- P(N = 20}

In the above,fqz = sequence of terms with a given numerical value of q; Fqz = F(z) for that q, and P = the (floating point) numerical value of the coefficient of z^20 in Fqz.

The P-values show that q = 52.64956 is a bit too small and q = 52.649457 is a bit too large. We could keep going like this to get a more accurate solution.

11. Jan 7, 2014

Panphobia

thanks! By the way, I only have a grade 12 probability understanding so far, would I need to more to successfully solve a problem like this on my own? By the way I solved the question in the way you said, in Mathematica.

12. Jan 7, 2014

Ray Vickson

Another way to do it in Maple is to get an expression for P with q left as a symbolic constant. That gives a high-degree polynomial in 1/q, and one can then solve the equation P = P(q) = 0.02 numerically, using the Maple command fsolve(P=0.02,q=50 ..60) for example (which spits out the answer almost instantly). There are issues, however: the exact expression for P(q) has many terms with large numerators, like
$$-\frac{994127516915891993390185476709418888222447116029208791189437137551360000000000}{q^{47}}$$
and
$$\frac{323011458963304388485529194120664234646395732000697907575432055074324480000000}{q^{46}}$$
with both + and - signs. Numerics in such cases can be very tricky, due to round-off errors, so it is advisable to increase the numerical precision to ensure accurate calculations.

Like you get from Mathematica, Maple gives 52.6494571953091714497882428732 in 30-digit precision, which rounds down to 52.6494571953 in 12-digit (10 decimal) precision. This is a bit different from the result that would be obtained by using 12-digit precision throughout; this which demonstrates the need for higher precision, as already explained.

Last edited: Jan 7, 2014