CUNY SPS Bridge: Math Assignment 3

Name: Chinedu Onyeka; Date: August 6th, 2021

Problem 1: “The weights of steers in a herd are distributed normally. The variance is 40,000 and the mean steer weight is 1300 lbs. Find the probability that the weight of a randomly selected steer is greater than 979 lbs. (Round your answer to 4 decimal places)”
#Soluton to problem 1
xbar <- 1300 #mean
var <- 40000 #variance
std <- sqrt(var) #standard deviation
q <- 979
prob <- round(pnorm(q, mean = xbar, sd = std, lower.tail = FALSE),4)
sprintf("The probability that a randomly selected steer is greater than %s is %s",q,prob)
## [1] "The probability that a randomly selected steer is greater than 979 is 0.9458"
Problem 2: SVGA monitors manufactured by TSI Electronics have life spans that have a normal distribution with a variance of 1,960,000 and a mean life span of 11,000 hours. If a SVGA monitor is selected at random, find the probability that the life span of the monitor will be more than 8340 hours. (Round your answer to 4 decimal places)
#Solution to problem 2
xbar <- 11000 #mean
var <- 1960000 #variance
std <- sqrt(var) #standard deviation
q <- 8340 
prob <- round(pnorm(q, mean = xbar, sd = std, lower.tail = FALSE),4) #probability
sprintf("The probability that a randomly selected SVGA monitor is greater than %s hours is %s",q, prob)
## [1] "The probability that a randomly selected SVGA monitor is greater than 8340 hours is 0.9713"
Problem 3: Suppose the mean income of firms in the industry for a year is 80 million dollars with a standard deviation of 3 million dollars. If incomes for the industry are distributed normally, what is the probability that a randomly selected firm will earn between 83 and 85 million dollars? (Round your answer to 4 decimal places)
#Solution to problem 3
xbar <- 80 #Mean in million dollars
std <- 3 #Standard deviation in million dollars
q2 <- 85
q1 <- 83
prob <- round(pnorm(q2, mean = xbar, sd = std, lower.tail = TRUE)- pnorm(q1, mean = xbar, sd = std, lower.tail = TRUE),4)
sprintf("The probability that a randomly selected firm will earn between %s and %s million dollars is %s", q1,q2,prob)
## [1] "The probability that a randomly selected firm will earn between 83 and 85 million dollars is 0.1109"
Problem 4: Suppose GRE Verbal scores are normally distributed with a mean of 456 and a standard deviation of 123. A university plans to offer tutoring jobs to students whose scores are in the top 14%. What is the minimum score required for the job offer? Round your answer to the nearest whole number, if necessary.
#Solution to problem 4
xbar <- 456 #Mean of GRE Verbal scores
std <- 123 #Standard deviation of Verbal scores
p <- 0.14
min.score <- round(qnorm(p, mean = xbar, sd = std, lower.tail = FALSE),0)

