##Loading the data
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
player_data <- read.csv("C:/Users/rohan/OneDrive/Desktop/INTRO TO STATISTICS IN R/DATA SETS/Datasets/Data/Nba_all_seasons_1996_2021.csv")
head(player_data,10)
## X player_name team_abbreviation age player_height player_weight
## 1 0 Dennis Rodman CHI 36 198.12 99.79024
## 2 1 Dwayne Schintzius LAC 28 215.90 117.93392
## 3 2 Earl Cureton TOR 39 205.74 95.25432
## 4 3 Ed O'Bannon DAL 24 203.20 100.69742
## 5 4 Ed Pinckney MIA 34 205.74 108.86208
## 6 5 Eddie Johnson HOU 38 200.66 97.52228
## 7 6 Eddie Jones LAL 25 198.12 86.18248
## 8 7 Elden Campbell LAL 28 213.36 113.39800
## 9 8 Eldridge Recasner ATL 29 193.04 86.18248
## 10 9 Elliot Perry MIL 28 182.88 72.57472
## college country draft_year draft_round draft_number gp
## 1 Southeastern Oklahoma State USA 1986 2 27 55
## 2 Florida USA 1990 1 24 15
## 3 Detroit Mercy USA 1979 3 58 9
## 4 UCLA USA 1995 1 9 64
## 5 Villanova USA 1985 1 10 27
## 6 Illinois USA 1981 2 29 52
## 7 Temple USA 1994 1 10 80
## 8 Clemson USA 1990 1 27 77
## 9 Washington USA 1992 Undrafted Undrafted 71
## 10 Memphis USA 1991 2 37 82
## pts reb ast net_rating oreb_pct dreb_pct usg_pct ts_pct ast_pct season
## 1 5.7 16.1 3.1 16.1 0.186 0.323 0.100 0.479 0.113 1996-97
## 2 2.3 1.5 0.3 12.3 0.078 0.151 0.175 0.430 0.048 1996-97
## 3 0.8 1.0 0.4 -2.1 0.105 0.102 0.103 0.376 0.148 1996-97
## 4 3.7 2.3 0.6 -8.7 0.060 0.149 0.167 0.399 0.077 1996-97
## 5 2.4 2.4 0.2 -11.2 0.109 0.179 0.127 0.611 0.040 1996-97
## 6 8.2 2.7 1.0 4.1 0.034 0.126 0.220 0.541 0.102 1996-97
## 7 17.2 4.1 3.4 4.1 0.035 0.091 0.209 0.559 0.149 1996-97
## 8 14.9 8.0 1.6 3.3 0.095 0.183 0.222 0.520 0.087 1996-97
## 9 5.7 1.6 1.3 -0.3 0.036 0.076 0.172 0.539 0.141 1996-97
## 10 6.9 1.5 3.0 -1.2 0.018 0.081 0.177 0.557 0.262 1996-97
df_1 <- c("ast", "reb", "gp", "pts","season")
set_1 <- subset(player_data[df_1],season == "1996-97")
set_2 <- subset(player_data[df_1],season == "2006-07")
set_3 <- subset(player_data[df_1],season == "2016-17")
print(set_3)
## ast reb gp pts season
## 9076 0.4 0.8 30 2.9 2016-17
## 9077 1.8 3.1 73 8.0 2016-17
## 9078 2.6 4.3 67 15.9 2016-17
## 9079 0.4 2.3 16 1.9 2016-17
## 9080 2.6 1.1 60 3.5 2016-17
## 9081 0.6 11.5 47 8.4 2016-17
## 9082 3.1 3.4 40 10.3 2016-17
## 9083 0.8 2.4 51 3.5 2016-17
## 9084 3.7 1.6 61 7.3 2016-17
## 9085 3.2 4.0 73 13.7 2016-17
## 9086 1.6 0.8 53 4.3 2016-17
## 9087 4.8 2.6 69 9.9 2016-17
## 9088 0.8 2.3 30 6.2 2016-17
## 9089 1.8 1.4 33 3.2 2016-17
## 9090 0.7 1.5 67 8.2 2016-17
## 9091 1.0 3.3 71 6.2 2016-17
## 9092 1.8 0.8 57 5.0 2016-17
## 9093 1.9 8.0 71 10.0 2016-17
## 9094 2.2 5.7 80 11.7 2016-17
## 9095 0.2 0.8 27 2.1 2016-17
## 9096 1.2 3.1 80 8.5 2016-17
## 9097 4.5 1.8 63 10.1 2016-17
## 9098 1.4 5.5 71 9.1 2016-17
## 9099 2.3 2.5 24 4.9 2016-17
## 9100 1.6 1.5 57 2.7 2016-17
## 9101 1.7 5.1 82 16.1 2016-17
## 9102 1.1 2.2 69 6.4 2016-17
## 9103 1.0 9.2 78 8.1 2016-17
## 9104 0.8 4.9 54 7.4 2016-17
## 9105 1.1 2.1 62 10.5 2016-17
## 9106 0.3 2.7 68 2.7 2016-17
## 9107 7.3 3.9 67 15.4 2016-17
## 9108 2.6 3.2 53 10.2 2016-17
## 9109 2.3 3.4 22 4.9 2016-17
## 9110 1.5 4.5 2 7.0 2016-17
## 9111 2.1 1.8 41 3.4 2016-17
## 9112 0.3 1.4 25 1.5 2016-17
## 9113 0.5 1.1 37 4.4 2016-17
## 9114 0.0 2.0 7 1.7 2016-17
## 9115 4.5 1.5 2 6.0 2016-17
## 9116 3.0 1.8 19 14.1 2016-17
## 9117 2.6 3.0 82 14.7 2016-17
## 9118 1.6 2.1 78 6.2 2016-17
## 9119 0.9 1.1 14 5.1 2016-17
## 9120 1.5 1.3 17 6.2 2016-17
## 9121 0.9 3.5 78 3.8 2016-17
## 9122 1.5 5.4 75 10.2 2016-17
## 9123 1.9 5.9 70 6.1 2016-17
## 9124 1.7 8.2 73 14.1 2016-17
## 9125 3.0 3.4 47 18.9 2016-17
## 9126 3.7 2.4 46 10.0 2016-17
## 9127 2.0 6.5 71 15.7 2016-17
## 9128 1.3 7.0 72 8.2 2016-17
## 9129 0.4 4.7 71 5.3 2016-17
## 9130 1.1 4.5 75 8.1 2016-17
## 9131 3.4 4.3 60 13.7 2016-17
## 9132 2.9 3.5 73 13.5 2016-17
## 9133 0.7 9.5 80 12.0 2016-17
## 9134 0.7 0.9 16 1.9 2016-17
## 9135 2.3 2.8 79 14.5 2016-17
## 9136 5.2 2.7 65 7.1 2016-17
## 9137 2.0 1.4 64 2.9 2016-17
## 9138 2.2 4.0 70 13.1 2016-17
## 9139 1.2 1.4 42 3.0 2016-17
## 9140 1.0 3.7 77 6.5 2016-17
## 9141 0.2 4.2 73 2.9 2016-17
## 9142 0.5 1.1 16 1.6 2016-17
## 9143 0.9 4.6 72 13.6 2016-17
## 9144 10.4 10.7 81 31.6 2016-17
## 9145 1.2 12.8 81 14.0 2016-17
## 9146 2.8 6.3 30 18.7 2016-17
## 9147 0.4 3.2 48 4.6 2016-17
## 9148 1.3 0.8 14 1.0 2016-17
## 9149 0.9 6.8 79 14.8 2016-17
## 9150 2.0 5.8 78 8.7 2016-17
## 9151 2.2 2.2 39 7.2 2016-17
## 9152 1.6 3.3 78 6.4 2016-17
## 9153 1.6 3.4 59 12.7 2016-17
## 9154 1.0 6.4 81 10.4 2016-17
## 9155 1.5 6.5 67 12.9 2016-17
## 9156 9.1 4.1 75 11.1 2016-17
## 9157 1.0 5.5 57 9.8 2016-17
## 9158 1.0 2.6 79 5.7 2016-17
## 9159 0.7 1.0 6 4.5 2016-17
## 9160 5.2 2.2 52 14.5 2016-17
## 9161 0.9 2.1 31 4.5 2016-17
## 9162 2.4 2.7 80 6.7 2016-17
## 9163 2.1 1.9 52 4.1 2016-17
## 9164 5.1 2.3 68 7.8 2016-17
## 9165 2.7 2.6 70 12.8 2016-17
## 9166 0.4 2.8 78 9.9 2016-17
## 9167 0.5 2.8 8 4.9 2016-17
## 9168 0.4 2.0 57 4.0 2016-17
## 9169 0.6 4.6 48 5.0 2016-17
## 9170 1.6 6.1 74 11.0 2016-17
## 9171 1.7 4.4 62 7.2 2016-17
## 9172 1.8 3.1 74 5.5 2016-17
## 9173 1.1 2.6 78 11.0 2016-17
## 9174 1.1 5.7 54 10.8 2016-17
## 9175 0.9 2.7 59 5.7 2016-17
## 9176 0.6 5.1 67 5.7 2016-17
## 9177 0.9 6.2 78 10.8 2016-17
## 9178 1.1 5.1 66 14.4 2016-17
## 9179 6.6 3.1 81 6.9 2016-17
## 9180 1.1 7.7 80 11.3 2016-17
## 9181 0.0 0.4 8 0.6 2016-17
## 9182 0.2 1.8 19 1.2 2016-17
## 9183 6.6 4.5 79 25.3 2016-17
## 9184 1.4 2.5 77 4.4 2016-17
## 9185 1.5 3.5 54 6.2 2016-17
## 9186 3.1 2.8 59 7.3 2016-17
## 9187 1.8 3.8 80 7.0 2016-17
## 9188 0.8 4.9 33 8.8 2016-17
## 9189 2.8 2.3 55 7.8 2016-17
## 9190 0.5 1.1 30 3.0 2016-17
## 9191 0.7 4.7 18 8.2 2016-17
## 9192 1.8 2.0 76 5.1 2016-17
## 9193 1.3 1.2 53 4.1 2016-17
## 9194 0.5 3.0 62 4.9 2016-17
## 9195 3.6 8.6 74 13.2 2016-17
## 9196 0.9 3.3 75 7.1 2016-17
## 9197 0.9 4.1 64 6.9 2016-17
## 9198 2.3 1.0 23 2.7 2016-17
## 9199 1.5 10.4 82 10.8 2016-17
## 9200 2.0 2.4 74 10.5 2016-17
## 9201 0.6 1.8 5 2.8 2016-17
## 9202 2.0 4.6 79 14.0 2016-17
## 9203 4.6 3.9 79 10.6 2016-17
## 9204 1.2 2.3 33 6.6 2016-17
## 9205 1.0 2.2 65 4.9 2016-17
## 9206 1.7 6.5 76 14.0 2016-17
## 9207 0.7 4.2 82 9.2 2016-17
## 9208 0.8 4.5 82 8.7 2016-17
## 9209 0.5 2.4 21 1.9 2016-17
## 9210 4.6 6.3 74 19.5 2016-17
## 9211 1.4 6.6 76 11.2 2016-17
## 9212 2.6 5.2 74 7.1 2016-17
## 9213 4.7 1.9 76 7.6 2016-17
## 9214 1.1 4.4 77 10.0 2016-17
## 9215 0.3 2.0 32 3.1 2016-17
## 9216 0.4 0.8 25 2.3 2016-17
## 9217 1.0 3.2 74 5.4 2016-17
## 9218 0.9 3.4 56 9.4 2016-17
## 9219 2.5 3.4 45 6.6 2016-17
## 9220 0.2 0.3 9 0.4 2016-17
## 9221 1.4 7.0 81 9.2 2016-17
## 9222 6.3 3.5 69 20.5 2016-17
## 9223 0.9 2.2 53 5.2 2016-17
## 9224 3.5 7.5 81 10.4 2016-17
## 9225 2.7 2.3 69 7.5 2016-17
## 9226 0.5 2.3 4 2.0 2016-17
## 9227 0.5 0.8 22 3.8 2016-17
## 9228 1.5 7.2 66 18.1 2016-17
## 9229 1.3 2.9 72 3.4 2016-17
## 9230 1.6 2.8 67 10.1 2016-17
## 9231 7.0 4.8 60 22.4 2016-17
## 9232 1.5 5.6 79 6.3 2016-17
## 9233 0.3 1.5 32 2.8 2016-17
## 9234 0.1 0.7 14 0.9 2016-17
## 9235 5.8 3.2 72 25.2 2016-17
## 9236 1.9 7.3 72 17.3 2016-17
## 9237 1.2 1.4 5 1.8 2016-17
## 9238 3.3 2.9 18 6.8 2016-17
## 9239 0.8 3.1 46 6.0 2016-17
## 9240 1.3 2.1 74 7.9 2016-17
## 9241 1.5 5.9 63 7.1 2016-17
## 9242 0.0 0.8 5 0.8 2016-17
## 9243 0.9 3.6 61 2.9 2016-17
## 9244 8.7 8.6 74 26.4 2016-17
## 9245 1.2 1.6 67 6.3 2016-17
## 9246 3.0 2.5 81 17.5 2016-17
## 9247 0.5 2.1 80 6.1 2016-17
## 9248 0.7 4.3 57 4.4 2016-17
## 9249 1.0 3.9 36 5.1 2016-17
## 9250 0.5 2.1 68 4.8 2016-17
## 9251 1.3 5.3 56 7.6 2016-17
## 9252 0.5 1.0 22 3.6 2016-17
## 9253 4.2 2.8 75 10.2 2016-17
## 9254 2.6 1.7 73 5.4 2016-17
## 9255 1.1 1.9 20 1.4 2016-17
## 9256 0.9 0.8 40 2.5 2016-17
## 9257 1.4 3.4 70 6.2 2016-17
## 9258 0.5 1.5 2 1.0 2016-17
## 9259 0.6 0.6 5 0.2 2016-17
## 9260 1.9 5.1 80 12.7 2016-17
## 9261 1.9 1.1 65 5.0 2016-17
## 9262 0.2 1.6 22 2.2 2016-17
## 9263 0.7 5.7 71 6.6 2016-17
## 9264 2.1 3.7 78 22.3 2016-17
## 9265 3.4 4.2 29 14.7 2016-17
## 9266 0.5 2.3 53 2.5 2016-17
## 9267 0.5 2.9 49 4.7 2016-17
## 9268 1.9 11.1 60 19.0 2016-17
## 9269 4.8 8.3 62 25.1 2016-17
## 9270 2.5 3.3 76 13.8 2016-17
## 9271 0.4 1.8 18 3.5 2016-17
## 9272 2.4 3.2 73 11.0 2016-17
## 9273 5.5 3.9 79 23.2 2016-17
## 9274 0.6 3.3 79 6.3 2016-17
## 9275 0.5 6.2 47 7.4 2016-17
## 9276 2.0 4.8 75 9.0 2016-17
## 9277 1.4 1.0 42 4.0 2016-17
## 9278 3.5 5.8 74 25.5 2016-17
## 9279 2.7 12.3 82 25.1 2016-17
## 9280 0.3 1.7 49 4.2 2016-17
## 9281 1.9 7.2 65 10.2 2016-17
## 9282 3.7 5.2 18 10.9 2016-17
## 9283 1.2 2.7 82 7.7 2016-17
## 9284 0.7 1.7 3 4.0 2016-17
## 9285 0.9 7.6 61 9.6 2016-17
## 9286 5.0 6.8 68 14.0 2016-17
## 9287 0.9 4.2 66 8.1 2016-17
## 9288 1.6 7.4 61 8.7 2016-17
## 9289 0.5 2.1 45 2.5 2016-17
## 9290 1.0 1.9 68 6.3 2016-17
## 9291 0.7 2.3 70 6.4 2016-17
## 9292 3.2 2.8 74 8.5 2016-17
## 9293 1.1 3.8 58 9.1 2016-17
## 9294 1.3 7.3 81 14.5 2016-17
## 9295 1.2 3.8 65 6.2 2016-17
## 9296 1.0 4.2 67 9.1 2016-17
## 9297 1.0 5.8 51 8.7 2016-17
## 9298 0.6 1.6 20 1.7 2016-17
## 9299 1.0 2.3 60 13.2 2016-17
## 9300 5.9 6.2 77 15.1 2016-17
## 9301 0.9 1.8 54 2.8 2016-17
## 9302 1.6 0.6 18 3.3 2016-17
## 9303 2.4 2.8 80 9.5 2016-17
## 9304 4.9 9.8 73 16.7 2016-17
## 9305 1.1 5.5 70 10.6 2016-17
## 9306 2.8 10.4 75 14.6 2016-17
## 9307 0.4 5.2 74 4.4 2016-17
## 9308 1.1 2.2 76 8.4 2016-17
## 9309 1.1 0.8 13 3.3 2016-17
## 9310 0.6 2.3 35 2.8 2016-17
## 9311 0.5 5.3 31 2.7 2016-17
## 9312 1.0 3.1 36 5.2 2016-17
## 9313 1.5 6.4 80 13.4 2016-17
## 9314 1.2 5.8 81 6.7 2016-17
## 9315 0.3 3.4 55 4.2 2016-17
## 9316 0.9 2.1 18 2.5 2016-17
## 9317 0.6 1.2 41 3.5 2016-17
## 9318 2.0 2.2 69 5.2 2016-17
## 9319 2.6 1.5 50 6.2 2016-17
## 9320 0.0 1.0 1 0.0 2016-17
## 9321 1.7 2.0 66 6.2 2016-17
## 9322 0.6 4.2 66 6.6 2016-17
## 9323 1.8 3.3 68 7.3 2016-17
## 9324 2.1 5.2 63 18.2 2016-17
## 9325 0.2 1.2 19 1.3 2016-17
## 9326 0.4 0.6 45 1.8 2016-17
## 9327 5.9 4.9 75 27.0 2016-17
## 9328 0.0 2.3 10 1.9 2016-17
## 9329 1.0 2.0 1 9.0 2016-17
## 9330 2.7 1.5 78 7.9 2016-17
## 9331 4.8 3.5 63 15.6 2016-17
## 9332 2.2 6.3 81 12.8 2016-17
## 9333 0.6 4.7 66 4.8 2016-17
## 9334 3.3 2.9 80 9.3 2016-17
## 9335 1.2 2.0 82 4.5 2016-17
## 9336 0.4 2.5 62 1.7 2016-17
## 9337 1.6 6.5 62 10.3 2016-17
## 9338 1.0 8.1 65 12.6 2016-17
## 9339 0.2 2.2 13 2.7 2016-17
## 9340 9.2 5.0 61 18.1 2016-17
## 9341 0.1 1.2 16 2.3 2016-17
## 9342 0.4 2.6 12 2.3 2016-17
## 9343 0.6 2.0 5 2.8 2016-17
## 9344 0.2 4.3 17 5.1 2016-17
## 9345 1.3 1.2 26 5.3 2016-17
## 9346 2.3 3.4 77 10.8 2016-17
## 9347 1.0 2.7 41 6.4 2016-17
## 9348 4.6 2.2 68 13.2 2016-17
## 9349 0.8 0.8 39 3.3 2016-17
## 9350 1.5 6.5 54 14.2 2016-17
## 9351 4.3 3.3 46 15.8 2016-17
## 9352 0.0 0.9 7 1.4 2016-17
## 9353 0.1 1.7 36 1.6 2016-17
## 9354 0.6 6.5 76 5.1 2016-17
## 9355 2.1 2.0 65 6.7 2016-17
## 9356 3.4 3.2 78 22.1 2016-17
## 9357 0.6 2.6 50 6.1 2016-17
## 9358 4.4 3.8 64 18.0 2016-17
## 9359 0.4 2.5 32 5.3 2016-17
## 9360 1.1 6.1 50 9.5 2016-17
## 9361 5.6 2.3 64 11.0 2016-17
## 9362 1.1 2.6 57 5.1 2016-17
## 9363 6.3 3.1 79 17.9 2016-17
## 9364 0.6 0.8 5 2.0 2016-17
## 9365 2.1 1.8 27 5.6 2016-17
## 9366 1.3 1.1 38 3.4 2016-17
## 9367 1.0 3.8 72 8.9 2016-17
## 9368 4.6 11.0 72 27.0 2016-17
## 9369 3.9 5.2 74 27.3 2016-17
## 9370 0.7 1.6 38 2.7 2016-17
## 9371 0.9 1.7 62 2.5 2016-17
## 9372 1.2 13.8 81 12.7 2016-17
## 9373 0.7 1.5 67 4.5 2016-17
## 9374 2.2 3.0 68 4.6 2016-17
## 9375 0.7 3.2 20 6.0 2016-17
## 9376 1.6 5.6 79 7.3 2016-17
## 9377 0.6 3.9 74 9.1 2016-17
## 9378 1.0 3.6 81 5.9 2016-17
## 9379 1.6 2.5 34 6.2 2016-17
## 9380 1.9 3.3 57 8.2 2016-17
## 9381 2.8 2.2 74 12.0 2016-17
## 9382 1.3 2.0 61 8.4 2016-17
## 9383 0.4 4.4 75 4.9 2016-17
## 9384 0.3 0.8 8 0.5 2016-17
## 9385 1.6 1.9 15 7.3 2016-17
## 9386 1.2 3.6 65 7.1 2016-17
## 9387 0.5 0.6 49 5.5 2016-17
## 9388 2.1 11.8 75 28.0 2016-17
## 9389 0.7 3.0 11 3.9 2016-17
## 9390 0.5 3.4 23 5.0 2016-17
## 9391 2.3 4.0 82 23.6 2016-17
## 9392 0.3 1.6 38 2.6 2016-17
## 9393 2.2 6.1 55 16.3 2016-17
## 9394 2.8 1.9 72 5.9 2016-17
## 9395 1.0 5.1 79 6.6 2016-17
## 9396 3.4 4.0 76 7.6 2016-17
## 9397 1.1 13.8 81 13.6 2016-17
## 9398 0.7 1.9 14 1.3 2016-17
## 9399 1.8 4.6 80 6.5 2016-17
## 9400 0.5 1.2 13 0.8 2016-17
## 9401 1.2 2.9 79 10.7 2016-17
## 9402 0.3 4.5 39 5.3 2016-17
## 9403 0.8 4.8 6 10.7 2016-17
## 9404 0.6 6.6 77 8.0 2016-17
## 9405 0.6 1.3 68 6.0 2016-17
## 9406 0.7 2.9 42 6.7 2016-17
## 9407 1.8 8.1 27 2.9 2016-17
## 9408 0.0 0.3 4 2.8 2016-17
## 9409 0.0 0.7 3 0.0 2016-17
## 9410 0.8 2.1 61 8.1 2016-17
## 9411 1.8 1.5 31 5.2 2016-17
## 9412 0.5 0.5 22 1.0 2016-17
## 9413 0.6 3.0 76 10.7 2016-17
## 9414 3.6 3.6 80 23.0 2016-17
## 9415 1.8 1.4 62 4.5 2016-17
## 9416 1.5 3.3 82 10.6 2016-17
## 9417 0.6 0.6 36 2.6 2016-17
## 9418 0.4 1.1 9 1.6 2016-17
## 9419 2.3 5.4 75 20.5 2016-17
## 9420 0.3 1.0 3 1.3 2016-17
## 9421 1.1 1.3 20 3.1 2016-17
## 9422 1.3 1.0 41 3.5 2016-17
## 9423 1.0 2.1 47 4.2 2016-17
## 9424 2.4 2.2 54 11.0 2016-17
## 9425 4.9 2.4 81 7.1 2016-17
## 9426 2.1 4.0 79 9.4 2016-17
## 9427 0.4 2.5 52 5.6 2016-17
## 9428 0.5 2.8 28 6.8 2016-17
## 9429 3.5 3.1 77 23.1 2016-17
## 9430 2.3 2.2 73 4.6 2016-17
## 9431 1.4 3.4 81 13.7 2016-17
## 9432 0.5 4.6 64 6.8 2016-17
## 9433 0.6 0.2 25 2.5 2016-17
## 9434 0.3 3.7 35 5.5 2016-17
## 9435 4.9 8.1 61 21.6 2016-17
## 9436 0.9 7.0 81 6.0 2016-17
## 9437 3.4 1.5 39 5.8 2016-17
## 9438 2.9 5.9 74 22.4 2016-17
## 9439 0.5 3.7 56 4.6 2016-17
## 9440 0.9 3.0 34 4.4 2016-17
## 9441 0.9 2.7 66 9.0 2016-17
## 9442 2.2 8.8 46 5.0 2016-17
## 9443 5.5 6.2 76 23.9 2016-17
## 9444 4.3 4.0 3 11.0 2016-17
## 9445 1.9 1.8 63 5.9 2016-17
## 9446 5.1 3.8 36 14.5 2016-17
## 9447 1.2 4.3 62 9.7 2016-17
## 9448 0.6 2.6 80 5.5 2016-17
## 9449 0.1 2.4 51 2.9 2016-17
## 9450 7.8 4.0 82 15.3 2016-17
## 9451 1.2 3.1 69 9.2 2016-17
## 9452 0.8 2.8 78 6.6 2016-17
## 9453 1.3 1.4 74 4.1 2016-17
## 9454 1.3 2.1 36 9.1 2016-17
## 9455 0.5 3.5 74 5.7 2016-17
## 9456 2.5 0.0 2 3.0 2016-17
## 9457 1.0 1.0 2 1.5 2016-17
## 9458 0.2 3.9 42 3.9 2016-17
## 9459 0.0 1.4 5 4.8 2016-17
## 9460 0.3 2.5 11 3.4 2016-17
## 9461 1.9 3.5 64 6.8 2016-17
## 9462 0.1 0.9 29 2.3 2016-17
## 9463 0.3 1.8 52 2.8 2016-17
## 9464 0.3 0.8 48 2.8 2016-17
## 9465 3.6 4.9 76 12.8 2016-17
## 9466 11.2 8.1 81 29.1 2016-17
## 9467 1.0 4.0 64 6.7 2016-17
## 9468 1.0 2.4 9 4.4 2016-17
## 9469 1.0 2.8 52 8.2 2016-17
## 9470 2.7 3.2 82 7.1 2016-17
## 9471 1.8 3.1 78 9.2 2016-17
## 9472 0.1 1.9 29 2.0 2016-17
## 9473 6.7 5.1 69 7.8 2016-17
## 9474 0.0 0.3 3 0.0 2016-17
## 9475 1.9 0.5 14 5.6 2016-17
## 9476 0.5 3.0 38 5.8 2016-17
## 9477 2.4 1.1 8 4.4 2016-17
## 9478 0.8 2.8 44 5.5 2016-17
## 9479 0.4 1.9 25 3.2 2016-17
## 9480 3.7 7.7 69 18.1 2016-17
## 9481 3.3 6.6 75 23.7 2016-17
## 9482 2.3 7.8 64 12.4 2016-17
## 9483 3.5 1.8 80 9.5 2016-17
## 9484 1.2 4.5 65 6.8 2016-17
## 9485 1.1 1.4 71 4.0 2016-17
## 9486 4.2 5.9 67 9.5 2016-17
## 9487 0.0 1.4 5 0.0 2016-17
## 9488 0.7 1.3 39 2.5 2016-17
## 9489 0.5 1.7 11 3.5 2016-17
## 9490 10.7 4.2 78 23.1 2016-17
## 9491 0.2 0.0 5 0.4 2016-17
## 9492 0.3 0.3 4 1.8 2016-17
## 9493 1.0 5.1 58 6.8 2016-17
## 9494 1.0 3.6 70 5.4 2016-17
## 9495 2.1 7.8 31 20.2 2016-17
## 9496 0.2 1.4 12 1.8 2016-17
## 9497 0.2 1.6 19 1.3 2016-17
## 9498 0.5 0.5 33 2.1 2016-17
## 9499 5.1 2.6 75 9.2 2016-17
## 9500 0.8 2.7 81 4.3 2016-17
## 9501 2.1 2.6 82 9.9 2016-17
## 9502 0.2 3.1 54 3.1 2016-17
## 9503 0.9 3.9 22 5.6 2016-17
## 9504 0.2 0.7 23 0.9 2016-17
## 9505 4.2 3.4 49 16.9 2016-17
## 9506 2.2 2.0 6 3.3 2016-17
## 9507 0.5 0.5 2 2.0 2016-17
## 9508 2.9 3.1 57 14.9 2016-17
## 9509 2.6 2.8 65 7.8 2016-17
## 9510 0.9 1.1 37 2.9 2016-17
## 9511 2.2 4.5 75 11.7 2016-17
## 9512 3.2 3.8 65 9.0 2016-17
## 9513 3.0 3.1 68 17.2 2016-17
## 9514 1.7 5.9 82 13.1 2016-17
## 9515 0.7 1.8 47 5.6 2016-17
## 9516 2.5 2.7 75 16.2 2016-17
## 9517 0.9 6.7 72 14.3 2016-17
## 9518 3.9 3.2 55 11.0 2016-17
## 9519 0.5 3.0 2 1.5 2016-17
## 9520 6.5 4.7 82 12.8 2016-17
## 9521 0.5 5.5 2 4.0 2016-17
## 9522 0.6 5.3 46 4.3 2016-17
## 9523 2.2 2.1 73 9.6 2016-17
## 9524 3.8 4.5 60 18.3 2016-17
## 9525 0.6 4.0 77 6.7 2016-17
## 9526 1.4 12.7 74 13.5 2016-17
## 9527 7.0 7.9 76 10.2 2016-17
## 9528 0.5 2.4 43 3.4 2016-17
## 9529 6.3 4.8 66 21.1 2016-17
## 9530 1.6 2.6 72 9.2 2016-17
## 9531 5.4 8.8 80 22.9 2016-17
## 9532 0.7 3.6 69 6.1 2016-17
## 9533 0.3 0.7 35 2.2 2016-17
## 9534 1.2 4.8 50 11.8 2016-17
## 9535 2.2 5.8 72 13.9 2016-17
## 9536 2.8 6.2 51 20.1 2016-17
## 9537 0.2 3.2 77 6.1 2016-17
## 9538 1.1 7.1 77 8.9 2016-17
## 9539 1.5 2.8 41 8.6 2016-17
## 9540 1.4 2.2 78 15.0 2016-17
## 9541 5.5 2.4 35 10.9 2016-17
## 9542 0.8 4.2 38 7.5 2016-17
## 9543 5.2 2.9 81 9.4 2016-17
## 9544 2.6 2.5 73 7.4 2016-17
## 9545 5.9 2.7 76 28.9 2016-17
## 9546 0.8 0.8 4 0.8 2016-17
## 9547 0.9 1.3 39 4.6 2016-17
## 9548 1.4 2.9 76 7.5 2016-17
## 9549 0.6 4.8 31 5.6 2016-17
## 9550 1.2 1.6 77 6.8 2016-17
## 9551 0.9 2.8 40 5.1 2016-17
## 9552 0.4 2.2 19 3.2 2016-17
## 9553 0.7 14.1 77 17.0 2016-17
## 9554 1.5 5.0 79 19.2 2016-17
## 9555 1.7 0.7 3 2.3 2016-17
## 9556 2.3 6.6 81 11.7 2016-17
## 9557 1.9 7.9 82 10.0 2016-17
## 9558 3.5 5.4 73 21.9 2016-17
## 9559 5.8 3.8 73 20.3 2016-17
## 9560 2.6 1.6 82 12.3 2016-17
## 9561 2.4 2.1 78 3.8 2016-17
summary(set_1)
## ast reb gp pts
## Min. : 0.000 Min. : 0.000 Min. : 1.00 Min. : 0.000
## 1st Qu.: 0.500 1st Qu.: 1.600 1st Qu.:32.00 1st Qu.: 3.300
## Median : 1.200 Median : 2.800 Median :62.00 Median : 6.300
## Mean : 1.821 Mean : 3.546 Mean :53.87 Mean : 8.026
## 3rd Qu.: 2.500 3rd Qu.: 4.600 3rd Qu.:77.00 3rd Qu.:12.200
## Max. :11.400 Max. :16.100 Max. :83.00 Max. :29.600
## season
## Length:441
## Class :character
## Mode :character
##
##
##
library(ggplot2)
# Set up the layout for multiple plots
par(mfrow=c(1, 3))
# Set 1: Total Runs Per Innings
plot <- ggplot(data = set_1, aes(x = gp, y = pts)) +
geom_point() +
xlab("Games Played") +
ylab("Average points scored") +
ggtitle("Set 1: Games Played vs Average points scored 1996-97")
# Display the plot
print(plot)
library(ggplot2)
# Set up the layout for multiple plots
par(mfrow=c(1, 3))
# Set 1: Total Runs Per Innings
plot <- ggplot(data = set_1, aes(x = gp, y = reb)) +
geom_point() +
xlab("Games Played") +
ylab("Average Rebounds") +
ggtitle("Set 1: Games Played vs Average Rebounds 1996-97")
# Display the plot
print(plot)
library(ggplot2)
# Set up the layout for multiple plots
par(mfrow=c(1, 3))
# Set 1: Total Runs Per Innings
plot <- ggplot(data = set_1, aes(x = gp, y = ast)) +
geom_point() +
xlab("Games Played") +
ylab("Average Assists") +
ggtitle("Set 1: Games Played vs Average Assist 1996-97")
# Display the plot
print(plot)
summary(set_2)
## ast reb gp pts
## Min. : 0.000 Min. : 0.000 Min. : 1.00 Min. : 0.000
## 1st Qu.: 0.500 1st Qu.: 1.700 1st Qu.:38.00 1st Qu.: 3.100
## Median : 1.100 Median : 2.900 Median :63.00 Median : 6.400
## Mean : 1.766 Mean : 3.503 Mean :54.77 Mean : 8.209
## 3rd Qu.: 2.500 3rd Qu.: 4.600 3rd Qu.:76.00 3rd Qu.:11.600
## Max. :11.600 Max. :12.800 Max. :82.00 Max. :31.600
## season
## Length:458
## Class :character
## Mode :character
##
##
##
library(ggplot2)
# Set up the layout for multiple plots
par(mfrow=c(1, 3))
# Set 1: Total Runs Per Innings
plot <- ggplot(data = set_2, aes(x = gp, y = pts)) +
geom_point() +
xlab("Games Played") +
ylab("Average points scored") +
ggtitle("Set 2: Games Played vs Average points scored 2006-07")
# Display the plot
print(plot)
library(ggplot2)
# Set up the layout for multiple plots
par(mfrow=c(1, 3))
# Set 1: Total Runs Per Innings
plot <- ggplot(data = set_2, aes(x = gp, y = reb)) +
geom_point() +
xlab("Games Played") +
ylab("Average Rebounds") +
ggtitle("Set 2: Games Played vs Average Rebounds 2006-07")
# Display the plot
print(plot)
library(ggplot2)
# Set up the layout for multiple plots
par(mfrow=c(1, 3))
# Set 1: Total Runs Per Innings
plot <- ggplot(data = set_2, aes(x = gp, y = ast)) +
geom_point() +
xlab("Games Played") +
ylab("Average Assists") +
ggtitle("Set 2: Games Played vs Average Assists 2006-07")
# Display the plot
print(plot)
summary(set_3)
## ast reb gp pts
## Min. : 0.00 Min. : 0.000 Min. : 1.00 Min. : 0.000
## 1st Qu.: 0.60 1st Qu.: 1.900 1st Qu.:35.25 1st Qu.: 4.125
## Median : 1.20 Median : 3.000 Median :62.50 Median : 6.800
## Mean : 1.83 Mean : 3.565 Mean :53.78 Mean : 8.427
## 3rd Qu.: 2.30 3rd Qu.: 4.700 3rd Qu.:75.00 3rd Qu.:10.975
## Max. :11.20 Max. :14.100 Max. :82.00 Max. :31.600
## season
## Length:486
## Class :character
## Mode :character
##
##
##
library(ggplot2)
# Set up the layout for multiple plots
par(mfrow=c(1, 3))
# Set 1: Total Runs Per Innings
plot <- ggplot(data = set_3, aes(x = gp, y = pts)) +
geom_point() +
xlab("Games Played") +
ylab("Average points scored") +
ggtitle("Set 3: Games Played vs Average points scored 2016-17")
# Display the plot
print(plot)
library(ggplot2)
# Set up the layout for multiple plots
par(mfrow=c(1, 3))
# Set 1: Total Runs Per Innings
plot <- ggplot(data = set_3, aes(x = gp, y = reb)) +
geom_point() +
xlab("Games Played") +
ylab("Average Rebounds") +
ggtitle("Set 3: Games Played vs Average Rebounds 2016-17")
# Display the plot
print(plot)
library(ggplot2)
# Set up the layout for multiple plots
par(mfrow=c(1, 3))
# Set 1: Total Runs Per Innings
plot <- ggplot(data = set_3, aes(x = gp, y = ast)) +
geom_point() +
xlab("Games Played") +
ylab("Average Assists") +
ggtitle("Set 3: Games Played vs Average Assists 2016-17")
# Display the plot
print(plot)
cor1 <- cor(set_1$pts,set_1$gp,method = 'pearson')
print(cor1)
## [1] 0.5767682
cor2 <- cor(set_2$pts,set_2$gp,method = 'pearson')
print(cor2)
## [1] 0.5270583
cor3 <- cor(set_3$pts,set_3$gp,method = 'pearson')
print(cor3)
## [1] 0.5411452
cor1 <- cor(set_1$reb,set_1$gp,method = 'pearson')
print(cor1)
## [1] 0.4437683
cor2 <- cor(set_2$reb,set_2$gp,method = 'pearson')
print(cor2)
## [1] 0.4728934
cor3 <- cor(set_3$reb,set_3$gp,method = 'pearson')
print(cor3)
## [1] 0.4764132
cor1 <- cor(set_1$ast,set_1$gp,method = 'pearson')
print(cor1)
## [1] 0.4286226
cor2 <- cor(set_2$ast,set_2$gp,method = 'pearson')
print(cor2)
## [1] 0.4032346
cor3 <- cor(set_3$ast,set_3$gp,method = 'pearson')
print(cor3)
## [1] 0.3671519