# 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?
A streak can have any amount of hits and the streak ends when there is a miss. So a streak can have one or more hit and as soon as there is a miss the streak ends. If it is a streak length of 0 that means that there is no hits and only a miss.
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.
Its skewed right. Most of the streak length was 0. Streak length was about 6.
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. Since the markdown file will run the code, and generate a new sample each time you Knit it, you should also “set a seed” before you sample. Read more about setting a seed below.
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.