All Data from 2022 season was collected on September 18 2022 from FanGraphs.com.

Orioles Team Data from 2002 to 2021

Orioles_Data

2023 Free Agent Position Players with corresponding Stats and Salary

Free_Agents_Batters

2023 Free Agent Pitchers with corresponding Stats and Salary

Free_Agents_Pitchers

Scatterplot and Correlation Matrix to determine which offensive stats have the greatest correlation with winning percentage

OriolesOffensivematrix = Orioles_Data[,c(2:10)]
plot(OriolesOffensivematrix, pch = 20)

round(cor(OriolesOffensivematrix),3)
##       WPct    BA   OBP   SLG   OPS   wRC  wRC.  wOBA  wRAA
## WPct 1.000 0.251 0.129 0.608 0.466 0.355 0.789 0.480 0.774
## BA   0.251 1.000 0.943 0.438 0.800 0.814 0.490 0.848 0.446
## OBP  0.129 0.943 1.000 0.392 0.801 0.853 0.413 0.868 0.374
## SLG  0.608 0.438 0.392 1.000 0.865 0.762 0.833 0.726 0.779
## OPS  0.466 0.800 0.801 0.865 1.000 0.961 0.767 0.946 0.711
## wRC  0.355 0.814 0.853 0.762 0.961 1.000 0.691 0.933 0.632
## wRC. 0.789 0.490 0.413 0.833 0.767 0.691 1.000 0.747 0.936
## wOBA 0.480 0.848 0.868 0.726 0.946 0.933 0.747 1.000 0.704
## wRAA 0.774 0.446 0.374 0.779 0.711 0.632 0.936 0.704 1.000

Scatterplot and Correlation Matrix to determine which pitching stats have the greatest correlation with winning percentage

OriolesPitchingMatrix = Orioles_Data[,c(2,11:16)]
plot(OriolesPitchingMatrix, pch = 20)

round(cor(OriolesPitchingMatrix),3)
##         WPct   WHIP    ERA   ERA.    FIP   xFIP  SIERA
## WPct   1.000 -0.734 -0.866  0.892 -0.836 -0.747 -0.671
## WHIP  -0.734  1.000  0.870 -0.841  0.819  0.851  0.881
## ERA   -0.866  0.870  1.000 -0.956  0.939  0.916  0.869
## ERA.   0.892 -0.841 -0.956  1.000 -0.881 -0.814 -0.784
## FIP   -0.836  0.819  0.939 -0.881  1.000  0.945  0.894
## xFIP  -0.747  0.851  0.916 -0.814  0.945  1.000  0.968
## SIERA -0.671  0.881  0.869 -0.784  0.894  0.968  1.000

Final Chosen Model which included ERA+, wRAA, and SLG stats as the best indicators to predict the teams winning percentage, however we will be disregarding SLG as it is not statistically significant in predicting winning percentage

summary(Orioles_Total_final)
## 
## Call:
## lm(formula = WPct ~ ERA. + wRAA + SLG, data = Orioles_Data)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.034954 -0.021394  0.000265  0.016450  0.036552 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -0.4750707  0.2764015  -1.719   0.1062    
## ERA.         0.0059766  0.0007416   8.059 7.86e-07 ***
## wRAA         0.0005157  0.0002447   2.108   0.0523 .  
## SLG          0.8797675  0.6101302   1.442   0.1699    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.02444 on 15 degrees of freedom
## Multiple R-squared:  0.9247, Adjusted R-squared:  0.9096 
## F-statistic: 61.37 on 3 and 15 DF,  p-value: 1.184e-08

A list of the 2023 hitting free agents with wRAA stat accompanied by salary and wRAA per salary in millions to give the top 30 players that provide the players with the best wRAA per salary