paste0("The minimum score required for the job offer is ", min.score)
## [1] "The minimum score required for the job offer is 589"
Problem 5: The lengths of nails produced in a factory are normally distributed with a mean of 6.13 centimeters and a standard deviation of 0.06 centimeters. Find the two lengths that separate the top 7% and the bottom 7%. These lengths could serve as limits used to identify which nails should be rejected. Round your answer to the nearest hundredth, if necessary.
#Solution to problem 5
xbar <- 6.13 #Mean of nail lengths
std <- 0.06 #Standard deviation of nail lengths
p <- 0.07
min.length <- round(qnorm(p, mean = xbar, sd = std, lower.tail = TRUE),2)
max.length <- round(qnorm(p, mean = xbar, sd = std, lower.tail = FALSE),2)
sprintf("The lower and upper limit of nail lengths are %s and %s respectively", min.length, max.length)
## [1] "The lower and upper limit of nail lengths are 6.04 and 6.22 respectively"
Problem 6: An English professor assigns letter grades on a test according to the following scheme.
A: Top 13% of scores
B: Scores below the top 13% and above the bottom 55%
C: Scores below the top 45% and above the bottom 20%
D: Scores below the top 80% and above the bottom 9%
F: Bottom 9% of scores
Scores on the test are normally distributed with a mean of 78.8 and a standard deviation of 9.8. Find the numerical limits for a C grade. Round your answers to the nearest whole number, if necessary.
#Solution to problem 6
xbar <- 78.8 #Mean scores
std <- 9.8 #Standard deviation of scores
p1 <- 0.2 #Probability for scores above the bottom 20%
p2 <- 0.45 #Probability for scores below top 45%
q1 <- round(qnorm(p1, mean = xbar, sd = std, lower.tail = TRUE),0)
q2 <- round(qnorm(p2, mean = xbar, sd = std, lower.tail = FALSE),0)
sprintf("The numerical limits for a C grade are %s and %s", q1, q2)
## [1] "The numerical limits for a C grade are 71 and 80"
Problem 7: Suppose ACT Composite scores are normally distributed with a mean of 21.2 and a standard deviation of 5.4. A university plans to admit students whose scores are in the top 45%. What is the minimum score required for admission? Round your answer to the nearest tenth, if necessary.
#Solution to problem 7
xbar <- 21.2 #Mean ACT score
std <- 5.4 #Standard deviation of ACT scores
p <- 0.45
score <- round(qnorm(p, mean = xbar, sd = std, lower.tail = TRUE),0)
paste0("The minimum score required for admission is ",score)
## [1] "The minimum score required for admission is 21"
Problem 8: Consider the probability that less than 11 out of 151 students will not graduate on time. Assume the probability that a given student will not graduate on time is 9%.Approximate the probability using the normal distribution. (Round your answer to 4 decimal places.)
#Solution to problem 8
n <- 151
q <- 10 # for less than 11, q = 10
x <- 0.09
p <- round(pbinom(q = q, size = n, prob = x),4)
paste0("The probability that less than 11 out of 151 students will graduate on time is ", p)
## [1] "The probability that less than 11 out of 151 students will graduate on time is 0.192"
Problem 9: The mean lifetime of a tire is 48 months with a standard deviation of 7. If 147 tires are sampled, what is the probability that the mean of the sample would be greater than 48.83 months? (Round your answer to 4 decimal places)
#Solution to problem 9
xbar <- 48 #Mean lifetime of a tire in months
std <- 7  #Standard deviation of lifetime of a tire in months
n <- 147
se <- std/sqrt(n) #Standard Error is the standard deviation of the sampling distribution
q <- 48.83
p <- round(pnorm(q = q, mean = xbar, sd = se, lower.tail = FALSE),4)
sprintf("The probability that the mean of the sample would be greater than %s months is %s", q,p)
## [1] "The probability that the mean of the sample would be greater than 48.83 months is 0.0753"
Problem 10: The quality control manager at a computer manufacturing company believes that the mean life of a computer is 91 months, with a standard deviation of 10. If he is correct, what is the probability that the mean of a sample of 68 computers would be greater than 93.54 months? (Round your answer to 4 decimal places)
#Solution to problem 10
xbar <- 91 #Mean life of a computer
std <- 10  #Standard deviation of the mean life of a computer
n <- 68    #Number of samples in the sampling distribution
se <- std/sqrt(n) #Standard Error which is the standard deviation of the sampling distribution
q <- 93.54
p <- round(pnorm(q = q, mean = xbar, sd = se, lower.tail = FALSE),4)
sprintf("The probability that the mean of a sample of %s computers would be greater than %s is %s", n, q, p)
## [1] "The probability that the mean of a sample of 68 computers would be greater than 93.54 is 0.0181"
Problem 11: A director of reservations believes that 7% of the ticketed passengers are no-shows. If the director is right, what is the probability that the proportion of no-shows in a sample of 540 ticketed passengers would differ from the population proportion by less than 3%? (Round your answer to 4 decimal places)
#Solution to problem 11
x <- 0.07 #Mean proportion
n <- 540 #Number of samples
d <- 3 # difference (plus or minus)
se <- sqrt((x*(1-x))/n) #Standard deviation of a population proportion
q1 <- x - d/100 #lower limit
q2 <- x + d/100 #upper limit
p <- round((pnorm(q = q2, mean = x, sd = se, lower.tail = TRUE)-pnorm(q = q1, mean = x, sd = se, lower.tail = TRUE)),4)
sprintf("The probability that the proportion of no-shows in a sample of %s ticketed passengers would differ from the population proportion by less than %s percent is %s",n,d,p)
## [1] "The probability that the proportion of no-shows in a sample of 540 ticketed passengers would differ from the population proportion by less than 3 percent is 0.9937"
Problem 12: A bottle maker believes that 23% of his bottles are defective. If the bottle maker is accurate, what is the probability that the proportion of defective bottles in a sample of 602 bottles would differ from the population proportion by greater than 4%? (Round your answer to 4 decimal places)
#Solution to problem 12
x <- 0.23 #Mean of defective bottles
n <- 602 
d <- 4 # difference (plus or minus)
se <- sqrt((x*(1-x))/n) #Standard deviation of a population proportion
q1 <- x - d/100 #lower limit
q2 <- x + d/100 #upper limit
p <- round((pnorm(q = q1, mean = x, sd = se, lower.tail = FALSE)-pnorm(q = q2, mean = x, sd = se, lower.tail = FALSE)),4)
sprintf("The probability that the proportion of defective bottles in a sample of %s bottles would differ from the population proportion by less than %s percent is %s",n, d, p)
## [1] "The probability that the proportion of defective bottles in a sample of 602 bottles would differ from the population proportion by less than 4 percent is 0.9803"
Problem 13: A research company desires to know the mean consumption of beef per week among males over age 48. Suppose a sample of size 208 is drawn with x¯=3.9 Assume s2=0.8. Construct the 80% confidence interval for the mean number of lb. of beef per week among males over 48.

