Part 1: install.packages ("poliscidata") The two variables you will use are: `gender and authoritarianism`. **Question 1:** Outside of code chunks, write down the null hypothesis: HO: It is likely that there is NO difference between the level of authoritarianism between men and women. **Question 2:** Complete the following codes to create two subsets of the nes data: one subset with all female respondents and one subset with all male respondent. Hint: the gender variable has two values: Female and Male. I have included codes for creating the female group. You only need to complete the codes for the male group. ***{r} library(poliscidata) female_nes <- subset(nes, gender== "Female") male_nes <- subset(nes, gender == "Male") **Question 3:** I included a summary statistic for the dependent variable `authoritarianism below. It is an ordered variable and larger number meaning more authoritarian. Outside of the code chunks, explain which is an appropriate test for the hypothesis (one-sample t-test, two-sample t-test, and paired t-test.) {r} summary(nes$authoritarianism) Mean 3rd Qu. Min. 1st Qu. Median Max. 0.000 2.000 3.000 2.391 3.000 4.000 NA's 437 ^ **Question 4:** Based on your answer in Question 3, conduct the test in R in a new code chunk. Check the lecture notes for example codes for each of the tests. **Question 5:** Based on the test results in Question 4, draw a conclusion outside of th code chunks. Can you reject the null and why? Answer in one to two sentences. Remember t mention the p-value and the level of significance.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter4: More Object Concepts
Section: Chapter Questions
Problem 2RQ
icon
Related questions
Question

Please written by computer source 

១ ន ជ ន ន ដ ន ន ~
19
20 Part 1: install.packages ("poliscidata")
21
22 The two variables you will use are: `gender and authoritarianism`.
23
24
25 **Question 1:** Outside of code chunks, write down the null hypothesis:
26
28
29
35-
36
37
30
31 - ```{r}
32 library (poliscidata)
33
34
38
40
41-
44
4 45 46 7 48 49
HO: It is likely that there is NO difference between the level of authoritarianism
between men and women.
39-{r}
**Question 2:** Complete the following codes to create two subsets of the nes data: one
subset with all female respondents and one subset with all male respondent. Hint: the
gender variable has two values: Female and Male. I have included codes for creating the
female group. You only need to complete the codes for the male group.
47
50
51
female_nes < subset(nes, gender
"Female")
male_nes <- subset(nes, gender == "Male")
**Question 3:** I included a summary statistic for the dependent variable
`authoritarianism below. It is an ordered variable and larger number meaning more
authoritarian. Outside of the code chunks, explain which is an appropriate test for the
hypothesis (one-sample t-test, two-sample t-test, and paired t-test.)
summary(nes$authoritarianism)
Min. 1st Qu. Median
0.000 2.000 3.000
Mean 3rd Qu. Max.
2.391 3.000 4.000
42
43 **Question 4:** Based on your answer in Question 3, conduct the test in R in a new code
chunk. Check the lecture notes for example codes for each of the tests.
- ``{r}
▶
NA's
437
▶
X
▶
**Question 5:** Based on the test results in Question 4, draw a conclusion outside of the
code chunks. Can you reject the null and why? Answer in one to two sentences. Remember to
mention the p-value and the level of significance.
Transcribed Image Text:១ ន ជ ន ន ដ ន ន ~ 19 20 Part 1: install.packages ("poliscidata") 21 22 The two variables you will use are: `gender and authoritarianism`. 23 24 25 **Question 1:** Outside of code chunks, write down the null hypothesis: 26 28 29 35- 36 37 30 31 - ```{r} 32 library (poliscidata) 33 34 38 40 41- 44 4 45 46 7 48 49 HO: It is likely that there is NO difference between the level of authoritarianism between men and women. 39-{r} **Question 2:** Complete the following codes to create two subsets of the nes data: one subset with all female respondents and one subset with all male respondent. Hint: the gender variable has two values: Female and Male. I have included codes for creating the female group. You only need to complete the codes for the male group. 47 50 51 female_nes < subset(nes, gender "Female") male_nes <- subset(nes, gender == "Male") **Question 3:** I included a summary statistic for the dependent variable `authoritarianism below. It is an ordered variable and larger number meaning more authoritarian. Outside of the code chunks, explain which is an appropriate test for the hypothesis (one-sample t-test, two-sample t-test, and paired t-test.) summary(nes$authoritarianism) Min. 1st Qu. Median 0.000 2.000 3.000 Mean 3rd Qu. Max. 2.391 3.000 4.000 42 43 **Question 4:** Based on your answer in Question 3, conduct the test in R in a new code chunk. Check the lecture notes for example codes for each of the tests. - ``{r} ▶ NA's 437 ▶ X ▶ **Question 5:** Based on the test results in Question 4, draw a conclusion outside of the code chunks. Can you reject the null and why? Answer in one to two sentences. Remember to mention the p-value and the level of significance.
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Linux
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT