Lecture 7
- Time schedule:
- 12.30-14.15 : Lectures
- 14.30-16.15 : Exercises
- Topic:
- Statistical hypothesis and test, hypothesis test of the
mean and variance in
a single sample and comparison of two samples.
- Literature:
- [W] sections 10.1 to 10.8 and 10.13.
- Slides:
- PDF
- Exercises:
- 10.19, 10.25
- 10.15, 10.67, 10.73, 10.30
- Solutions to exercises (in
handwritten Danish)
- MATLAB exercise
- Again, consider the data set wage1.dat
here (rightclick and Save Page As...).
- In Matlab import the data using data =
importdata('wage1.dat') (you might need to adjust the
path).
- Extract the wage data using wage =
data.data(:,1);
- Make a histogram of the wage
and log(wage) using hist or histfit -
which histogram looks most like a normal distribution?
Why is
this relevant?
- Define lwage = log(wage);. We want to test if the
mean log-wage is 1.6 at the 5% significance level.
Specifiy
the relevant statistical hypotheses.
- Use mean, std and size to
calculate the t-test statistic.
- Compare the test statistics to the critical values :
tinv([.025 .975],sampleSize-1).
- Assume that t is your test statistic. Apply the
following
command 2*(1-tcdf(abs(t),size(lwage,1)-1)).
What do
you think it calculates?
- Find a 95% confidence interval for μ
- Use ttest to verify your results.
- English-Danish:
- Hypothesis test = Hypotesetest
- Test statistic = Teststørrelse
- Critical area/value = Kritisk område/værdi
- One/two sided test = En-/to-sidet test
- Significance level (α) = Signifikansniveau
- Power (of a test) = Styrken (af en test)
Svante