The confidence interval is :CI = xbar ± t*se where se = σ / (√n);

#Solution to problem 13
xbar = 3.9 #Mean
var = 0.8 #Variance
x = 48
n = 208 #sample size
cl = 0.8 #confidence level
df = n - 1
std = sqrt(var) #Standard deviation
t = abs(qt((1-cl)/2, df)) #t that corresponds to an 80% confidence
se = std/sqrt(n) #Standard Error
CI.lower =round((xbar - t*se),1) #Lower limit of the 80% confidence interval
CI.upper = round((xbar + t*se),1) #Upper limit of the 80% confidence interval
paste0("The lower limit is ", CI.lower)
## [1] "The lower limit is 3.8"
paste0("The upper limit is ", CI.upper)
## [1] "The upper limit is 4"
Problem 14: An economist wants to estimate the mean per capita income (in thousands of dollars) in a major city in California. Suppose a sample of size 7472 is drawn with x̅ = 16.6. Assume σ = 11 . Construct the 98% confidence interval for the mean per capita income. (Round your answers to 1 decimal place)
#Solution to problem 14
xbar = 16.6
n = 7472 #sample size
cl = 0.98 #confidence level
df = n - 1
std = 11 #Standard deviation
t = abs(qt((1-cl)/2, df)) #t that corresponds to an 98% confidence
se = std/sqrt(n) #Standard Error
CI.lower =round((xbar - t*se),1) #Lower limit of the 98% confidence interval
CI.upper = round((xbar + t*se),1) #Upper limit of the 98% confidence interval
paste0("The lower bound is ", CI.lower)
## [1] "The lower bound is 16.3"
paste0("The upper bound is ", CI.upper)
## [1] "The upper bound is 16.9"
Problem 15: Find the value of t such that 0.05 of the area under the curve is to the left of t. Assume the degrees of freedom equals 26.

Step 1. Choose the picture which best describes the problem. Step 2. Write your answer below.

#Solution to problem 15
#Step 1:
print("Step 1: Answer is Picture B")
## [1] "Step 1: Answer is Picture B"
#Step 2:
print("Step 2:")
## [1] "Step 2:"
p = 0.05
df = 26
t = round(abs(qt(p = p, df = df)),4)
paste0("The value of t is ",t)
## [1] "The value of t is 1.7056"
Problem 16: The following measurements (in picocuries per liter) were recorded by a set of helium gas detectors installed in a laboratory facility: 383.6, 347.1, 371.9, 347.6, 325.8, 337. Using these measurements, construct a 90% confidence interval for the mean level of helium gas present in the facility. Assume the population is normally distributed.

