A manufacturing company produces electronic components with lifetimes that follow a normal distribution. The population mean lifetime is 1000 hours with a standard deviation of 150 hours. A quality control team takes a random sample of 20 components.
Answer: Probability of a randomly selected component will last between 950 and 1050 hours is 0.2611173. This can be interpreted as a 26% (roughly) probability. The 90th percentile lifetime is calculated to be 1192.233 hours, which can be interpreted as 90% of components will last less than or equal to 1192 hours (rounded). This also means that only 10% are expected to last longer than 1192 hours.
# Your r-code for part (a)
mu <- 1000 # Population Mean (in hrs)
sigma <- 150 # Population Standard Deviation
# P(950 < X < 1050) = P(X < 1050) - P(X < 950)
# pnorm(q, mean, sd) calculates P(X <= q)
# Probability up to 1050 hours
P_less_than_1050 <- pnorm(1050, mean = mu, sd = sigma)
# Probability up to 950 hours
P_less_than_950 <- pnorm(950, mean = mu, sd = sigma)
# Calculate the probability between 950 and 1050 hours
probability_between_950_and_1050 <- P_less_than_1050 - P_less_than_950
cat("1. Probability (950 < X < 1050):", probability_between_950_and_1050, "\n")
## 1. Probability (950 < X < 1050): 0.2611173
# The 90th percentile is the value 'x' such that P(X <= x) = 0.90
# qnorm(p, mean, sd) returns the quantile 'x' for a given probability 'p'
# Find the 90th percentile
percentile_90th <- qnorm(0.90, mean = mu, sd = sigma)
cat("2. The 90th percentile lifetime:", percentile_90th, "hours\n")
## 2. The 90th percentile lifetime: 1192.233 hours
Answer: The mean is 1000 hours with a standard deviation (Standard Error) of 33.541 hours. The probability of the sample mean exceeds 1020 is 0.275 or 27.5%. The probabilty that the sample mean lifetime falls between 980 and 1020 hours is 0.449 or 44.9%. The sampling distribution is normal because the population distribution is normal, meaning that the sample mean will be normal.
# Your r-code for part (b)
# Define the population and sample parameters
mu <- 1000 # Population Mean
sigma <- 150 # Population Standard Deviation
n <- 20 # Sample Size
# Mean of the Sampling Distribution (mu_xbar)
mu_xbar <- mu
# Standard Deviation of the Sampling Distribution (Standard Error, SE)
SE <- sigma / sqrt(n)
cat("1. Mean of the Sampling Distribution (mu_xbar):", mu_xbar, "hours\n")
## 1. Mean of the Sampling Distribution (mu_xbar): 1000 hours
cat("1. Standard Error (SE) of the Sample Mean:", SE, "hours\n")
## 1. Standard Error (SE) of the Sample Mean: 33.54102 hours
# P(X̄ > 1020) = 1 - P(X̄ <= 1020)
P_xbar_less_than_1020 <- pnorm(1020, mean = mu_xbar, sd = SE)
P_xbar_greater_than_1020 <- 1 - P_xbar_less_than_1020
cat("2. Probability P(X̄ > 1020):", P_xbar_greater_than_1020, "\n")
## 2. Probability P(X̄ > 1020): 0.2754925
# P(980 < X̄ < 1020) = P(X̄ < 1020) - P(X̄ < 980)
P_xbar_less_than_980 <- pnorm(980, mean = mu_xbar, sd = SE)
P_xbar_between_980_and_1020 <- P_xbar_less_than_1020 - P_xbar_less_than_980
cat("3. Probability P(980 < X̄ < 1020):", P_xbar_between_980_and_1020, "\n")
## 3. Probability P(980 < X̄ < 1020): 0.449015
Answer: For individual components, the probabilty is significantly lower than that of the sample means. The individual conmponents has a larger spread or variablity due to the population standard deviation compared to the Standard Error of the sample means.
The time between customer arrivals at a service center follows an exponential distribution with a mean of 8 minutes (so the rate parameter \(\lambda = 1/8 = 0.125\)). A manager collects data on 30 consecutive customer arrival intervals.
Answer: The probablity that a randomly selected arrival interval exceeds 12 minutes is 0.2231 or 22.3%. The 75th percentile of the population distribution is 11.09 minutes which can interpreted as 75% of all customer arrivals occur in 11.09 minute intervals.
# Your r-code for part (a)
# Rate (lambda) = 1 / Mean
lambda <- 1 / 8
# P(X > 12) = 1 - P(X <= 12)
# pexp(q, rate) calculates P(X <= q)
P_less_than_12 <- pexp(12, rate = lambda)
P_greater_than_12 <- 1 - P_less_than_12
cat("1. Probability P(X > 12 minutes):", P_greater_than_12, "\n")
## 1. Probability P(X > 12 minutes): 0.2231302
# The 75th percentile is the value 'x' such that P(X <= x) = 0.75
# qexp(p, rate) returns the quantile 'x' for a given probability 'p'
percentile_75th <- qexp(0.75, rate = lambda)
cat("2. The 75th percentile arrival time:", percentile_75th, "minutes\n")
## 2. The 75th percentile arrival time: 11.09035 minutes
Answer: Mean of 8 minutes and Standard deviation (Standard Error) of 1.4606 minutes. Probability of sample mean exceeding 10 minutes is 0.0847 or 8.4%. Probability of sample mean falling between 7 and 9 minutes is 0.4939 or 49.39%. CLT applies due to the sample size being equal or greater than 30, making the sample mean approximately normal despite it being exponential distribution.
# Your r-code for part (b)
mu <- 8 # Population Mean (for Exponential Distribution)
sigma <- 8 # Population Standard Deviation (for Exponential Distribution, sigma = mu)
n <- 30 # Sample Size
# Mean of the Sampling Distribution (mu_xbar)
mu_xbar <- mu
# Standard Deviation of the Sampling Distribution (Standard Error, SE)
SE <- sigma / sqrt(n)
cat("1. Mean of the Sampling Distribution (mu_xbar):", mu_xbar, "minutes\n")
## 1. Mean of the Sampling Distribution (mu_xbar): 8 minutes
cat("1. Standard Error (SE) of the Sample Mean:", SE, "minutes\n")
## 1. Standard Error (SE) of the Sample Mean: 1.460593 minutes
# Since n=30, the sampling distribution is approximately Normal.
# P(X̄ > 10) = 1 - P(X̄ <= 10)
P_xbar_less_than_10 <- pnorm(10, mean = mu_xbar, sd = SE)
P_xbar_greater_than_10 <- 1 - P_xbar_less_than_10
cat("2. Probability P(X̄ > 10):", P_xbar_greater_than_10, "\n")
## 2. Probability P(X̄ > 10): 0.08545176
# P(7 < X̄ < 9) = P(X̄ < 9) - P(X̄ < 7)
P_xbar_less_than_9 <- pnorm(9, mean = mu_xbar, sd = SE)
P_xbar_less_than_7 <- pnorm(7, mean = mu_xbar, sd = SE)
P_xbar_between_7_and_9 <- P_xbar_less_than_9 - P_xbar_less_than_7
cat("3. Probability P(7 < X̄ < 9):", P_xbar_between_7_and_9, "\n")
## 3. Probability P(7 < X̄ < 9): 0.5064372
Answer: