#Formula for Normal Distribution# rnorm(n, mean, sd)

#Problem 1 formula# x <- rnorm(10, mean=51, sd=3)

#Probability of boys taller than 50 inches# ##Without Pnorm function## ##We will use the Mean function to calculate proportions. Since Mean turns True into a 1 and False into a 1, it can be used to calculate the sum of the Trues and or Falses. In this case, the Trues## print(x) x - 50 x > 50 mean(x > 50) ##Answer= (.7) There is a 70% chance/7 out of 10 chance that a boy will be over 50 inches##

#Problem 2 formulas# x <- rnorm(10, mean=51, sd=3) y <- rnorm(10, mean=53, sd=2.5)

#Probability of taller boys than girls# x > y mean(x > y) ##Answer= (.2) There will be a 20% chance that a boy will be taller than a girl##

#Formula for Normal Distribution#
#rnorm(n, mean, sd)#

#Problem 1 formula#
x <- rnorm(10, mean=51, sd=3)

#Probability of boys taller than 50 inches#
##Without Pnorm function##
##We will use the Mean function to calculate proportions. Since Mean turns True into a 1 and False into a 1, it can be used to calculate the sum of the Trues and or Falses. In this case, the Trues##
print(x)
##  [1] 46.32924 51.81874 47.95265 51.65832 52.59332 56.06950 53.96745 54.53200
##  [9] 47.24742 55.32606
x - 50
##  [1] -3.670760  1.818737 -2.047347  1.658323  2.593325  6.069499  3.967454
##  [8]  4.532003 -2.752576  5.326056
x > 50
##  [1] FALSE  TRUE FALSE  TRUE  TRUE  TRUE  TRUE  TRUE FALSE  TRUE
mean(x > 50)
## [1] 0.7
##Answer= (.7) There is a 70% chance/7 out of 10 chance that a boy will be over 50 inches##

#Problem 2 formulas#
x <- rnorm(10, mean=51, sd=3)
y <- rnorm(10, mean=53, sd=2.5)

#Probability of taller boys than girls#
x > y
##  [1] FALSE FALSE FALSE  TRUE  TRUE  TRUE FALSE FALSE FALSE  TRUE
mean(x > y)
## [1] 0.4
##Answer= (.2) There will be a 20% chance that a boy will be taller than a girl##