{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Dr. Hackney STA Solutions pg 170

# Dr. Hackney STA Solutions pg 170 - {j 1 nsim{i 1 ntheta...

This preview shows page 1. Sign up to view the full content.

Second Edition 10-13 k*If[x > k, 1, 0]; Psi1[x_, k_] = If[Abs[x] <= k, 1, 0]; num =Table[Psi[w1[[j]][[i]], k1], {j, 1, nsim}, {i, 1,n}]; den =Table[Psi1[w1[[j]][[i]], k1], {j, 1, nsim}, {i, 1,n}]; varnaive = Map[Mean, num^2]/Map[Mean, den]^2; naivestat = Table[Table[m1[[i]][[j]] -theta_0/Sqrt[varnaive[[j]]/n], {j, 1, nsim}],{i, 1, ntheta}]; absnaive = Map[Abs, naivestat]; N[Table[Mean[Table[If[absnaive[[i]][[j]] > 1.645, 1, 0], {j, 1, nsim}]], {i, 1, n\theta}]] Calculation of bootstrap variance and test statistic nboot=20; u:=Random[DiscreteUniformDistribution[n]] databoot=Table[data[[jj]][[u]],{jj,1,nsim},{j,1,nboot},{i,1,n}]; m1boot=Table[Table[a/.mest[k1,databoot[[j]][[jj]]], {jj,1,nboot}],{j,1,nsim}]; varboot = Map[Variance, m1boot]; bootstat = Table[Table[m1[[i]][[j]] -theta_0/Sqrt[varboot[[j]]], {j, 1, nsim}], {i, 1, ntheta}]; absboot = Map[Abs, bootstat]; N[Table[Mean[Table[If[absboot[[i]][[j]] > 1.645, 1,0],
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: {j, 1, nsim}]], {i, 1, ntheta}]]\) Calculation of median test - use the score variance at the root density (normal) med = Map[Median, data]; medsd = 1/(n*2*f1[theta_0]); medstat = Table[Table[med[[j]] + \theta[[i]] - theta_0/medsd, {j, 1, nsim}], {i, 1, ntheta}]; absmed = Map[Abs, medstat]; N[Table[Mean[Table[If[\(absmed[[i]][[j]] > 1.645, 1, 0], {j, 1, nsim}]], {i, 1, ntheta}]] 10 . 41 a. The log likelihood is log L = nr log p + n ¯ x log(1-p ) with d dp log L = nr p-n ¯ x 1-p and d 2 dp 2 log L =-nr p 2-n ¯ x (1-p ) 2 , expected information nr p 2 (1-p ) and (Wilks) score test statistic √ n ± r p-n ¯ x 1-p ² q r p 2 (1-p ) = r n r ³ (1-p ) r + p ¯ x √ 1-p ´ . Since this is approximately n(0 , 1), a 1-α conﬁdence set is µ p : ¶ ¶ ¶ ¶ r n r ³ (1-p ) r-p ¯ x √ 1-p ´¶ ¶ ¶ ¶ ≤ z α/ 2 · ....
View Full Document

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern