Suppose that X is a single observation drawn from the uniform distribution on the interval [θ−10,θ+10], where θ is unknown and might be any real number. Given θ0=20 we wish to test H0:θ=θ0 against H1:θ=20. Let ϕ(θ0) be the test which accepts H0 if and only if X∈A(θ0), where
A(θ0)={[θ0−8,∞),(−∞,θ0+8],θ0>20θ0<20
Show that this test has size α=0.10.
Now consider
C1(X)={θ:X∈A(θ)}C2(X)={θ:X−9⩽θ⩽X+9}
Prove that both C1(X) and C2(X) specify 90% confidence intervals for θ. Find the confidence interval specified by C1(X) when X=0.
Let Li(X) be the length of the confidence interval specified by Ci(X). Let β(θ0) be the probability of the Type II error of ϕ(θ0). Show that
E[L1(X)∣θ=20]=E[∫−∞∞1{θ0∈C1(X)}dθ0∣θ=20]=∫−∞∞β(θ0)dθ0
Here 1{B} is an indicator variable for event B. The expectation is over X. [Orders of integration and expectation can be interchanged.]
Use what you know about constructing best tests to explain which of the two confidence intervals has the smaller expected length when θ=20.