Best_Free_Agent_Batters = Free_Agents_Batters[with(Free_Agents_Batters, order(-wRAA.Cost..Millions.)),]
Best_Free_Agent_Batters = Best_Free_Agent_Batters[1:40,]
Best_Free_Agent_Batters = Best_Free_Agent_Batters[c(1:4,8,9)]
print(Best_Free_Agent_Batters)
##               PLAYER POS.  AGE       Salary Average.wRAA wRAA.Cost..Millions.
## 62     Brandon Drury   3B   30    $900,000          8.95                9.944
## 64     Rob Refsnyder   RF 31.4    $800,000          2.40                3.000
## 4        Aaron Judge   RF 30.3 $19,000,000         54.25                2.855
## 50    Matt Carpenter   3B 36.8  $2,000,000          5.15                2.575
## 28     Brandon Nimmo   RF 29.4  $7,000,000         16.20                2.314
## 47     Albert Pujols   DH 42.7  $2,500,000          4.80                1.920
## 17         Josh Bell   1B 30.1 $10,000,000         18.80                1.880
## 39      Tyler Naquin   LF 31.3  $4,025,000          7.40                1.839
## 3        Trea Turner   SS 29.2 $21,000,000         31.60                1.505
## 29      Joc Pederson   LF 30.3  $6,000,000          9.00                1.500
## 18 Willson Contreras    C 30.3  $9,625,000         13.45                1.397
## 8         Jose Abreu   1B 35.6 $19,666,668         25.15                1.279
## 51     Jace Peterson   3B 32.3  $1,825,000          2.15                1.178
## 22 Andrew Benintendi   LF 28.2  $8,500,000          9.55                1.124
## 27  Yulieski Gurriel   1B 38.2  $8,000,000          7.65                0.956
## 15    Dansby Swanson   SS 28.6 $10,000,000          9.40                0.940
## 2      J.D. Martinez   DH   35 $19,350,000         18.05                0.933
## 10     Anthony Rizzo   1B 33.1 $16,000,000         14.90                0.931
## 25     Mitch Haniger   RF $32   $7,750,000          6.35                0.819
## 7       Brandon Belt   1B 34.3 $18,400,000         13.60                0.739
## 12      A.J. Pollock   LF 34.8 $10,000,000          7.15                0.715
## 1      Nolan Arenado   3B 31.4 $35,000,000         23.35                0.667
## 9   Michael Brantley   LF 35.3 $16,000,000         10.55                0.659
## 36    Donovan Solano   2B 34.7  $4,500,000          2.55                0.567
## 23  Andrew McCutchen   DH 35.9  $8,500,000          4.80                0.565
## 13        Joey Gallo   LF $29  $10,275,000          5.50                0.535
## 35   Corey Dickerson   LF $33   $5,000,000          2.15                0.430
## 34   Robbie Grossman   RF   33  $5,000,000          1.95                0.390
## 44       Mike Zunino    C 31.4  $7,000,000          2.35                0.336
## 52         Ben Gamel   RF 30.2  $1,800,000          0.55                0.306
## 5   Charlie Blackmon   DH 36.2 $18,333,334          4.70                0.256
## 26     David Peralta   LF 35.1  $8,000,000          1.85                0.231
## 38      Aledmys Diaz   SS 32.1  $4,450,000          0.70                0.157
## 6        Eric Hosmer   1B 32.8 $13,000,000          1.55                0.119
## 11       Jorge Soler   DH 30.5 $15,000,000          1.50                0.100
## 19       Adam Duvall   RF $34   $9,275,000          0.30                0.032
## 24      Adam Frazier   2B 30.8  $8,000,000         -0.45               -0.056
## 31     Jose Iglesias   SS 32.7  $5,000,000         -0.35               -0.070
## 14  Jurickson Profar   LF 29.5  $8,333,333         -1.30               -0.156
## 55         Jake Lamb   1B 31.9  $1,500,000         -0.40               -0.267

A list of the 2023 pitching free agents with ERA+ stat accompanied by salary and ERA+ per salary in millions to give the top 40 players that provide the best ERA+ per salary

