Q1. A sales manager of a used car dealership for sports utility vehicle (SUVs) believes that it takes more than 90 days, on average, to sell an SUV. In order to test his claim, he samples 40 recently sold SUVs and finds that it took an average of 95 days to sell an SUV. He believes that the population standard deviation is fairly stable at 20 days. Test the claim at \(\alpha = 0.01\).

Hypothesis: H0: mu <= 90 H1: mu > 90 Data:

n = 40
sigma = 20
x_bar = 95
alpha = .01

Z stat

#Standard Error
SE = 20/sqrt(40)
#Z statistics
ZT = (95-90)/SE
ZT
## [1] 1.581139
#The pvalue is
pvalue = pnorm(ZT,0,1,lower.tail=FALSE)
pvalue
## [1] 0.05692315

conclusion: Since p_value (0.05692315) > \(\alpha\) (0.01), do not reject the null hypothesis. At the 1% significance level, we can conclude that average amount of days it takes to sell a SUV is 90 days.The sample data does not support the dealers claim.

Q2. A researcher wants to determine if Americans are sleeping less than the recommended 7 hours of sleep on weekdays. He takes a random sample of 150 Americans and computes the average sleep time of 6.7 hours on weekdays. Assume that the population is normally distributed with a known standard deviation of 2.1 hours. Test the researcher’s claim at \(\alpha = 0.05\).

Hypothesis: H0: mu >= 7 H1: mu < 7

data:

n = 150 
x_bar = 6.7
sigma = 2.1
alpha = .05

Z stat

#Standard Error
SE = 2.1/sqrt(150)
#Z statistics
ZT = (6.7-7)/SE
ZT
## [1] -1.749636
#The pvalue is
pvalue = pnorm(ZT,0,1,lower.tail=TRUE)
pvalue
## [1] 0.04009061

conclusion: Since p_value (0.04009061) < \(\alpha\) (0.05), reject the null hypothesis. At the 5% significance level, we can conclude that average amount of sleep Americans are getting is less than 7 hours.The sample does support the researchers claim.

Q3. Dataset: Home. The data accompanying this exercise show the weekly stock price (Price in $) for a home improvement store. Assume that stock prices are normally distributed with a population standard deviation of $3. Test whether or not the average weekly stock price differs from $30, at \(\alpha = 0.05\).

hypothesis: H0: mu = 30 H1: mu /=/ 30

Data:

n = nrow(Home)
sigma = 3
alpha = .05
x_bar = mean(Home$Price)

Z stat

#Standard Error
SE = 3/sqrt(26)
#Z statistics
ZT = (31.4123076923077-30)/SE
ZT
## [1] 2.400461
#The pvalue is
pvalue = 2 * pnorm(ZT,0,1,lower.tail=FALSE)
pvalue
## [1] 0.01637441

conclusion: Since p_value (0.01637441) < \(\alpha\) (0.05), reject the null hypothesis. At the 5% significance level, we can conclude that average price of weekly stock differs from 30.

Q4. Dataset: Prime. Amazon Prime is a $119-per-year service that gives the company’s customers free two-day shipping and discounted rates on overnight delivery. Prime customers also get other perks, such as free e-books. An analyst believes that Prime customers spend more than $1,200 per year on this service. The data accompanying this exercise show the annual expenditures (Expenditures in $) of 100 Prime customers. At the 5% significance level, what is the conclusion to the test? Is the analyst’s claim supported by the sample data?

hypothesis: H0: mu <= 1200 H1: mu > 1200

Data:

n = 100
x_bar = mean(Prime$Expenditures)
s = sd(Prime$Expenditures)
alpha = .05
df = n - 1
mu_0 = 1200
#Standard Error
SE = s/sqrt(n)
SE
## [1] 33.61355
#Z statistics
Tstat = (x_bar - mu_0)/SE
Tstat
## [1] 3.181455
#The pvalue is
pvalue = pt(Tstat,df,lower.tail=FALSE)
pvalue
## [1] 0.0009788085

conclusion: Since p_value (0.0009788085) < \(\alpha\) (0.05), reject the null hypothesis. At the 5% significance level, we can conclude that average amount of expenditures of a prime customer is more than $1200.

Q5. A local brewery wishes to ensure that an average of 12 ounces of beer is used to fill each bottle. In order to analyze the accuracy of the bottling process, the bottler takes a random sample of 48 bottles. The sample mean weight and the sample standard deviation of the bottles are 11.80 ounces and 0.8 ounce, respectively. Test if the accuracy of the bottling process is compromised. At \(\alpha = 0.05\), what is the conclusion to the test? Make a recommendation to the bottler.

hypothesis H0: mu = 12 H0: /=/ 12

data

n = 48 
x_bar = 11.80
s = .8
alpha = .05
mu_0 = 12
df = n - 1
#Standard Error
SE = s/sqrt(n)
SE
## [1] 0.1154701
#Z statistics
Tstat = (x_bar - mu_0)/SE
Tstat
## [1] -1.732051
#The pvalue is
pvalue = 2 * pt(Tstat,df,lower.tail=TRUE)
pvalue
## [1] 0.08982359

conclusion: Since p_value (0.08982359) > \(\alpha\) (0.05), do not reject the null hypothesis. At the 5% significance level, we can conclude that average amount ounces of beer in each bottle does not differ from 12 ounces.

Q6. Based on the average predictions of 45 economists, the U.S. gross domestic product (GDP) will expand by 2.8% this year. Suppose the sample standard deviation of their predictions was 1%. At the 5% significance level, test if the mean forecast GDP of all economists is less than 3%.

Hypothesis: H0: mu >= .03 H1: mu < .03

data:

n = 45
x_bar = .028
s = .01
mu_0 = .03
alpha = .05
df = n - 1
#Standard Error
SE = s/sqrt(n)
SE
## [1] 0.001490712
#Z statistics
Tstat = (x_bar - mu_0)/SE
Tstat
## [1] -1.341641
#The pvalue is
pvalue = pt(Tstat,df,lower.tail=TRUE)
pvalue
## [1] 0.09329802

conclusion: Since p_value (0.09329802) > \(\alpha\) (0.05), do not reject the null hypothesis. At the 5% significance level, we can conclude that mean forecast of GDP will greater or equal to 3%.