(4) Suppose that 15 voters voted for candidate A and 5 for candidate B. Is it safe to conclude using the test you derived in part (2) at level 10% that candidate A will not loose the election? (5) optional for extra marks. For the test that you derived in part (2) (again with n = 20), calculate the probability of type II error when p = 0.4. You are allowed and encouraged to use software to calculate binomial probabilities. In R, the CDF F(x) of the binomial distribution with size n and success probability p can be calculated as follows: For example, for x = 2, n = 10 and p = 0.3 we get pbinom(2,size=10,prob=0.3) ## [1] 0.3827828
(4) Suppose that 15 voters voted for candidate A and 5 for candidate B. Is it safe to conclude using the test you derived in part (2) at level 10% that candidate A will not loose the election? (5) optional for extra marks. For the test that you derived in part (2) (again with n = 20), calculate the probability of type II error when p = 0.4. You are allowed and encouraged to use software to calculate binomial probabilities. In R, the CDF F(x) of the binomial distribution with size n and success probability p can be calculated as follows: For example, for x = 2, n = 10 and p = 0.3 we get pbinom(2,size=10,prob=0.3) ## [1] 0.3827828
MATLAB: An Introduction with Applications
6th Edition
ISBN:9781119256830
Author:Amos Gilat
Publisher:Amos Gilat
Chapter1: Starting With Matlab
Section: Chapter Questions
Problem 1P
Related questions
Question
Please do part 2, 4, 5, thanks
![(4) Suppose that 15 voters voted for candidate A and 5 for candidate B. Is it safe to
conclude using the test you derived in part (2) at level 10% that candidate A will
not loose the election?
(5) optional for extra marks. For the test that you derived in part (2) (again with
n = 20), calculate the probability of type II error when p = 0.4.
You are allowed and encouraged to use software to calculate binomial probabilities.
In R, the CDF F(x) of the binomial distribution with size n and success probability
p can be calculated as follows: For example, for x = 2, n = 10 and p = 0.3 we get
pbinom(2,size=10,prob=D0.3)
## [1] 0.3827828](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fe5046824-623a-41fb-a6e0-643b469382f0%2F73e41290-0f62-42ee-889d-1058b240c02a%2Fcrs8kxb_processed.png&w=3840&q=75)
Transcribed Image Text:(4) Suppose that 15 voters voted for candidate A and 5 for candidate B. Is it safe to
conclude using the test you derived in part (2) at level 10% that candidate A will
not loose the election?
(5) optional for extra marks. For the test that you derived in part (2) (again with
n = 20), calculate the probability of type II error when p = 0.4.
You are allowed and encouraged to use software to calculate binomial probabilities.
In R, the CDF F(x) of the binomial distribution with size n and success probability
p can be calculated as follows: For example, for x = 2, n = 10 and p = 0.3 we get
pbinom(2,size=10,prob=D0.3)
## [1] 0.3827828
![Consider a random sample X1,...,X, of voters who either voted for Candidate A (“X; =
1") or for Candidate B (“X; = 0"). Denote the probability of voting for Candidate A by p.
We wish to test
Họ :p2 0.5 vs. H1 : p< 0.5.
(i.e. the hypothesis that candidate A will not loose the election).
(1) Consider a test of the above hypothesis of the form
i=1
for some integer c. Calculate the power of this test and show that it is a decreasing
function of p for any c e {0, ...,n – 1}.
(2) Suppose that n = 20. Find c so that v in (1) is a test at level 10% with the largest
possible power (from among the tests of the same form at level 10%). What is the size
of your test? Use that the CDF of the binomial distribution with size 20 and success
probability 0.5 evaluated at r = 0,..., 20 equals (rounded to 3 decimal places)
round (pbinom(0:20, size=20,p=0.5),3)
## [1] 0.000 0.000 0.000 0.001 0.006 0.021 0.058 0.132 0.252 0.412 0.588 0.748
## [13] 0.868 0.942 0.979 0.994 0.999 1.000 1.000 1.000 1.000
(3) Suppose that 5 voters voted for candidate A and 15 for candidate B. Is it safe to
conclude using the test you derived in part (2) at level 10% that candidate A will
loose the election?](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fe5046824-623a-41fb-a6e0-643b469382f0%2F73e41290-0f62-42ee-889d-1058b240c02a%2F20arxag_processed.png&w=3840&q=75)
Transcribed Image Text:Consider a random sample X1,...,X, of voters who either voted for Candidate A (“X; =
1") or for Candidate B (“X; = 0"). Denote the probability of voting for Candidate A by p.
We wish to test
Họ :p2 0.5 vs. H1 : p< 0.5.
(i.e. the hypothesis that candidate A will not loose the election).
(1) Consider a test of the above hypothesis of the form
i=1
for some integer c. Calculate the power of this test and show that it is a decreasing
function of p for any c e {0, ...,n – 1}.
(2) Suppose that n = 20. Find c so that v in (1) is a test at level 10% with the largest
possible power (from among the tests of the same form at level 10%). What is the size
of your test? Use that the CDF of the binomial distribution with size 20 and success
probability 0.5 evaluated at r = 0,..., 20 equals (rounded to 3 decimal places)
round (pbinom(0:20, size=20,p=0.5),3)
## [1] 0.000 0.000 0.000 0.001 0.006 0.021 0.058 0.132 0.252 0.412 0.588 0.748
## [13] 0.868 0.942 0.979 0.994 0.999 1.000 1.000 1.000 1.000
(3) Suppose that 5 voters voted for candidate A and 15 for candidate B. Is it safe to
conclude using the test you derived in part (2) at level 10% that candidate A will
loose the election?
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![MATLAB: An Introduction with Applications](https://www.bartleby.com/isbn_cover_images/9781119256830/9781119256830_smallCoverImage.gif)
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
![Probability and Statistics for Engineering and th…](https://www.bartleby.com/isbn_cover_images/9781305251809/9781305251809_smallCoverImage.gif)
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
![Statistics for The Behavioral Sciences (MindTap C…](https://www.bartleby.com/isbn_cover_images/9781305504912/9781305504912_smallCoverImage.gif)
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
![MATLAB: An Introduction with Applications](https://www.bartleby.com/isbn_cover_images/9781119256830/9781119256830_smallCoverImage.gif)
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
![Probability and Statistics for Engineering and th…](https://www.bartleby.com/isbn_cover_images/9781305251809/9781305251809_smallCoverImage.gif)
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
![Statistics for The Behavioral Sciences (MindTap C…](https://www.bartleby.com/isbn_cover_images/9781305504912/9781305504912_smallCoverImage.gif)
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
![Elementary Statistics: Picturing the World (7th E…](https://www.bartleby.com/isbn_cover_images/9780134683416/9780134683416_smallCoverImage.gif)
Elementary Statistics: Picturing the World (7th E…
Statistics
ISBN:
9780134683416
Author:
Ron Larson, Betsy Farber
Publisher:
PEARSON
![The Basic Practice of Statistics](https://www.bartleby.com/isbn_cover_images/9781319042578/9781319042578_smallCoverImage.gif)
The Basic Practice of Statistics
Statistics
ISBN:
9781319042578
Author:
David S. Moore, William I. Notz, Michael A. Fligner
Publisher:
W. H. Freeman
![Introduction to the Practice of Statistics](https://www.bartleby.com/isbn_cover_images/9781319013387/9781319013387_smallCoverImage.gif)
Introduction to the Practice of Statistics
Statistics
ISBN:
9781319013387
Author:
David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:
W. H. Freeman