This project will demonstrate your understanding of the normal and binomial probability distributions in R and RStudio.
Assume IQ scores are normally distributed with a mean of 100 and a standard deviation of 15. If a person is randomly selected, find each of the requested probabilities. Here, x, denotes the IQ of the randomly selected person.
pnorm( 65, mean = 100, sd = 15, lower.tail = FALSE)
## [1] 0.9901847
# There is a 0.99 probality that a randomly selected IQ score is higher than 65.
pnorm( 150, 100, 15, lower.tail = TRUE)
## [1] 0.9995709
# There is a 0.999 chance that a randomly selected IQ score is lower than 150.
,
Assume the same mean and standard deviation of IQ scores that was described in question 2.
qnorm( 0.95, 100, 15, lower.tail = TRUE)
## [1] 124.6728
# An IQ score of 125 is the minimum needed to be in the top 5%.
pnorm(125, 100, 15, lower.tail = FALSE )
## [1] 0.04779035
# There is a 0.047 probabiltiythat a randomly selected IQ is greater than 125.
(140 - 100)/ 15
## [1] 2.666667
# The z-score for an IQ of 140 is 2.67.
# An IQ of 140 is considered unusual, because it has a z-score of 2.67. Which is more than two standard deviations away from the mean.
pnorm( 140, 100, 15, lower.tail = FALSE)
## [1] 0.003830381
# There is a 0.0038 probability that one have an IQ greater than 140.
You are taking a 15-question multiple choice quiz and each question has 5 options (a,b,c,d,e) and you randomly guess every question.
# mean = nxp
15*0.20
## [1] 3
# One would expect to get 3 questions right if one guessed on all of them.
dbinom(15, 15, 0.03)
## [1] 1.434891e-23
# There is a 1.434891e^-23 chance that by guessing one will get every question right.
dbinom(0, 15, 0.20)
## [1] 0.03518437
# There is a 0.035 probalitly of getting every question wrong.
Consider still the 15-question multiple choice quiz that each question has 5 options (a,b,c,d,e) and you randomly guess every question.
#(60/100) = (x/15)
(60/100)
## [1] 0.6
# 0.6= x/15
0.6*15
## [1] 9
#9=x
# One needs to get six answers correct to recieve a sixty percent.
pbinom(9, 15, 0.2)
## [1] 0.9998868
#There is a 0.9998 probability of one failing while guessing on every question.
pbinom(12,15,0.2)
## [1] 0.9999999
1- pbinom(12,15,0.2)
## [1] 5.704909e-08
# There is a 5.704909e-08 probablity that one will keep their grade at a passing rate.
Suppose you own a catering company. You hire local college students as servers. Not being the most reliable employees, there is an 80% chance that any one server will actually show up for a scheduled event. For a wedding scheduled on Saturday, you need at least 5 servers.
dbinom(5,5,0.8)
## [1] 0.32768
# There is a 0.33 probability that five employees show up.
pbinom(4, 7, 0.8, lower.tail = FALSE)
## [1] 0.851968
# If eight workers are schedueled, then there is a 0.85 probability that five workers show up.
pbinom(4, 9, 0.8, lower.tail = FALSE)
## [1] 0.9804186
pbinom(4, 10, 0.8, lower.tail = FALSE)
## [1] 0.9936306
# One needs to scheduele ten employees to have a 99% chance that five will show up.