Problem

Consider the following vectors representing the number of three-pointers made and attempted by a basketball player in five games:

Calculate the three-point shooting percentage for each game and determine the average shooting percentage for the five games.


R Code

# Vectors
made <- c(4, 5, 3, 6, 7)
attempted <- c(9, 10, 8, 11, 12)

# Shooting percentage per game
percentage <- made / attempted
percentage
## [1] 0.4444444 0.5000000 0.3750000 0.5454545 0.5833333
# Average shooting percentage
avg_percentage <- mean(percentage)
avg_percentage
## [1] 0.4896465

Answer

The three-point shooting percentages for each game are:

The average three-point shooting percentage across all five games is approximately 0.489 (or 48.9%).