CS计算机代考程序代写 Bootstrap

Bootstrap

The bootstrap is a method for estimating differential probabilistic features of a function 𝜂 of our
data X and their unknown distribution F. That is, suppose that we are interested in the mean, a

quantile, or some other feature of 𝜂 (𝑿, 𝐹). The first step in the bootstrap is to replace 𝐹 by a
known distribution �̂� that is like 𝐹 in some way. Next, replace 𝑿 by data 𝑿∗ sampled from �̂�.
Finally, compute the mean, quantile, or other feature of 𝜂 (𝑿∗,�̂�) as the bootstrap estimate. This
last step generally requires simulation except in the simplest examples. There are two varieties of

bootstrap that differ by how �̂� is chosen. In the nonparametric bootstrap, the sample c.d.f. is used
as �̂�. In the parametric bootstrap, 𝐹 is assumed to be a member of some parametric family and �̂�
is chosen by replacing the unknown parameter by its M.L.E. or some other estimate.

The Nonparametric Bootstrap

Q1. Confidence Interval for a Location Parameter. Let 𝑋1, . . . , 𝑋𝑛 be a random sample from the
distribution 𝐹. Suppose that we want a confidence interval for the median 𝜃 of 𝐹.

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

Q2)

Let (𝑋, 𝑌 ) have a bivariate joint distribution 𝐹 with finite variances for both coordinates, so that
it makes sense to talk about correlation. Suppose that we observe a random sample

(𝑋1, 𝑌1), . . . , (𝑋𝑛, 𝑌𝑛) from the distribution 𝐹. Suppose that we are interested in the distribution
of the sample correlation:

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

Parametric Bootstrap

Q3. Correcting the Bias in the Coefficient of Variation. The coefficient of variation of a

distribution is the ratio of the standard deviation to the mean. (Typically, people only compute

the coefficient of variation for distributions of positive random variables.)

If we believe that our data 𝑋1, . . . , 𝑋𝑛 come from a lognormal distribution with parameters 𝜇 and

𝜎2, then the coefficient of variation is 𝜃 = (𝑒𝜎
2

− 1)
1/2

. The M.L.E. of the coefficient of

variation is 𝜃 = (𝑒�̂�
2

− 1)
1/2

, where �̂� is the M.L.E. of 𝜎. We expect the M.L.E. of the
coefficient of variation to be a biased estimator because it so nonlinear. Computing the bias is a

difficult task. However, we can use the parametric bootstrap to estimate the bias. The M.L.E.

�̂� of σ is the square root of the sample variance of 𝑙𝑜𝑔(𝑋1), . . . , 𝑙𝑜𝑔(𝑋𝑛). The M.L.E. �̂� of 𝜇 is
the sample average of 𝑙𝑜𝑔(𝑋1), . . . , 𝑙𝑜𝑔(𝑋𝑛). We can simulate a large number of random
samples of size n from the lognormal distribution with parameters �̂� and �̂�2. For each i, we
compute �̂�∗(𝑖), the sample standard deviation of the 𝑖𝑡ℎ bootstrap sample.We estimate the bias

of 𝜃 by the sample average of the values 𝑇(𝑖) = (𝑒(�̂�
∗(𝑖))2 − 1)

1/2

− 𝜃.

Example: Failure Times of Ball Bearings. Products that are subject to wear and tear are generally

tested for endurance in order to estimate their useful lifetimes. We have a dataset that is the

measurements of the numbers of millions of revolutions before failure for 23 ball bearings.

Assume that we model a dataset as lognormal, and that the M.L.E.’s of the parameters are �̂� =

4.150 and �̂� = 0.5217. The M.L.E. of θ is 𝜃 = 0.5593. We could draw 10,000 random samples of
size 23 from a lognormal distribution and compute the sample variances of the logarithms.

However, there is an easier way to do this simulation.

The distribution of (�̂�∗(𝑖))2 is that of a 𝜒2 random variable with 22 degrees of freedom times
0.52172/23. Hence, we shall just sample 10,000 𝜒2 random variables with 22 degrees of
freedom, multiply each one by 0.52172/23, and call the ith one (�̂�∗(𝑖))2. After doing this, the
sample average of the 10,000 𝑇(𝑖) values is −0.01825, which is our parametric bootstrap
estimate of the bias of 𝜃. (The simulation standard error is 9.47e−4.) Because our estimate of the
bias is negative, this means that we expect 𝜃 to be smaller than θ. To “correct” the bias, we could
add 0.01825 to our original estimate 𝜃 and produce the new estimate 0.5593 + 0.01825 = 0.5776.

