Can you solve the basketball riddle? - Dan Katz

435,722 views ・ 2024-06-13

TED-Ed


Please double-click on the English subtitles below to play the video.

00:07
You’ve spent months creating a basketball-playing robot,
0
7086
3379
00:10
the Dunk-O-Matic,
1
10465
1293
00:11
and you’re excited to demonstrate it at the prestigious Sportecha Conference.
2
11758
4754
00:16
Until you read an advertisement:
3
16679
2086
00:18
“See the Dunk-O-Matic face human players and automatically adjust its skill
4
18890
5172
00:24
to create a fair game for every opponent!”
5
24062
3420
00:27
That's not what you were told to create.
6
27607
2586
00:30
You designed a robot that shoots baskets,
7
30318
2502
00:32
sometimes successfully and sometimes not, taking turns with a human opponent.
8
32904
5213
00:38
No one said anything about teaching it to adjust its performance.
9
38493
3712
00:42
Maybe the CEO skimmed an article about AI and overpromised,
10
42288
4338
00:46
setting you up for public embarrassment.
11
46626
2544
00:49
Luckily, you installed a feature where given any probability q,
12
49629
4629
00:54
you can adjust the robot to have that probability of success on each attempt.
13
54383
5089
00:59
You swiftly gather information, and jackpot:
14
59680
3379
01:03
your team has a dossier on all potential demo participants,
15
63059
4880
01:07
including the probability each has of making baskets.
16
67980
3796
01:12
In each match, the human shoots first, then the robot, then the human again,
17
72235
4921
01:17
and so on until someone makes the first successful basket and wins.
18
77156
4672
01:22
You can remotely adjust the Dunk-O-Matic’s probability between opponents.
19
82078
4629
01:26
What should that probability be for each opponent,
20
86916
3212
01:30
so that the human has a 50% chance of winning each match?
21
90128
4295
01:34
Pause here to figure it out yourself. Answer in 3
22
94423
2294
01:36
Answer in 2
23
96717
2294
01:39
Answer in 1
24
99011
2253
01:41
You might guess that q should be equal to p.
25
101556
2919
01:44
But that ignores the advantage of going first.
26
104684
3170
01:47
Suppose p and q are both 100%.
27
107854
3378
01:51
Even though the competitors are equally skilled,
28
111399
3003
01:54
the first player always wins.
29
114402
2419
01:56
So a deeper analysis is required.
30
116904
2544
01:59
One approach involves adding up every chance the human has to win,
31
119991
5255
02:05
using geometric series.
32
125246
2210
02:07
A geometric series is an infinite sum of numbers,
33
127748
3379
02:11
where each number is the previous number multiplied by a common ratio.
34
131127
4629
02:16
Two facts about geometric series are useful here.
35
136174
3420
02:20
First, if the common ratio r of a geometric series
36
140136
3962
02:24
has absolute value less than 1,
37
144098
2669
02:26
the series has a finite total.
38
146934
2169
02:29
And second, if the first number in the series is a,
39
149478
3713
02:33
that total is: a divided by 1-minus-r.
40
153274
3921
02:37
How does this help us calibrate our robot?
41
157862
2961
02:40
Remember that the human has probability p of making a basket.
42
160907
4671
02:45
Since they go first, they have probability p of winning on the first try.
43
165828
5047
02:51
What’s the probability that they win on the second try?
44
171042
3003
02:54
That attempt only happens if both players miss.
45
174253
3587
02:58
The probability of a miss is 1 minus the probability of a success,
46
178090
4922
03:03
so the miss probabilities are 1-minus-p and 1-minus-q.
47
183179
4755
03:08
The chance of both happening is the product of those values.
48
188100
4130
03:12
So the probability of two failures and then a human success
49
192313
4004
03:16
is p times (1-minus-p) times (1-minus-q).
50
196400
3921
03:20
Winning on the third try requires another round of misses,
51
200696
4088
03:24
so that chance is p multiplied by the double-miss probability twice.
52
204867
5339
03:30
If we add all the possible probabilities of a human win,
53
210414
3712
03:34
the total is the sum of a geometric series.
54
214126
3420
03:37
Since the first number in the series is p,
55
217755
2628
03:40
and the ratio is this product that’s less than 1,
56
220383
3378
03:44
the sum will be (p divided by 1) minus the ratio.
57
224053
4463
03:48
We want this sum to be 1/2.
58
228766
2628
03:51
Using some algebra to solve for q,
59
231519
2627
03:54
we find that q should equal p divided by 1-minus-p.
60
234188
4505
03:58
If p is greater than 50%, q would need to be bigger than 1,
61
238943
4713
04:03
which can’t happen.
62
243656
1418
04:05
In that case, a fair game is impossible,
63
245324
3087
04:08
because the human has a better-than-50% chance of winning immediately.
64
248411
4379
04:13
The robot's total probability is also the total of a geometric series.
65
253249
4755
04:18
How does this series compare to the human’s?
66
258129
2460
04:20
To win, the robot needs some number of double misses,
67
260840
3712
04:24
then a human failure followed by a robot success.
68
264677
4087
04:29
If q equals p over 1-minus-p,
69
269432
3420
04:32
(1-minus-p) times q is p.
70
272852
2961
04:36
For our choice of q, not only do these series have the same sum,
71
276355
4088
04:40
but they’re the same series!
72
280443
1877
04:43
We could bypass geometric series by starting with this reasoning.
73
283195
4088
04:47
The robot’s chances of winning in the first round is (1-minus-p) times q,
74
287533
5214
04:52
and so if we want that chance to match the human’s first-round chance,
75
292913
4422
04:57
we want it to equal p, making q: p over 1-minus-p.
76
297418
5005
05:02
More rounds may occur, but before each round,
77
302840
3003
05:05
the competitors are tied, so everything effectively restarts.
78
305843
4630
05:10
If they have the same odds of winning in the first round,
79
310556
2961
05:13
they also will in the second round, and so on.
80
313642
3003
05:16
The demonstration goes perfectly,
81
316854
2085
05:18
but while you didn't want to embarrass yourself,
82
318939
2420
05:21
you also didn’t want to deceive the public.
83
321359
2627
05:24
Taking the stage, you explain your company’s false promises
84
324111
3837
05:27
and your hastily ad-libbed solution.
85
327948
2753
05:31
Thankfully, the ensuing bad press is directed at your employers,
86
331327
4421
05:35
and it turns out the presentation volunteers
87
335915
2544
05:38
own a more employee-friendly robotics company.
88
338459
3170
05:41
After some tedious intellectual property litigation,
89
341962
3170
05:45
you find yourself at a healthier workplace
90
345132
2544
05:47
with a regular spot on a pickup basketball team.
91
347676
3212
About this website

This site will introduce you to YouTube videos that are useful for learning English. You will see English lessons taught by top-notch teachers from around the world. Double-click on the English subtitles displayed on each video page to play the video from there. The subtitles scroll in sync with the video playback. If you have any comments or requests, please contact us using this contact form.

https://forms.gle/WvT1wiN1qDtmnspy7