Step 1. Calculate the sample mean for the given sample data. (Round answer to 2 decimal places) Step 2. Calculate the sample standard deviation for the given sample data. (Round answer to 2 decimal places) Step 3. Find the critical value that should be used in constructing the confidence interval. (Round answer to 3 decimal places) Step 4. Construct the 90% confidence interval. (Round answer to 2 decimal places)

#Solution to problem 16
lab <- c(383.6, 347.1, 371.9, 347.6, 325.8, 337)
#Step 1: Calculate the mean of the given sample data
Mean <- round(mean(lab),2) 
paste0("The mean of the sample data is ", Mean)
## [1] "The mean of the sample data is 352.17"
#Step 2: Calculate the sample standard deviation for the given sample data
std <- round(sd(lab),2)
paste0("The standard deviation for the given sample data is ",std)
## [1] "The standard deviation for the given sample data is 21.68"
#Step 3: Calculate the critical value that should be used in constructing the confidence interval
cl <- 0.9 #confidence level
n <- 6
df <- n-1
t <- round(abs(qt((1-cl)/2, df)),3)
se <- std/sqrt(n) #standard error
paste0("The critical value is ",t)
## [1] "The critical value is 2.015"
#Step 4: Construct the 90% confidence interval
CI.lower =round((Mean - t*se),1) #Lower limit of the 98% confidence interval
CI.upper = round((Mean + t*se),1) #Upper limit of the 98% confidence interval
paste0("The lower bound of the confidence interval is ", CI.lower)
## [1] "The lower bound of the confidence interval is 334.3"
paste0("The upper bound of the confidence interval is ", CI.upper)
## [1] "The upper bound of the confidence interval is 370"
Problem 17: A random sample of 16 fields of spring wheat has a mean yield of 46.4 bushels per acre and standard deviation of 2.45 bushels per acre. Determine the 80% confidence interval for the true mean yield. Assume the population is normally distributed.

Step 1. Find the critical value that should be used in constructing the confidence interval. (Round answer to 3 decimal places) Step 2. Construct the 80% confidence interval. (Round answer to 1 decimal place)

#Solution to problem 17
xbar <- 46.4 #Mean yield of field in bushels per acre
n <- 16 #Number of samples
df <- n - 1
std <- 2.45 #Standard deviation of field in bushels per acre
cl <- 0.8 #confidence level
se <- std/sqrt(n) #standard error
#Step 1: Find the critical value that should be used in constructing the confidence interval
t <- round(abs(qt((1-cl)/2, df)),3)
paste0("The critical value is ",t)
## [1] "The critical value is 1.341"
#Step 2: Construct the 80% confidence interval
CI.lower =round((xbar - t*se),1) #Lower limit of the 98% confidence interval
CI.upper = round((xbar + t*se),1) #Upper limit of the 98% confidence interval
paste0("The lower bound of the confidence interval is ", CI.lower)
## [1] "The lower bound of the confidence interval is 45.6"
paste0("The upper bound of the confidence interval is ", CI.upper)
## [1] "The upper bound of the confidence interval is 47.2"
Problem 18: A toy manufacturer wants to know how many new toys children buy each year. She thinks the mean is 8 toys per year. Assume a previous study found the standard deviation to be 1.9. How large of a sample would be required in order to estimate the mean number of toys bought per child at the 99% confidence level with an error of at most 0.13 toys? (Round your answer up to the next integer)
error = z * std/(sqrt(n))

n = (z * std/error)^2

