CMTH 642 Lab 2

$30.00

Category: You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (3 votes)

Question 1
We want to test with 95 percent confidence interval whether the volume of a shipment of lumber
is as usual (mu=39000 cubic feet). Use data<-rnorm(n, mean = , sd = ) to generate 75 shipments
with mean:36500 and sd:2000. Use set.seed(0) before rnorm to regenerate the same data if
required. On the simulated data test Ho: mu = 39000
Hint: t.test(data, mu = 39000)
Question 2
The results obtained for an intelligence test in 10 subjects are:
65, 78, 88, 55, 48, 95, 66, 57, 79, 81
i- Calculate the sample mean and standard deviation
ii- Use a one-sample t-test to determine whether the average result of the population which
received the same test is equal to 75 using a significance level of 0.05.
Question 3
A bottle filling machine is set to fill bottles with soft drink to a volume of 500 ml. The actual
volume is known to follow a normal distribution. The manufacturer believes the machine is
under-filling bottles. A sample of 20 bottles is taken and the volume of liquid inside is measured.
The volumes were:
484.11, 459.49, 471.38, 512.01, 494.48, 528.63, 493.64, 485.03, 473.88, 501.59, 502.85, 538.08,
465.68, 495.03, 475.32, 529.41, 518.13, 464.32, 449.08, 489.27
i- Calculate the sample mean and standard deviation
ii- Use a one-sample t-test to determine whether the bottles are being consistently under filled
using a significance level of 0.01.
Question 4
An outbreak of Salmonella-related illness was attributed to ice cream produced at a certain
factory. Scientists measured the level of Salmonella in 9 randomly sampled batches of ice cream.
The levels (in MPN/g) were:
0.593 0.142 0.329 0.691 0.231 0.7930.5190.392 0.418
Is there evidence that the mean level of Salmonella in the ice cream is greater than 0.3 MPN/g?
Question 5
Assuming that the data in mtcars follows the normal distribution, find the 95% confidence
interval estimate of the difference between the mean gas mileage of manual and automatic
transmissions. (Hint: two sample t-test)
Question 6
Consider the gain in weight of 19 female rats between 28 and 84 days after birth. 12 were fed on
a high protein diet and 7 on a low protein diet. Using the following data, test the hypothesis that
there is no difference in weight gain between female rats raised on a high-protein diet versus
those raised on a low-protein diet. Use a significance level of α = 0.05 and assume equal
variances. (“Hint: var.equal=TRUE”)
High protein: 134,146,104,119,124,161,107,83,113,129,97,12
Low protein: 70,118,101,85,107,132,94
Question 7
Load the “MASS” package. In the immer dataset of the “MASS” library: we have: Y1 Yield in 1931,
Y2 Yield in 1932. Assuming that the data in immer follows the normal distribution, find the 95%
confidence interval estimate of the difference between the mean barley yields between years
1931 and 1932 (Hint: paired t-test). Get “p.value” in a variable pvalue and “statistic” in a variable
st. (Hint: ttest<-t.test(…,…,…) and then names(ttest))
Question 8
A professor takes a random sample of students enrolled in her course. She finds the following: in
the sample, there are 25 freshmen, 32 sophomores, 18 juniors, and 20 seniors. Test the null
hypothesis that freshman, sophomores, juniors, and seniors are equally represented among
students signed up for this course.
Hint: chi-square test