Gaussian Distribution

This is an R Markdown document of a Gaussian Distribution comparing the number of rushing yards per game by the Giants and the Jets.

gval <- c(118, 142, 129, 217, 126, 128, 123, 134, 90, 89, 191, 78, 236, 83, 125)


# gval = rushing yards per game for Giants

mean(gval)
## [1] 133.9333
# mean = 133.933
sd(gval)
## [1] 46.9703
# standard deviation = 46.9703

xval <- seq (60,300,5)
xval
##  [1]  60  65  70  75  80  85  90  95 100 105 110 115 120 125 130 135 140 145 150
## [20] 155 160 165 170 175 180 185 190 195 200 205 210 215 220 225 230 235 240 245
## [39] 250 255 260 265 270 275 280 285 290 295 300
gdp <- dnorm(xval,133.933,46.9703)
gdp
##  [1] 2.460845e-03 2.893294e-03 3.363408e-03 3.865852e-03 4.393289e-03
##  [6] 4.936429e-03 5.484220e-03 6.024146e-03 6.542667e-03 7.025754e-03
## [11] 7.459500e-03 7.830785e-03 8.127922e-03 8.341277e-03 8.463778e-03
## [16] 8.491310e-03 8.422943e-03 8.260983e-03 8.010845e-03 7.680751e-03
## [21] 7.281280e-03 6.824809e-03 6.324876e-03 5.795518e-03 5.250628e-03
## [26] 4.703368e-03 4.165674e-03 3.647879e-03 3.158452e-03 2.703877e-03
## [31] 2.288644e-03 1.915350e-03 1.584882e-03 1.296655e-03 1.048892e-03
## [36] 8.389105e-04 6.634058e-04 5.187065e-04 4.009985e-04 3.065086e-04
## [41] 2.316441e-04 1.730926e-04 1.278835e-04 9.341770e-05 6.747185e-05
## [46] 4.818311e-05 3.402090e-05 2.375064e-05 1.639395e-05
#giants rushing yards distribution

Plots

Plots shown below signify Guassian Distribution of rushing yards of the two teams

plot (xval,gdp, xlab="Total Rushing Yards", ylab="Probability", main="Giants vs Jets Rushing Yards")


#jets rushing yards per game
jval <- c(38,75,66,50,76,120,158,59,174,51,155,179,135,98,76)


# mean jets rushing yards=100.6667
mean(jval)
## [1] 100.6667
#standard deviation jets rushing yards=48.61462
sd(jval)
## [1] 48.61462
#jets rushing yards distribution
jdp <- dnorm(xval,100.6667,48.61462)
jdp
##  [1] 5.783543e-03 6.269913e-03 6.725662e-03 7.138625e-03 7.497218e-03
##  [6] 7.790972e-03 8.011046e-03 8.150660e-03 8.205449e-03 8.173685e-03
## [11] 8.056371e-03 7.857186e-03 7.582294e-03 7.240027e-03 6.840468e-03
## [16] 6.394954e-03 5.915548e-03 5.414503e-03 4.903749e-03 4.394443e-03
## [21] 3.896597e-03 3.418795e-03 2.968019e-03 2.549566e-03 2.167065e-03
## [26] 1.822567e-03 1.516705e-03 1.248892e-03 1.017547e-03 8.203331e-04
## [31] 6.543828e-04 5.165110e-04 4.033976e-04 3.117403e-04 2.383739e-04
## [36] 1.803559e-04 1.350231e-04 1.000211e-04 7.331307e-05 5.317128e-05
## [41] 3.815741e-05 2.709484e-05 1.903708e-05 1.323488e-05 9.104284e-06
## [46] 6.196943e-06 4.173643e-06 2.781372e-06 1.834040e-06
points (xval,jdp,pch=3)