In: Statistics and Probability
You may use R or any other software to calcuate the sample
variances. Suppose that the percentage changes in value per day on
holdings of the stock of company ABC and DEF are normally
distributed with unknown mean µabc, µdef and unknown variance
σ2abc, σ2def. The following daily returns are observed over two
business weeks (10 trading days): abc_pctchange <- c(2.82, 3.61,
5.66, -2.17, 2.40, -1.48, 3.55, 1.64, -0.16, 2.21)
def_pctchange <- c(1.83, 2.56, 3.55, -1.19, 0.40, -1.53, 2.44,
1.89, -0.54, 9.25) [the units are percentage points] 2.a) Produce a
95% confidence interval for the difference in mean return of the
stock of company ABC and EDF, asuming that the variance are equal
but unkown. (5 points) 2.b) Conduct a hypothesis test for the mean
change in value stock ABC and DEF at a sgnificance level of 0.05,
once again assuming that the variances are equal. State your
hypothesis, calculate the p-value and state your conclusion. (5
points) 2.c)Did your confidence interval from a) contain the null
hypothesis? Did your rejection region from c) contain the observed
value of the test statistic? Are these two results contradictory?
(5 points)a 2.d)Perform a F-test for the equality of variance based
on the sample variances, can you reasonably assume that the
variances are equal at a 0.05 significance level? (5
points)
abc_pctchange <- c(2.82, 3.61, 5.66, -2.17, 2.40, -1.48, 3.55,
1.64, -0.16, 2.21)
def_pctchange <- c(1.83, 2.56, 3.55, -1.19, 0.40, -1.53, 2.44,
1.89, -0.54, 9.25)
t.test(abc_pctchange,def_pctchange,var.equal = T)
Two Sample t-test data: abc_pctchange and def_pctchange t = -0.046474, df = 18, p-value = 0.9634 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: -2.679945 2.563945 sample estimates: mean of x mean of y 1.808 1.866
var.test(abc_pctchange,def_pctchange, alternative =
"two.sided")
a)
95% confidence interval is (-2.679945 , 2.563945)
b)
Ho :
p-value = 0.9634
since p-value > alpha
we fail to reject the null hypothesis
c)
0 is present in confidence interval
hence we fail to reject the null hypothesis
d)
var.test(abc_pctchange,abc_pctchange, alternative = "two.sided")
F test to compare two variances data: abc_pctchange and def_pctchange F = 0.61153, num df = 9, denom df = 9, p-value = 0.4752 alternative hypothesis: true ratio of variances is not equal to 1 95 percent confidence interval: 0.1518963 2.4620306 sample estimates: ratio of variances 0.6115336
p-value = 0.4752 > alpha
hence we fail to reject the null hypothesis
we can reasonably assume that the variances are equal at a 0.05 significance level