Gender-based Self-reported Happiness

The first question we address using the WVSWorld Values Survey data is whether there’s a gender difference in self-reported happiness. Conceptually, if there’s a gender difference, then gender and self-reported happiness must be statistically correlated. If they’re uncorrelated, then there’s no gender difference. The logic of statistical inference is to use the sample data in the WVS dataset to draw conclusions about the relationship between the two variables in the population. We test the following hypotheses:

  • Null hypothesis: Gender and happiness are statistically independent of each other.
  • Alternative hypothesis: Gender and happiness aren’t statistically independent of each other.

Create and describe discrete variables

Before we test the hypotheses, we must first prepare data for the two variables and describe their individual and joint distributions.

Create and describe dichotomous happiness variable

We begin by tabulating the self-reported happiness variable V10, and then create a dummy variable based on V10. The table() function tabulates the number of observations under each value of the variable V10. As shown, the variable contains values listed in the codebookcodebook , such as 1 for Very happy, 2 for Rather happy, 3 for Not very happy, and 4 for Not at all happy.

Get hands-on with 1200+ tech skills courses.