- 9 Exercise 1 Consider A Bernoulli Statistical Model Where The Probability Of A Success Is The Parameter Of Interest An 1 (155.29 KiB) Viewed 33 times
9 Exercise 1. Consider a Bernoulli statistical model, where the probability of a success is the parameter of interest an
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
9 Exercise 1. Consider a Bernoulli statistical model, where the probability of a success is the parameter of interest an
9 Exercise 1. Consider a Bernoulli statistical model, where the probability of a success is the parameter of interest and there are n independent observations r = {11, ... , 11} where Ii 1 with probability 6 and ; = 0 with probability 1-0. Define the hypotheses H, : 0 = 0, and HA: 0 = 0 A, and assume a = 0.05 and 6, <0A. (a) Use Neyman-Pearson's lemma to define the rejection region of the type ni >K (b) Let n = 20, 0, = 0.45, 8A = 0.65 and DH-1T; = 11. Decide whether or not H, should be rejected. Hint: use the fact that nx~ Bin (n.) when r; d Bernoulli(6). [5] 1 (c) Using the same values, calculate the p-value. [5] (d) What is the power of the test? (5) (e) Show how the result in (a) can be used to find a test for H. : = 0.45 versus HA: 0 > 0.45. [5] (f) Write down the power function as a function of the parameter of interest. [5] (g) Create an R function to calculate it and plot for 6 € [0,1]. [5] (h) Now use a t-test to repeat the test for part (b). Hint: You can use the fact that the order of observations doesn't matter and so any z of length 20 and Ex; = 11 will yield the sam result. You should remember to set the alternative to be greater and either subtract 6, from or use mu=0.45. [5] (i) Examine the function power.t.test in R. Create a plot to compare the power of the t-test to the test you have derived across values of 0. Hint: You can calculate the power of the t-test at 0o = 0.45 and 0 = 0.65 using 1 power.t.test(n=n,delta=0.65-0.45, sig.level=0.05, alternative="one sided", sd=sd(x) $pow for example. Note how this requires the sample standard deviation of x. (5) (1) Write a simulation study to verify your calculation of k using 1000 samples from Ho. [5]