In: Statistics and Probability
Problem 1: Remember when I asked you for your age on the first day of class? Well here is a larger subset of the data that I collected: 18 18 18 18 19 19 19 19 20 20 20 20 21 21 21 21 21 21 21 22 22 22 22 23 24 26 26 28 32 33 46 a)Someone once told me that the average age of students at PSU was 26 years old. Identify the null and alternative hypotheses to test if our class has a significantly different mean age. b)In class, we talked about how we need to know three things to test a hypothesis. Discuss them and explain what they are in the context of this problem. c)Find the critical value associated with this test (α=.05) and use it to find a 95% confidence interval for the true mean student age. d)Calculate the test statistic and associated p-value. e)In class we talked about three different ways come to a decision about whether to reject the null. Describe and carry out all these three methods using your answers to parts c and d. (Remember that they should all lead to the same decision.) f)State your decision and formulate a conclusion in terms of the original problem statement.
I used R software for calculation purpose.
R codes and output:
> x=scan('clipboard');x
Read 31 items
[1] 18 18 18 18 19 19 19 19 20 20 20 20 21 21 21 21 21 21 21 22 22
22 22 23 24
[26] 26 26 28 32 33 46
> t.test(x, mu=26)
One Sample t-test
data: x
t = -3.2973, df = 30, p-value = 0.002517
alternative hypothesis: true mean is not equal to 26
95 percent confidence interval:
20.51500 24.71081
sample estimates:
mean of x
22.6129
Que.a
Hypothesis:
Que.b.
We can check this hypothesis using critical value approach, p-value approach and using confidence interval.
Que.c
Critical value = 2.042
95% confidence interval is 20.51500 to 24.71081
Que.d
test statistic = t = -3.2973
p-value = 0.002517
Que.e
If absolute value of test statistic is less than critical value then we accept null hypothesis. Otherwise we reject null hypothesis.
If p-value is greater than = 0.05, then we accept null hypothesis. Otherwise we reject null hypothesis.
If the confidence interval contain the value then we accept null hypothesis. Otherwise we reject null hypothesis.
Que.f
1. Here absolute value of test statistic 3.2973 is greater than critical value hence we reject null hypothesis.
2. P-value is less than 0.05, hence we reject null hypothesis.
3. 95% Confidence interval does not contain 26, hence reject null hypothesis.
Test statistic,
= 701 / 31 = 22.6129