STA2002: Probability and Statistics II Fall 2024
Homework #6
This is the homework for week 7. The due date is 11:59 p.m., October 27. Late submission will
automatically result in “0” grade. Please include codes for the program part in your submission.
1 Computation Questions
(Question1): (20 points) Ledolter and Hogg report that two rubber compounds were tested for
tensile strength. Rectangular materials were prepared and pulled in a longitudinal direc-
tion. A sample of 14 specimens, seven from compound A and seven from compound B, was
prepared, but it was later found that two B specimens were defective and they had to be
removed from the test. The tensile strength (in units of 100 pounds per square inch) of the
remaining specimens are as follows:
A : 32 30 33 32 29 34 32, B : 33 35 36 37 35.
i. Calculate an approximate 95% two–side confidence interval for the difference of the mean
tensile strengths of the two rubber compounds µA − µB . You may assume that the data
satisfy normal distributions.
ii. Derive the upper–side confidence interval for µA − µB .
(Question2): (15 points) In developing countries in Africa and the Americas, let p1 and p2 be
the respective proportions of women with nutritional anemia. Find an approximate 90%
two–side confidence interval for p1 − p2 , given that a random sample of n1 = 2100 African
women yielded y1 = 840 with nutritional anemia and a random sample of n2 = 1900 women
from the Americas yielded y2 = 323 women with nutritional anemia.
(Question3): (45 points)
Suppose data X1 , X2 , · · · , Xn are i.i.d., satisfying normal distribution N (µ, σ 2 ), where σ 2 is
known. After collecting data, the statistician wants to test the hypothesis:
H0 : µ = 0, H1 : µ = 1
with Type–I error α.
i. Derive the test statistics and the rejection of the test. Notably, the answer may not be
unique, and as long as it is plausible, it should be fine.
ii. Calculate Type–I error of your test, ensure it to be α.
iii. Calculate Type–II error of your test, and prove that the Type–II error tends to 0 as
n → ∞.
iv. Suppose σ 2 = 1 and α = 5%. The data we collects is
[-1.78, -0.53, -0.40, 0.15, -0.31, -1.07, -1.32, -0.80, -0.89, -0.40, 0.10, 0.67, -1.25, -1.29, 0.04].
Based on this observation, which hypothesis do you prefer.
1
2 Programming Questions
(20 points)
Implement the following experiment using Jupyter or R:
i. Generate X1 , · · · , Xn satisfying normal distribution N (0, 1).
ii. Suppose we want to test the hypothesis
H0 : µ = 0 and H1 : µ = 1.
Perform test using the test statistics and the rejection region derived from Question 3. Suppose
σ 2 = 1 and α = 5% is known.
Repeat Step i and ii for 200 times, record the frequency of rejecting H0 . It should be closed to 5%.
iv. Now redo step i to iii for distribution N (1, 1). Now the frequency or rejecting H0 should be
significantly larger than 5%.