Mock Survey Analysis Example with R

What are the basic techniques used to analyze survey response data?

First off, this code generates a random sample of survey responses that we will analyze:

Ok! What is the gender breakdown?

Is there any relationship between GPA (“score”) and income (“class”) in our random sample?  (There shouldn’t be.)

Looks like there is no relationship!

Mathematically, since the p-value (0.7617) is greater than the significance level (0.05), we must “accept the null hypothesis” – that the variables (class and score) are independent.

 

 

 

 

 

Let’s add a categorical variable (“gender”) to our table:

 

 

 

 

 

 

 

Comments

*