方便大家看,把题贴上来 :题一
Assuming the number of telephone calls made by the salesperson before a successful sales call
may be modelled by the geometric distribution, give a Monte Carlo algorithm for simulating
this random variable, using p=0.21.
Implement this algorithm in R and simulate 5 data sets of size 100. Present your results in
a frequency table with one row (or column) for each simulated data set.
题二:
Extend your computer programme so that it computes the test statistic X平方 for each simulated
sample. Run this programme 1000 times to obtain a (parametric) bootstrap distribution of
X平方 that represents the distribution of the test statistic under the null hypothesis. Plot the
histogram and nd the 5% critical value.
题三:Compare the bootstrap distribution of the test statistic with the theoretical distribution.
What is your test decision if you use the critical value from the simulation?