Purpose

In this project, students will demonstrate their understanding of probability and the normal and binomial distributions.


Question 1

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.

  1. P(x > 65)
# Probability of IQ greater than 65
pnorm(65, mean = 100, sd = 15, lower.tail = FALSE)
## [1] 0.9901847
  1. P(x < 150)
# Probability of IQ less than 150
pnorm(150, mean = 100, sd = 15)
## [1] 0.9995709

Question 2

Assume the same mean and standard deviation of IQ scores that was described in question 1.

  1. A high school offers a special program for gifted students. In order to qualify, students must have IQ scores in the top 5%. What is the minimum qualifying IQ?
qnorm(0.95, mean = 100, sd = 15)
## [1] 124.6728

The minimum IQ is 124.7.

  1. If one person is randomly selected, what is the probability that their IQ score is greater than 110?
pnorm(110, mean = 100, sd = 15, lower.tail = FALSE)
## [1] 0.2524925

There is a 25 percent chance that a randomly selected person has an IQ greater than 110.

Question 3

  1. Still using the mean and standard deviation from question 1, what is the z-score for an IQ of 140?
(140 - 100) / 15
## [1] 2.666667

The z-score of 140 IQ is 2.67.

  1. We mentioned in week 6 that a data value is considered “unusual” if it lies more than two standard deviations from the mean. Is an IQ of 140 considered unusual?
    140 Is considered an “unusual” IQ as it is more than two standard deviations from the mean.

  2. What is the probability of getting an IQ greater than 140?

pnorm(140, mean = 100, sd = 15, lower.tail = FALSE)
## [1] 0.003830381

The probability of an IQ greate than 140 is 0.383 percent

Question 4

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.

  1. How many questions do you expect to answer correctly on average?
0.2*15
## [1] 3

You can expect to answer 3 correctly on average.

  1. What is the probability that you get every question correct?
dbinom(15, 15, 0.2)
## [1] 3.2768e-11

The probability is extremely low, practically zero.

  1. What is the probability that you get every question incorrect?
dbinom(0, 15, 0.2)
## [1] 0.03518437

The probablility of getting all questions incorrect is 3.5 percent.

Question 5

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.

  1. How many questions does one need to answer correctly in order score exactly a 60%?
    Nine questions answered correctly gives one 60%.

  2. If a grade of 60% or lower is considered failing, then what is the probability of you failing? There is a 99.99% chance that you fail.

pbinom(size = 15, prob = 0.2, q = 9)
## [1] 0.9998868
  1. If you need a grade of 80% or higher on this quiz to maintain a passing grade, what is the probability of you maintaining that passing grade? The probability is practically zero.
pbinom(size = 15, prob = 0.2, q = 11, lower.tail = FALSE)
## [1] 1.011253e-06

Question 6

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.

  1. Suppose you schedule 5 employees, what is the probability that all 5 come to work? 32.8%
dbinom(size = 5, prob = 0.8, x = 5)
## [1] 0.32768
  1. Suppose you schedule 7 employees, what is the probability that at least 5 come to work? 85.2%
pbinom(size = 7, prob = 0.8, q = 4, lower.tail = FALSE)
## [1] 0.851968
  1. It is really important that you have at least 5 servers show up! How many employees should you schedule in order to be 99% confident that at least 5 show up? Hint: there is no single formula for the answer here, so maybe use some kind of trial and error method.

Question 7

  1. Generate a random sample of 10,000 numbers from a normal distribution with mean of 51 and standard deviation of 7. Store that data in object called rand_nums.
rand_nums <- rnorm(mean = 51, sd = 7, n = 10000)
  1. Create a histogram of that random sample.
hist(rand_nums, breaks = 32)

Question 8

  1. How many values in your rand_nums vector are below 40?
length(rand_nums[rand_nums < 40])
## [1] 565
  1. For a theoretical normal distribution, how many of those 10,000 values would you expect to be below 40? 580
pnorm(mean = 51, sd = 7, q = 40) * 10000
## [1] 580.4157
  1. Is your answer in part a reasonably close to your answer in part b? I believe it is.