Assignment#5

First Question:

The director of manufacturing at a cookies needs to determine whether a new machine is production a particular type of cookies according to the manufacturer’s specifications, which indicate that cookies should have a mean of 70 and standard deviation of 3.5 pounds. A sample pf 49 of cookies reveals a sample mean breaking strength of 69.1 pounds.
A. State the null and alternative hypothesis:

The Null: The mean breaking strength of cookie is at least 70.

The alternative hypothesis: The mean breaking strength is below 70.


B. Is there evidence that the machine is nor meeting the manufacturer’s specifications for average strength? Use a 0.05 level of significance

> a

<- 70

> s <- 3.5

> n <- 49

> xbar <- 69.1

> z <- (xbar-a)/(s/sqrt(n))

> z > 2*pnorm(-abs(z))

[1] FALSE

This proves the machine is meeting the manufacture specifications for average strength.


C. Compute the p value and interpret its meaning

> p <- 2*pnorm(z)

> p [1] 0.07186064

The null hypothesis is not rejected.


D. What would be your answer in (B) if the standard deviation were specified as 1.75 pounds?

> z <- (xbar – a)/(1.75/sqrt(n))

> z [1] -3.6


E. What would be your answer in (B) if the sample mean were 69 pounds and the standard deviation is 3.5 pounds?

> z <- (69 – a)/(s/sqrt(n))

> z [1] -2

Second Question:

If x̅ = 85, σ = standard deviation = 8, and n=64, set up 95% confidence interval estimate of the population mean μ.

The z-score for a 95% confidence interval is 1.96.

85 – 1.96( 8 / sqrt(64)) < 85 < 85 + 1.96( 8 / sqrt(64))

85 – 1.96 < 85 < 85 + 1.96

83.04 < 85 < 86.96

There is a 95% chance the population mean falls between 83.04 and 86.96.

Third Question using Correlation Analysis

a. Calculate the correlation coefficient for this data set

> x <- c(49, 46.1, 19)

> y <- c(50, 54.2, 22)

> z <- c(69, 67.7, 28)

> df<- data.frame(x,y,z)

> cor(x,y)

[1] 0.978446

b. Pearson correlation coefficient

> a<- cor(df,method = “pearson”)

> a

x y z

x 1.0000000 0.9784460 0.9982097

y 0.9784460 1.0000000 0.9890455

z 0.9982097 0.9890455 1.0000000

c. Create plot of the correlation

corrgram(a)

Leave a comment