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

The le crude.dat includes the oil acquisition costs data from January 1994 to Ju

ID: 3277081 • Letter: T

Question

The le crude.dat includes the oil acquisition costs data from January 1994 to June 1996. There are four variables: Date, Domestic (Domestic Crude Oil Rener Acquisition cost), Imported (Imported Crude Oil Rener Acquisition cost) and Composite (Composite Crude Oil Rener Acquisition cost).

DATALINES;

940101 12.55 12.81 12.69
940201 13.18 12.91 13.04
940301 13.09 13.15 13.12
940401 14.66 14.46 14.55
940501 15.57 15.65 15.61
940601 17.23 17.08 17.15
940701 17.51 17.93 17.73
940801 17.06 17.08 17.07
940901 16.32 15.89 16.09
941001 16.21 16.40 16.30
941101 16.49 16.54 16.51
941201 16.10 15.76 15.95
950101 16.37 16.62 16.49
950201 16.98 17.25 17.11
950301 17.21 17.24 17.23
950401 18.08 18.84 18.43
950501 18.57 18.49 18.53
950601 17.84 17.40 17.62
950701 16.78 16.45 16.62
950801 16.89 16.54 16.72
950901 16.96 16.73 16.85
951001 16.72 16.34 16.53
951101 16.61 16.53 16.57
951201 17.31 17.61 17.46
960101 17.85 17.55 17.70
960201 18.04 17.70 17.88
960301 19.49 19.81 19.64
960401 21.77 21.05 21.44
960501 21.09 20.00 20.51
960601 18.93 18.83 18.87

1- Provide two sided 95% condence intervals for the true average domestic/imported/composite costs, respectively.

2- Answer the following questions. For each question, please state the hypotheses, point out the

corresponding p-value from the outputs and then make your conclusions.

(a) Is the true average domestic cost smaller than $20 per Barrel?

(b) Is the true average imported cost dierent from $15 per Barrel?

-- It would be great to do this with R or SAS.

Explanation / Answer

Answer:

R code:

library(xlsx)

mydata <- read.xlsx("data.xlsx",1)

t.test(mydata$domestic)

t.test(mydata$imported)

t.test(mydata$composite)

R output:

One Sample t-test

data: mydata$domestic

t = 46.498, df = 29, p-value < 2.2e-16

alternative hypothesis: true mean is not equal to 0

95 percent confidence interval:

16.23505 17.72895

sample estimates:

mean of x

   16.982

> t.test(mydata$imported)

        One Sample t-test

data: mydata$imported

t = 48.312, df = 29, p-value < 2.2e-16

alternative hypothesis: true mean is not equal to 0

95 percent confidence interval:

16.17306 17.60294

sample estimates:

mean of x

   16.888

> t.test(mydata$composite)

        One Sample t-test

data: mydata$composite

t = 47.61, df = 29, p-value < 2.2e-16

alternative hypothesis: true mean is not equal to 0

95 percent confidence interval:

16.20623 17.66110

sample estimates:

mean of x

16.93367

>

> # single sample t

> t.test(mydata$domestic ,mu=20,alternative = "less", conf.level=.95)

        One Sample t-test

data: mydata$domestic

t = -8.2636, df = 29, p-value = 2.066e-09

alternative hypothesis: true mean is less than 20

95 percent confidence interval:

     -Inf 17.60255

sample estimates:

mean of x

   16.982

>

> t.test(mydata$imported ,mu=15,alternative = "two.sided", conf.level=.95)

        One Sample t-test

data: mydata$imported

t = 5.401, df = 29, p-value = 8.325e-06

alternative hypothesis: true mean is not equal to 15

95 percent confidence interval:

16.17306 17.60294

sample estimates:

mean of x

   16.888

# single sample t

t.test(mydata$domestic ,mu=20,alternative = "less", conf.level=.95)

t.test(mydata$imported ,mu=15,alternative = "two.sided", conf.level=.95)

1- Provide two sided 95% condence intervals for the true average domestic/imported/composite costs, respectively.

95% confidence intervals for the true average domestic=( 16.23505 ,17.72895)

95% confidence intervals for the true average imported (16.17306, 17.60294)

95% confidence intervals for the true average composite=(16.20623, 17.66110)

2- Answer the following questions. For each question, please state the hypotheses, point out the

corresponding p-value from the outputs and then make your conclusions.

(a) Is the true average domestic cost smaller than $20 per Barrel?

t = -8.2636, df = 29, p-value = 2.066e-09

Ho is rejected.

We conclude that true average domestic cost smaller than $20 per Barrel.

(b) Is the true average imported cost different from $15 per Barrel?

t = 5.401, df = 29, p-value = 8.325e-06.

Ho is rejected.

We conclude that true average imported cost different from $15 per Barrel.

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