Best_Free_Agent_Pitchers = Free_Agents_Pitchers[with(Free_Agents_Pitchers, order(-ERA..Cost..Millions.)),]
Best_Free_Agent_Pitchers = Best_Free_Agent_Pitchers[1:40,]
Best_Free_Agent_Pitchers = Best_Free_Agent_Pitchers[c(1,2,4,7,8)]
print(Best_Free_Agent_Pitchers)
##               Player POS.          Salary Average.ERA. ERA..Cost..Millions.
## 62        Jason Adam   RP    $900,000.00         157.5               175.00
## 63    Erasmo Ramirez   SP    $700,000.00         101.5               145.00
## 60      Jesse Chavez   RP  $1,250,000.00         164.0               131.20
## 64        Jose Urena   SP    $700,000.00          77.0               110.00
## 65     Daniel Norris   RP    $700,000.00          68.5                97.86
## 58 Hunter Strickland   RP  $1,825,000.00         165.0                90.41
## 61      Jose Alvarez   RP  $1,500,000.00         126.0                84.00
## 53     Justin Wilson   RP  $2,300,000.00         143.5                62.39
## 59      Steve Cishek   RP  $1,750,000.00         109.0                62.29
## 54        Matt Moore   SP  $2,500,000.00         129.5                51.80
## 56     Jose Quintana   SP  $2,000,000.00          97.0                48.50
## 55      Chris Martin   RP  $2,500,000.00         116.0                46.40
## 57    Jeurys Familia   RP  $2,000,000.00          85.0                42.50
## 51    Rafael Montero   RP  $2,725,000.00         114.5                42.02
## 52     Miguel Castro   RP  $2,620,000.00         107.0                40.84
## 47    Carlos Estevez   RP  $3,025,000.00         121.0                40.00
## 45   David Robertson   RP  $3,500,000.00         134.5                38.43
## 38     Adam Ottavino   RP  $4,000,000.00         152.0                38.00
## 40        Chad Green   RP  $4,000,000.00         135.5                33.88
## 49    Matthew Strahm   RP  $3,000,000.00          94.5                31.50
## 41         Seth Lugo   RP  $3,925,000.00         117.5                29.94
## 43    Ross Stripling   SP  $3,790,000.00         112.5                29.68
## 39      Martin Perez   SP  $4,000,000.00         118.5                29.63
## 48         Chad Kuhl   SP  $3,000,000.00          88.5                29.50
## 16     Andrew Chafin   RP  $7,000,000.00         197.0                28.14
## 35     Craig Stammen   RP  $4,000,000.00         112.5                28.13
## 42   Trevor Williams   RP  $3,900,000.00         108.5                27.82
## 29         Brad Hand   RP  $6,000,000.00         166.5                27.75
## 36      Johnny Cueto   SP  $4,200,000.00         114.0                27.14
## 44    Archie Bradley   RP  $3,750,000.00          99.0                26.40
## 34    Michael Fulmer   RP  $4,950,000.00         127.0                25.66
## 37       Alex Colome   RP  $4,100,000.00          97.0                23.66
## 50 Vincent Velasquez   SP  $3,000,000.00          70.5                23.50
## 32         Matt Boyd   SP  $5,200,000.00         105.5                20.29
## 33         Rich Hill   SP  $5,000,000.00          98.0                19.60
## 17        Edwin Diaz   RP $10,200,000.00         195.5                19.17
## 30   Jameson Taillon   SP  $5,800,000.00          99.5                17.16
## 27     Michael Wacha   SP  $7,000,000.00         119.5                17.07
## 15    Taijuan Walker   SP  $6,000,000.00         102.0                17.00
## 22    Tyler Anderson   SP  $8,000,000.00         124.0                15.50

After evaluating the presented data and comparing to the Orioles current roster and future prospects, I have come to the conclusion that Matt Boyd from the San Francisco Giants would be the best sign for the Orioles in the 2023 free agent class. As the Orioles weakest component is their starting pitching staff, it would be best to increase the value of the starting pitching staff. With this, I would expect a contract around $5.5 million AAV for Matt Boyd