A statistical analyst for the Wall Street Journal randomly selected six companies and recorded both the price per share of stock on January 1, 2009 and on April 30, 2009. The results are presented below. Suppose the analyst wished to see if the average price per share of stock on April 30, 2009 is greater than the average price per share of stock on January 1, 2009 at α=.025.
Apr. 30, 2009 | 33 | 33 | 34 | 30 | 33 | 38 |
Jan. 1, 2009 | 21 | 25 | 30 | 33 | 23 | 27 |
For the hypothesis stated above, what is the P-value?
a. |
.025 < P-value < .05 |
|
b. |
None of the answers is correct |
|
c. |
.95 < P-value < .975 |
|
d. |
.01 < P-value < .025 |
|
e. |
.001 < P-value < .005 |
Sol:
Ho:mu1=mu2
Ha:mu1>mu2
create 2 vectors Apr30 2009 and Jan 1 2009
and t.test function in R studio to get t and p value
Rcode:
Apr30_2009 <- c(33 , 33 ,
34 , 30 , 33 ,
38)
Jan_1_2009 <- c(21 , 25 , 30
, 33, 23 , 27)
t.test(Apr30_2009,Jan_1_2009,alternative = "greater")
Outout:
Welch Two Sample t-test
data: Apr30_2009 and Jan_1_2009
t = 3.3245, df = 8.024, p-value = 0.005212
alternative hypothesis: true difference in means is greater than
0
95 percent confidence interval:
3.086152 Inf
sample estimates:
mean of x mean of y
33.5 26.5
t=3.3245
p= 0.005212
p<0.025
Reject Ho
Accepty Ha
b. |
None of the answers is correct |
Get Answers For Free
Most questions answered within 1 hours.