#Solution to problem 18
xbar <- 8 #Mean of toys per year bought by children
std <- 1.9 #standard deviation of the toys bought
error <- 0.13 #Error of estimation
cl <- 0.99 #confidence level
z <- round(abs(qnorm((1-cl)/2)),2) #z score for 99% confidence level
n <- round((z*std/error)^2,0)
paste0("The sample size would be ", n)
## [1] "The sample size would be 1422"
Problem 19: A research scientist wants to know how many times per hour a certain strand of bacteria reproduces. He believes that the mean is 12.6. Assume the variance is known to be 3.61. How large of a sample would be required in order to estimate the mean number of reproductions per hour at the 95% confidence level with an error of at most 0.19 reproductions? (Round your answer up to the next integer)
#Solution to problem 19
xbar <- 12.6 #Mean of bacterial production per hour
var <- 3.61 #Variance of the bacterial production 
std <- sqrt(var) #standard deviation of the bacterial production
error <- 0.19 #Error of estimation
cl <- 0.95 #confidence level
z <- round(abs(qnorm((1-cl)/2)),2) #z score for 99% confidence level
n <- round((z*std/error)^2,0)
paste0("The sample size would be ", n)
## [1] "The sample size would be 384"
Problem 20: The state education commission wants to estimate the fraction of tenth grade students that have reading skills at or below the eighth grade level.

Step 1. Suppose a sample of 2089 tenth graders is drawn. Of the students sampled, 1734 read above the eighth grade level. Using the data, estimate the proportion of tenth graders reading at or below the eighth grade level. (Write your answer as a fraction or a decimal number rounded to 3 decimal places) Step 2. Suppose a sample of 2089 tenth graders is drawn. Of the students sampled, 1734 read above the eighth grade level. Using the data, construct the 98% confidence interval for the population proportion of tenth graders reading at or below the eighth grade level. (Round your answers to 3 decimal places)

#Solution to problem 20
#Step 1: 
n <- 2089 #Size of sample drawn
x <- 1734 #Number of 10th graders that read above 8th grade level
prop_above <- x/n #Proportion of 10th graders that read above 8th grade level
prop_below <- 1 - prop_above #Proportion of 10th graders that reat at or below 8th grade level
paste0("The proportion of tenth graders that read at or below eight grade level is ",round(prop_below,3))
## [1] "The proportion of tenth graders that read at or below eight grade level is 0.17"
#Step 2: Construct 98% confidence interval for the population proportion
cl <- 0.98
se <- sqrt(prop_below*(1-prop_below)/n)
z <- abs(qnorm((1-cl)/2)) #z score for 98% confidence level
CI.lower =round((prop_below - z*se),2) #Lower bound of the 98% confidence interval
CI.upper = round((prop_below + z*se),2) #Upper bound of the 98% confidence interval
paste0("The lower bound of the confidence interval is ", CI.lower)
## [1] "The lower bound of the confidence interval is 0.15"
paste0("The upper bound of the confidence interval is ", CI.upper)
## [1] "The upper bound of the confidence interval is 0.19"
Problem 21: An environmentalist wants to find out the fraction of oil tankers that have spills each month.

Step 1. Suppose a sample of 474 tankers is drawn. Of these ships, 156 had spills. Using the data, estimate the proportion of oil tankers that had spills. (Write your answer as a fraction or a decimal number rounded to 3 decimal places)

Step 2. Suppose a sample of 474 tankers is drawn. Of these ships, 156 had spills. Using the data, construct the 95% confidence interval for the population proportion of oil tankers that have spills each month. (Round your answers to 3 decimal places)

#Solution to problem 21
#Step 1: 
n <- 474 #Size of sample drawn
x <- 156 #Number of tankers that had spills
p <- x/n #Proportion of oil tankers that had spills
paste0("The proportion of oil tankers that had spills is ",round(p,3))
## [1] "The proportion of oil tankers that had spills is 0.329"
#Step 2: Construct 95% confidence interval for the sample proportion
cl <- 0.95
se <- sqrt(p*(1-p)/n)
z <- abs(qnorm((1-cl)/2)) #z score for 95% confidence level
CI.lower =round((p - z*se),3) #Lower bound of the 95% confidence interval
CI.upper = round((p + z*se),3) #Upper bound of the 95% confidence interval
paste0("The lower bound of the confidence interval is ", CI.lower)
## [1] "The lower bound of the confidence interval is 0.287"
paste0("The upper bound of the confidence interval is ", CI.upper)
## [1] "The upper bound of the confidence interval is 0.371"