Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Jim and Joyce are opening a new restaurant, and they want to see if there averag

ID: 3231139 • Letter: J

Question

Jim and Joyce are opening a new restaurant, and they want to see if there average food item price of $8.19 is different from the rest of the town. They decided to look up a random sample of 31 menus (this town is big into restaurants) and looked at the cost. The data they found is provided below.

12.19 8.65 10.5 9 5.12 12.64 7.53 4.22 8.91 4.31 10.22 11.52 11.87 10.65 19.22 15.81 17.64 11.2 19.56 16 14.23 15.78 9.1 9.87 10.31 11.45 15.67

14.89 12.34 9.99 11.11 18.1 17.85 14.93 15.87 12.39

Test the normality of the population of food item cost for restaurants in this town. Use a significance level of 0.05. (10 points)

Hint: The name of the test you need to perform is called the Shapiro-Wilk’s Test

Are the assumptions for a one sample mean hypothesis test met? (5 points)

Test to see if the average food price of Jim and Joyce differs from rest of the town. Use a significance level of 0.05. (20 points)

Construct a 90% confidence interval for the mean menu price. Does this confidence interval match your conclusion in part c? Explain. (15 points)

-please include r codes with solutions

******You must show all four steps of the hypothesis test

Explanation / Answer

The complete R snippet is as follows

menu <- c(12.19, 8.65, 10.5, 9, 5.12, 12.64, 7.53, 4.22, 8.91, 4.31, 10.22, 11.52, 11.87, 10.65, 19.22, 15.81, 17.64, 11.2, 19.56, 16, 14.23, 15.78, 9.1 ,9.87, 10.31, 11.45, 15.67,
14.89, 12.34, 9.99, 11.11, 18.1, 17.85, 14.93, 15.87 , 12.39)

## shapiro wilks test

shapiro.test(menu)


## ttest for

t.test(menu,mu=8.19)


## 90% confidence interval is , z mulitplier is 1.645

mean(menu) +1.645*sd(menu)/sqrt(length(menu))
mean(menu) -1.645*sd(menu)/sqrt(length(menu))

###################

The results are

> shapiro.test(menu)

   Shapiro-Wilk normality test

data: menu
W = 0.96946, p-value = 0.4109

as the p value is greater than 0.05 , hence we conclude that the data comes from normal distribution

H0 : the data is normal

H1 : the data is not normal

The t test is

t.test(menu,mu=8.19)

   One Sample t-test

data: menu
t = 6.1181, df = 35, p-value = 5.399e-07 ## as the p value is less than 0.05 , hence we conclude that the menu price is different from 8.19
alternative hypothesis: true mean is not equal to 8.19
95 percent confidence interval:
10.89613 13.58387
sample estimates:
mean of x
12.24

The confidence interval is given as

> mean(menu) +1.645*sd(menu)/sqrt(length(menu))
[1] 13.32894
> mean(menu) -1.645*sd(menu)/sqrt(length(menu))
[1] 11.15106

yes , we see that the confidence interval is 11.15 and 13.32 which does not include 8.19 . Hence , we are 90% confident that the mean is not 8.19 as the range is 11.15 to 13.32

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote