# A tibble: 6 × 6
vs game quarter time description shot
<fct> <int> <fct> <fct> <fct> <chr>
1 ORL 1 1 9:47 Kobe Bryant makes 4-foot two point shot H
2 ORL 1 1 9:07 Kobe Bryant misses jumper M
3 ORL 1 1 8:11 Kobe Bryant misses 7-foot jumper M
4 ORL 1 1 7:41 Kobe Bryant makes 16-foot jumper (Derek Fishe… H
5 ORL 1 1 7:03 Kobe Bryant makes driving layup H
6 ORL 1 1 6:01 Kobe Bryant misses jumper M
Exercise 1.
What does a streak length of 1 mean, i.e. how many hits and misses are in a streak of 1? What about a streak length of 0?
answer: Streak length of 1 means 1 successful shot that is not followed by another successful shot. 1H, 1M. Streak length of 0 represents a unsuccessful shot. 1M.
Describe the distribution of Kobe’s streak lengths from the 2009 NBA finals. What was his typical streak length? How long was his longest streak of baskets? Make sure to include the accompanying plot in your answer.
summary(kobe_streak)
length
Min. :0.0000
1st Qu.:0.0000
Median :0.0000
Mean :0.7632
3rd Qu.:1.0000
Max. :4.0000
answer: The streak lengths varied between 0 and 4. 0 was the most common streak length followed by the streak length 1. Streak lengths of 2 and 3 occurred the same number of times. The maximum streak length of 4 occurred the least number of times.
In your simulation of flipping the unfair coin 100 times, how many flips came up heads? Include the code for sampling the unfair coin in your response.
What change needs to be made to the sample function so that it reflects a shooting percentage of 45%? Make this adjustment, then run a simulation to sample 133 shots. Assign the output of this simulation to a new object called sim_basket.
answer: Add probability function with desired probabilities.
Describe the distribution of streak lengths. What is the typical streak length for this simulated independent shooter with a 45% shooting percentage? How long is the player’s longest streak of baskets in 133 shots? Make sure to include a plot in your answer.
length
Min. :0.0000
1st Qu.:0.0000
Median :0.0000
Mean :0.6962
3rd Qu.:1.0000
Max. :5.0000
answer: The streak length ranged between 0 and 5 but with no streak length of 4. The streak length of 0 was the most common. The longest streak length of 5 occurred the least number of times.
Exercise 7
If you were to run the simulation of the independent shooter a second time, how would you expect its streak distribution to compare to the distribution from the question above? Exactly the same? Somewhat similar? Totally different? Explain your reasoning.
answer: Since the probabilities remain unchanged I would expect the distribution to be roughly the same. Owing to random chance I would not expect it to be exactly the same.
The distribution comes out to be exactly the same.
Exercise 8
How does Kobe Bryant’s distribution of streak lengths compare to the distribution of streak lengths for the simulated shooter? Using this comparison, do you have evidence that the hot hand model fits Kobe’s shooting patterns? Explain.
answer: Both distributions are roughly the same. The streak lengths of 0 and 1 occur almost the same number of times. For verifying the Hot Hand Hypothesis the number of streak lengths of 2 and 3 are important for comparison. Kobe’ s distribution shows a slightly higher number for both streaks which can be evidence for a Hot Hand. However the difference is not considerable and could be down to random chance