Problem 1: carry out your own simuation study of confidence intervals as follows:
a) generate 100 observations from a binomial random variable with n=10 and p=0.3
(Calc >Random Data >Binomial > Generate 100 rows of data, Store in c1, Number of trials: 10, Probability of success: 0.3)
b) Find a 90% confidence interval for the mean
(Stat > Basic Statistics > 1-sample t > Samples in column: c1, Options > Confidence level: 90)
c) check whether the interval contains the true mean μ
(If you don't know what μ is you might need to look up your 3101 stuff)
repeat a-c 20 times
Your answer should look like this:
| Lower Limit | Upper Limit | Interval OK |
|---|---|---|
| 50.0 | 60.5 | Yes |
| ... | ... | ... |
Problem 2 carry out your own simuation study of hypothesis testing as follows:
a) generate 50 observations from a Bernoulli random variable with p=0.6
(Calc >Random Data >Bernoulli > Generate 50 rows of data, Store in c1, Probability of success: 0.6)
b) Carry out the hypothesis test H0: p=0.5 vs Ha: p>0.5
(Stat > Basic Statistics > 1-Proportion > Samples in column: c1, Options: make changes (if necessary)
c) make decision on test based on p-value
repeat a-c 20 times
Your answer should look like this:
| p-value | reject H0? |
|---|---|
| 0.01 | Yes |
| 0.17 | No |
| ... | ... |