From 08e21282f1b4a8c65a27bfd4314ce6c026434064 Mon Sep 17 00:00:00 2001 From: kayliebrehm Date: Wed, 6 Jul 2022 03:09:52 +0000 Subject: [PATCH 1/3] Q2 Initial --- gss2018.rmd | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gss2018.rmd b/gss2018.rmd index 4774400..2239a8a 100644 --- a/gss2018.rmd +++ b/gss2018.rmd @@ -55,11 +55,17 @@ First question - Is opinion on the death penalty (CAPPUN) independent of gun own Is there a difference in years of education (EDUC) between the those who did or did not vote in 2012 (VOTE12)? +$H_0$: There is no difference in years of education between those that did vote and those that didn't in 2012. + +$H_a$: There is a difference in years of education between those that did vote and those that didn't in 2012. + ## Methods -##Results +I will compare the years of education in an individual (categorical) to whether or not that individual voted in 2012 (numerical) using a numerical-categorical analysis. I will use a boxplot graph, some numerical results, and an aov model to analyze this. + +## Results From c7c85cb11fc0c8cf8f096034669c7ce5b36c1a5a Mon Sep 17 00:00:00 2001 From: kayliebrehm Date: Wed, 6 Jul 2022 03:20:43 +0000 Subject: [PATCH 2/3] Q2 Data --- gss2018.rmd | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/gss2018.rmd b/gss2018.rmd index 2239a8a..2f89598 100644 --- a/gss2018.rmd +++ b/gss2018.rmd @@ -1,7 +1,7 @@ --- title: "General Social Survey" -author: "Your Name" -date: "Year 2020" +author: "Kaylie Brehm" +date: "Summer 2022" output: html_document: number_sections: true @@ -63,7 +63,7 @@ $H_a$: There is a difference in years of education between those that did vote a -I will compare the years of education in an individual (categorical) to whether or not that individual voted in 2012 (numerical) using a numerical-categorical analysis. I will use a boxplot graph, some numerical results, and an aov model to analyze this. +I will compare the years of education in an individual (categorical) to whether or not that individual voted in 2012 (numerical) using a numerical-categorical analysis. I will use a boxplot graph, some numerical results, and a t-test to analyze this. ## Results @@ -75,14 +75,28 @@ I will compare the years of education in an individual (categorical) to whether +```{r} +boxplot(EDUC~VOTE12,data=GSSdata) +``` + #### Numerical Descriptive Results +```{r} +favstats(EDUC~VOTE12,data=GSSdata) +``` + ### Inferential Results +```{r} +t.test(momheight~Sex,data=ucdavis1) +``` + + + # Question 3 From f49ec41d86b1fd4d01ab43258a7ba476d12ff133 Mon Sep 17 00:00:00 2001 From: kayliebrehm Date: Wed, 6 Jul 2022 03:52:17 +0000 Subject: [PATCH 3/3] Q2 Analysis --- gss2018.rmd | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gss2018.rmd b/gss2018.rmd index 2f89598..00c2620 100644 --- a/gss2018.rmd +++ b/gss2018.rmd @@ -79,6 +79,10 @@ I will compare the years of education in an individual (categorical) to whether boxplot(EDUC~VOTE12,data=GSSdata) ``` + +Within the graph we see that the median of those who voted in 2012 have about 16 years of education. Of those who voted in 2012, there is a wider spread within each quartile range. The median of those who did not vote in 2012 is about 14. Of those who did not vote in 2012, there is a smaller spread within each quartile range. There are more outliers for years of education in those who did not vote in 2012. + + #### Numerical Descriptive Results @@ -87,14 +91,17 @@ boxplot(EDUC~VOTE12,data=GSSdata) favstats(EDUC~VOTE12,data=GSSdata) ``` +The mean years of education for those who voted in 2012 was about 15.7 while the mean years of education for those who did not vote in 2012 was about 13.4. The standard deviation is higher in those who voted in 2012 which means that the results for years in education are more spread out. + ### Inferential Results ```{r} -t.test(momheight~Sex,data=ucdavis1) +t.test(EDUC~VOTE12,data=GSSdata) ``` +The p-value is 0.0000001248 which is very small. This means I can not conclude that the results were not significant. The null hypothesis was "There is no difference in years of education between those that did vote and those that didn't in 2012." The alternative hypothesis was "There is a difference in years of education between those that did vote and those that didn't in 2012." I reject the null hypothesis due to a p value under 0.05. There was an observed difference in years of education between those who did vote and those that didn't. The t value is about 5.7 so the observable difference is substantial. Although, those who did not vote, had more outliers for years of education. # Question 3