Testing Hypotheses
Q1. Let 𝑋 have the exponential distribution with parameter 𝜆. Suppose that we wish to test the
hypotheses 𝐻0 ∶ 𝛽 ≥ 1 versus 𝐻1 ∶ 𝛽 < 1. Consider the test procedure δ that rejects 𝐻0 if 𝑋 ≥ 1. a) Determine the power function of the test. b) Compute the significant level of the test. iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad Q2. Suppose that 𝑋1, . . . , 𝑋𝑛 form a random sample from the uniform distribution on the interval [0, θ], and that the following hypotheses are to be tested: 𝐻0: 𝜃 ≥ 2 𝐻1: 𝜃 < 2. Let 𝑌𝑛 = 𝑚𝑎𝑥{𝑋1, . . . , 𝑋𝑛 }, and consider a test procedure such that the rejection region contains all the outcomes for which 𝑌𝑛 ≤ 1.5. a) Determine the power function of the test. b) Compute the significant level of the test. iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad iPad Q3. When testing hypotheses about the mean of a normal distribution, it is traditional to rewrite this test in terms of the statistic 𝑧 = (𝑋𝑛̅̅̅̅ − 𝜇0) 𝜎/√𝑛 Now, Assume that 𝑋1, . . . , 𝑋𝑛 are i.i.d. with the normal distribution that has mean 𝜇 and variance 1. Suppose that we wish to test the hypotheses 𝐻0: 𝜇 ≤ 𝜇0 𝐻1: 𝜇 > 𝜇0.

Consider the test that rejects 𝐻0 if 𝑧 ≥ 𝑐, where 𝑧 is defined above.
a) Show that 𝑃𝑟(𝑧 ≥ 𝑐|𝜇) is an increasing function of μ.
b) Find 𝑐 to make the test have significance level 𝛼0.
c) assume that Z = z is observed. Find a formula for the p-value.

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

Q4. The manufacturer of a certain type of automobile claims that under typical urban driving

conditions the automobile will travel on average at least 20 miles per gallon of gasoline. The

owner of this type of automobile notes the mileages that she has obtained in her own urban

driving when she fills her automobile’s tank with gasoline on nine different occasions. She finds

that the results, in miles per gallon, are as follows: 15.6, 18.6, 18.3, 20.1, 21.5, 18.4, 19.1, 20.4,

and 19.0. Test the manufacturer’s claim by carrying out a test at the level of significance 𝛼0 =
0.05. List carefully the assumptions you make.

Note: the test statistic to be used is t-statistic.

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

Confidence interval
Q1. Suppose that nine observations are selected at random from the normal distribution with

unknown mean μ and unknown variance 𝜎2, and for these nine observations it is found that
𝑋𝑛̅̅̅̅ = 22 and ∑ (𝑋𝑖 − 𝑋𝑛̅̅̅̅ )

2 = 72𝑛𝑖=1 .
a) Carry out a test of the following hypotheses at the level of significance 0.05:

𝐻0: 𝜇 ≤ 20,
𝐻1: 𝜇 > 20

b) Carry out a test of the following hypotheses at the level of significance 0.05 by using the
two-sided t test:

𝐻0: 𝜇 = 20,
𝐻1: 𝜇 ≠ 20

c) From the data, construct the observed confidence interval for μ with confidence
coefficient 0.95.

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

Q2) Suppose that 𝑋1, . . . , 𝑋𝑛 form a random sample from the Poisson distribution with unknown
mean 𝜃, and let 𝑌 = ∑ 𝑋𝑖

𝑛
𝑖=1 .

Determine the value of a constant 𝑐 such that the estimator 𝑒−𝑐𝑌 is an unbiased estimator of 𝑒−𝜃 .

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

ANOVA
Specimens of milk from a number of dairies in three different districts were analyzed, and the

concentration of the radioactive isotope strontium-90 was measured in each specimen. Suppose

that specimens were obtained from four dairies in the first district, from six dairies in the second

district, and from three dairies in the third district, and that the results measured in picocuries per

liter were as follows:

District 1: 6.4, 5.8, 6.5, 7.7,

District 2: 7.1, 9.9, 11.2, 10.5, 6.5, 8.8,

District 3: 9.5, 9.0, 12.1

a) Assuming that the variance of the concentration of strontium-90 is the same for the
dairies in all three districts, determine the M.L.E. of the mean concentration in each of

the districts and the M.L.E. of the common variance.

b) Test the hypothesis that the three districts have identical concentrations of strontium-90.

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

Q2) we are often interested in testing the hypothesis that the p distributions from which the

samples were drawn are actually the same; that is, we desire to test the following hypotheses:

𝐻0: 𝜇1 = ⋯ = 𝜇𝑝,

𝐻1: 𝑇ℎ𝑒 ℎ𝑦𝑝𝑜𝑡ℎ𝑒𝑠𝑖𝑠 𝑖𝑛 𝐻0 𝑖𝑠 𝑛𝑜𝑡 𝑡𝑟𝑢𝑒.

Now assume that H0 is true. Prove that 𝑆𝑆𝑡
2/𝜎2 has the 𝜒2 distribution with n-1 degree of

freedom.

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad

iPad