Session Ready
Exercise

Kobe vs. the Independent Shooter

With the results of the simulation saved as sim_basket, you have the data you need to compare Kobe to your independent shooter. We can look at Kobe's data alongside our simulated data: kobe$basket vs. sim_basket.

Both data sets represent the results of 133 shot attempts, each with the same shooting percentage of 45%. We know that our simulated data is from a shooter that has independent shots. That is, we know the simulated shooter does not have a hot hand.

Instructions
100 XP
  • Using the custom function calc_streak(), compute the streak lengths of kobe$basket and sim_basket. Assign the results to kobe_streak and sim_streak relatively. (Note that sim_basket is already loaded.)
  • Compare them using the techniques you've learned: simply printing the streaks, summarizing using summary, and drawing barplots. To create the barplots, make sure to first build the tables kobe_table and sim_table from kobe_streak and sim_streak respectively.