A local newspaper conducted a survey among its readers to determine the best piz
ID: 3154044 • Letter: A
Question
A local newspaper conducted a survey among its readers to determine the best pizza delivery franchise in town. Among a dozen or so pizza outlets, based on collected reader ratings (on a scale from 0 to 100), two were top contenders. Pizzeria ABC and Pizzeria OPQ. The newspaper uses these ratings to make recommendations. A questionnaire is used as an exit poll for customers to whom pizzas were delivered. Random samples of customers were asked to rate their chosen pizza place. The responses of each individual are summed to form a single rating, Which tends to be normally distributed. The outcome is shown in table below. A. Use the table data to estimate the true mean difference between the pizzeria scores. Use a 98% confidence interval. B. Interpret the result from part A. C. What assumptions must be made in order for the estimate to be valid? Are they reasonably satisfied? D. Consistency of delivery (for repeat customers) can be assessed based on the variability of the ratings. Is there a difference in delivery consistency at alpha = 0.1?Explanation / Answer
We wil carry out the relevant test in R
1st take the data in R by the following code:
piz.ABC<-c(79,55,59,64,53,58,54,57,65)
piz.XYZ<-c(75,90,81,83,88,77,85,74)
A) Carry out the two sample independent t-test for the two sample by the following code:
t.test(piz.ABC,piz.XYZ,var.equal=TRUE,conf.level=0.98,
alternative="two.sided")
OUTPUT:
Two Sample t-test
data: piz.ABC and piz.XYZ
t = -6.0756, df = 15, p-value = 2.123e-05
alternative hypothesis: true difference in means is not equal to 0
98 percent confidence interval:
-30.25324 -12.10787
sample estimates:
mean of x mean of y
60.44444 81.62500
from the output a 98% confidence interval for the true mean difference is (-30.25324 , -12.10787)
B) As the p-value of the test is less than 0.02=1-0.98, so at 98% level we will rehect null hypothesis to conclude that the difference in mean is not equal to zero.
D) Test of equal variance of the two sample:
Code:
var.test(piz.ABC,piz.XYZ,ratio = 1,
alternative = c("two.sided", "less", "greater"),
conf.level = 0.9)
Output:
F test to compare two variances
data: piz.ABC and piz.XYZ
F = 1.8505, num df = 8, denom df = 7, p-value = 0.4322
alternative hypothesis: true ratio of variances is not equal to 1
90 percent confidence interval:
0.4966837 6.4776332
sample estimates:
ratio of variances
1.850507
As the p-value of test = 0.4322 > 0.1 so at 90% level we will conclude that the variability of the ratings of two sample are same. So there is no difference in delivery consistency.
C) Independent sample t-test requires three major assumptions:
1. The two sample follows normal distribution. Which we will validate by shapiro wilk test.
Code:
shapiro.test(piz.ABC)
shapiro.test(piz.XYZ)
Output:
> shapiro.test(piz.ABC)
Shapiro-Wilk normality test
data: piz.ABC
W = 0.829, p-value = 0.04347
> shapiro.test(piz.XYZ)
Shapiro-Wilk normality test
data: piz.XYZ
W = 0.9452, p-value = 0.6631
As both the p-value is greater than 0.02, so at 98% level we conclude that the data follows normal distribution.
2. The sample must be homoscedastic , i.e the variance of the population of the two sample must be equal, which is acually validated already in D) .
3. The two sample must be independent, which is quite intuitive from the scenario.
So all the assumption of the t-test has been validated.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.