I got the answer a) to d. I need answer e and f. And if there is anything wrong,
ID: 3066498 • Letter: I
Question
I got the answer a) to d. I need answer e and f. And if there is anything wrong, correct for me. Thank you.
R Problem The purpose of this problem is to understand the relationship between the sampling distribution of p and the After the first Democratic candidate debate, an MSNBC poll suggested that Hillary Clinton won the debate (a) State the approximate sampling distribution of p, the sample proportion of voters who hypothesis test for p. Tasks that should be included in your submission are in bold with 54% of the 633 respondents responding in her favor believed Hillary Clinton won the first debate. Write the distribution in terms of p, the unknown population proportion of voters who felt Hillary Cliton won the first debate. (b) Suppose, for this portion of the problem, that the true population proportion were p- 0.50, so that exactly half of voters felt she won the debate.Based on your answer to (a), what is the probability that we observe p 2 0.54 if p were actually 0.50 in a sample of size 633. (c) The following R code generates a random sample of size 633 from a population with success propobability 0.50 simulating the poll taken by MSNBC (assuming the true proportion p were 0.50). In the code below. rbinom(633 1, p=.50) generates 633 realizations of a binary (1 /0) random variable, and we add them using sum) to calculate the sample proportion. Run the entire chunk of code by copying and pasting from ### to ###. You do not need to include this output in your submission. set.seed C0808) x sum(rbinom (633,1, p-.50)) (p.hat x/633) Now, let's generate 100 samples of size 633 from a population with success probability of 0.50. Below we use a for loop. This repeats a task for a set number of replications and stores the result for each replication. p.hat-NULL sets up an empty list of p that we fill with our 100 sample and set.seed(0808) makes sure we can recreate our simulated data. p , hat -NULL set.seed (0808) for(i in 1:100) x - sum(rbin .hat [1] om (633, -x/633 1, p-.50)) p.hat If we repeated the above procedure taking 10,000 samples rather than 100, how many of the resulting p would you expect to be greater than 0.54? Why? Does this mean it is unusual to see a 0.54 if p 0.50?Explanation / Answer
Solution:-
e)
State the hypotheses. The first step is to state the null hypothesis and an alternative hypothesis.
Null hypothesis: P < 0.50
Alternative hypothesis: P > 0.50
Note that these hypotheses constitute a one-tailed test. The null hypothesis will be rejected only if the sample proportion is too small.
Formulate an analysis plan. For this analysis, the significance level is 0.05. The test method, shown in the next section, is a one-sample z-test.
Analyze sample data. Using sample data, we calculate the standard deviation () and compute the z-score test statistic (z).
= sqrt[ P * ( 1 - P ) / n ]
= 0.005
z = (p - P) /
z = 8.00
where P is the hypothesized value of population proportion in the null hypothesis, p is the sample proportion, and n is the sample size.
Since we have a one-tailed test, the P-value is the probability that the z-score is greater than 8.0
Thus, the P-value = less than 0.0001
Interpret results. Since the P-value (almost 0) is less than the significance level (0.05), we have to accept the null hypothesis.
From the above test we have sufficient evidence in the favor of the claim that Hillary clinton won the debate.
f)
State the hypotheses. The first step is to state the null hypothesis and an alternative hypothesis.
Null hypothesis: P < 0.50
Alternative hypothesis: P > 0.50
Note that these hypotheses constitute a one-tailed test. The null hypothesis will be rejected only if the sample proportion is too small.
Formulate an analysis plan. For this analysis, the significance level is 0.05. The test method, shown in the next section, is a one-sample z-test.
Analyze sample data. Using sample data, we calculate the standard deviation () and compute the z-score test statistic (z).
= sqrt[ P * ( 1 - P ) / n ]
= 0.07071
z = (p - P) /
z = 0.57
where P is the hypothesized value of population proportion in the null hypothesis, p is the sample proportion, and n is the sample size.
Since we have a one-tailed test, the P-value is the probability that the z-score is greater than 0.57.
Thus, the P-value = 0.2843
Interpret results. Since the P-value (0.2843) is greater than the significance level (0.05), we have to accept the null hypothesis.
From the above test we do not have sufficient evidence in the favor of the claim that Hillary clinton won the debate.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.