2024-03-22

This data set is from Kaggle.com

  • It is called ‘Simple Gender Classification’
  • This data set is about specific individuals in a population and their personal information.
  • The columns are:
  • Gender: either male or female
  • Age : in years
  • Height : in cm
  • Weight : in kg
  • Occupation
  • Education Level : ranging from high school diploma to doctorate degree
  • Marital Status: single, married, Other
  • Income: in U.S. Dollars

data set

head(df)
  Gender Age Height..cm. Weight..kg.           Occupation    Education.Level
1   male  32         175          70    Software Engineer    Master's Degree
2   male  25         182          85 Sales Representative  Bachelor's Degree
3 female  41         160          62               Doctor   Doctorate Degree
4   male  38         178          79               Lawyer  Bachelor's Degree
5 female  29         165          58     Graphic Designer Associate's Degree
6   male  45         190          92  Business Consultant    Master's Degree
  Marital.Status Income..USD. Favorite.Color  X
1        Married        75000           Blue NA
2         Single        45000          Green NA
3        Married       120000         Purple NA
4         Single        90000            Red NA
5         Single        35000         Yellow NA
6       Divorced       110000          Black NA

Using hypothesis testing with ggplot2.

Our hypothesis is that Individuals with a higher education level will also have a higher average income in U.S. Dollars. This is proven correct from the graph above.

Hypothesis testing with ggplot2.

Our hypothesis is that Men will have a higher average income than women. This is proven correct from the graph above

Using a 3-D scatterplot

This is analyzing the relationships between age, height, and income by multiple linear regression.

Multiple linear regression is a statistical method that will model the relationship between multiple variables. This can help us understand how variables can predict or explain another.

\[ y = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \beta_3 x_3 + ... \]

The equation above is represented by these variables:

\[ \beta = slope \ coeficient \\ y = dependent \ variable \\ x = independent \ variable \]

Code for my plotly graph

# Aggregate data by Education Level
aggregated_data <- df %>%
  group_by(Education.Level) %>%
  summarize(Mean_Income = mean(Income..USD.))

# Create the bar graph
ggplot(aggregated_data, aes(x = Education.Level, y = Mean_Income)) +
  geom_bar(stat = "identity", fill = "red") +
  labs(
    title = "Income by Education Level",
    x = "Education Level",
    y = "Mean Income (USD)"
  ) +
  theme_minimal()

Conclusion

In conclusion, our analysis revealed several key findings:

Individuals with higher education levels tend to have higher average incomes, supporting our hypothesis that education level correlates with income. Men have a higher average income compared to women, indicating a gender income disparity that warrants further investigation. The 3D scatterplot visualization provided insights into the relationships between age, height, and income, highlighting the complex interplay of these factors.

Thank you!