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

2. A tobacco company is developing a new filter for its cigarettes. The company

ID: 3050888 • Letter: 2

Question

2. A tobacco company is developing a new filter for its cigarettes. The company claims that, with this new filter, the median nicotine content for its brand is under 40 mg. To test this claim, 10 randomly selected cigarettes were examined and their nicotine contents recorded 13 34.5 34. 33.3 41.4 38.0 37.0 43.9 35.5 40.8 3.68. Use the Sk-test at = .05 to determine For this sample,= 37.98, m = 37.5, s if the sample comes from a non-symmetric distribution. Write a concluding sentence (a) (b) Test whether the data appears to come from a normal distribution, using the Shapiro-Wilk test with = .05. You can use R to carry out the test. Report on the command you used and the result (copy/paste or provide written output), and state your conclusion. NOTE The data above should be placed in a vector and used to conduct the test. The course notes example (Page 71) generates data by selecting from a normal distribution (e.g. rnorm(4,mean=10,sd=2)) for demonstration purposes only! (c) Use the t-test for the mean to detemine if there is sufficient evidence to support the (d) Use the sign test to determine if there is sufficient evidence to support the company's claim. (e) Use the Wilcoxon Signed Rank Test[= .05] to determine if there is sufficient evidence (t) Considering the results of the test of symmetry (part a) and normality (part b), and the to su boxplot below, which of the three tests (t, sign, WSRT) is most appropriate for the data?

Explanation / Answer

a)

As specified in this case, for the required testing purpose we need to perform Kolmogorov - Smirnoff test(Ks test) to determine if the sample comes from a non-symmetric distribution.

The null hypothesis of this test is, given the two population, the two population come from similar distributions.

That is why, here we consider another variable y, which is created by taking random sample from a symmetrical distribution(normal). The mean of the distribution is as defined here, 37.98 and the standard deviation is 3.68.

The whole R-code to perform the test is given as follows,

x <- c(41.3,34.5,34.1,33.3,41.4,38.0,37.0,43.9,35.5,40.8)
summary(x)
y <- rnorm(10,mean(x),sd(x))
ks.test(x,y)

and the result is given as,

Two-sample Kolmogorov-Smirnov test

data: x and y

D = 0.3, p-value = 0.7869
alternative hypothesis: two-sided

Interpretation:

Here D=0.3 is the value of the test statistic and p-value has come out to be 0.7869.

considering alpha = 0.05, as p-value is not less than alpha, the we can not reject the null hypothesis that the distribution of sample comes from a symmetrical distribution(as the distribution of Y was normal, which is symmetric).

Hence, our final conclusion is, based on the smaple we have, the distribution of sample does not come out from a non-symmetrical distribution.

b)

To test whether the sample comes from a normal distribution or not, here we perform shapiro-wilk test.

The required R-code to perform the test is given as follows,

x <- c(41.3,34.5,34.1,33.3,41.4,38.0,37.0,43.9,35.5,40.8)
shapiro.test(x)

The output of this test is given as follows,

Shapiro-Wilk normality test

data: x
W = 0.92722, p-value = 0.4211

Interpretation:

Here W=0.92722 is the value of the test statistic and p-value has come out to be 0.4211.

considering alpha = 0.05, as p-value is not less than alpha, the we can not reject the null hypothesis that the distribution of sample is normal.

Hence, our final conclusion is, based on the smaple we have, the distribution of sample is normal with 0.05 level of significance.

c)

next we have performed the one sample t-test with the null hypothesis that mean < 40

the foloowing is the R code for t-test,

x <- c(41.3,34.5,34.1,33.3,41.4,38.0,37.0,43.9,35.5,40.8)
t.test(x,mu = 40, alternative = "greater")

the output is,

One Sample t-test

data: x
t = -1.7357, df = 9, p-value = 0.9417
alternative hypothesis: true mean is greater than 40
95 percent confidence interval:
35.84665 Inf
sample estimates:
mean of x 37.98

Interpretation:

Here t = -1.7357, df = 9 is the value of the test statistic and p-value has come out to be 0.9417

considering alpha = 0.05, as p-value is not less than alpha, the we can not reject the null hypothesis that the mean of the distribution is less than 40.

Hence, our final conclusion is, based on the smaple we have, the mean of the distribution is less than 40.

d)

Here we need to perform Wilcoxon sign rank test, and,

That is why, here we consider another variable y, which is created by taking random sample from a symmetrical distribution(normal). The mean of the distribution is as defined here, 37.98 and the standard deviation is 3.68.

The whole R-code to perform the test is given as follows,

x <- c(41.3,34.5,34.1,33.3,41.4,38.0,37.0,43.9,35.5,40.8)
y <- rnorm(10,mean(x),sd(x))
wilcox.test(x, y, paired=TRUE)

the output is,

Wilcoxon signed rank test

data: x and y
V = 35, p-value = 0.4922
alternative hypothesis: true location shift is not equal to 0

Interpretation:

Here v=35,the value of the test statistic and p-value has come out to be 0.4922

considering alpha = 0.05, as p-value is not less than alpha, the we can not reject the null hypothesis that the sample distribution is not symmetric.

Hence, our final conclusion is, based on the smaple we have, the conclusion of the company is correct at 0.05 level of significance.

Here, first 4 questions have been answered. As per the policy of the authority we can not answer more than 4 questions. If the answer of other parts needed, then one have to resubmit the question,for only that parts which have not been answered.