Coder Social home page Coder Social logo

gauravjagtap-2611 / statistical-inference-with-general-social-survey-data-in-r Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 312 KB

In this Project, I aim to answer few Research questions using General Social Survey data.

general-social-survey-data-analysis statistical-inference chi-square-test anova income-inequality party-affiliation r-studio

statistical-inference-with-general-social-survey-data-in-r's Introduction

Statistical-Inference-with-General-Social-Survey-Data-

1. Introduction

The General Social Survey (GSS) is an observational study conducted by the National Opinion Research Center, at the University of Chicago.Our analysis will focus on the GSS 2012 report; hence, this data is generalizable to adults, aged 18 years and above, living in households in the United States, who are able to do the survey in English or Spanish.

2. Research question 1 :

Is there any relation between political party affiliation and race to which people belong?

Visualizing different race affiliation to political parties in US. image

Interpretation:

If we consider different races and their political affiliation, white race has somewhat equal proportion of political affiliation ,but at the same time it has maximum and of all races greatest no of Strong Republican affiliation.
Similarly, Black population seem to have Strong Democrat affiliation and least Strong Republican affiliation.This is exactly opposite to White population. Others have roughly equal political party affiliation.

2.3 Inference:

2.3.1 Stating Hypothesis:

**Null hypothesis:** Race and Partyid are independent of each other. \

Alternative hypothesis: Race and Partyid are dependent.

## Chi-sq Results:

Pearson's Chi-squared test

data: new_df$partyid and new_df$race X-squared = 5670.8, df = 14, p-value < 2.2e-16

Conclusion 2.3.4:

We have enough evidence to say that there is association between race of population and party affiliation.

Research question 2:

Is there income disparity among different races in US society?

3.1 Motivation

The reason why this question is interesting is that this research surveys across a broad range of US demographics, including all races. Studying the differences between average family income across races may reveal helpful insights about the income gap in the US.

Now we will try to visualise this income distribution among different races using violine plot.

image

Interpretation:

Here we can see that, White & Other races have similar kind of income distributions. And greater proportion of the people belonging to Black race have fairly low income. As interpretation of graphs/plots is subjective, we try to confirm this hypothesis using Statistical tests.

3.3 Inference:

3.3.1 Stating Hypothesis:

μ = average family income (in US dollars)

Null hypothesis: The average family income is the same across all races(i.e μ1 = μ2 = μ3).

Alternative hypothesis: The average family income differs between at least one pair of races.

Conclusion using ANOVA:

WE carry out One Way ANOVA to come this conclusion, for detailed analysis resfer to attached R pdf file.

The data provide convincing evidence that at least one pair of population means are different from each other. There is a difference between the average family income (is US dollars) between at least one pair of race.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.