This is a barplot of the subjects’ marital statuses. Most of the subjects are married.
This is a barplot of marriage and obesity together. There appears to be a connection between being married and overweight because the largest amount of overweight subjects were married.
This is a barplot of gender and obesity together. Men appear to be twice as likely to be overweight as women.
This is a barplot for gender and marriage together. Men are more likely to be widowed because there is a larger very light gray space for men.
Looking at the mosaicplot, there are more men sampled because their column is wider than the women column.
There are more underweight subjects because the plot sections for both overweight men and women is much smaller than the underweight sections.
There are more underweight women because the left column for women has a bottom portion that is much larger than the top that indicates the number that are overweight.
Based on the plot, there are more overweight men than overweight women because the top right portion is larger than the top left which indicate overweight men and women respectively.
The subgroup with the most subjects is the married section. This is because the plot is organized with each group in a separate column for each. The vertical column for married includes both underweight and overweight and make the overall column larger than any other subgroup.
There are many more underweight people than overweight widowed people. This is because the widowed overweight section only takes up the top right corner of the whole plot, while underweight group seems to make up well over 75% of the plot.
There are more divorced people than widowed because while the columns (width) for the two are of similar size, the row for divorced goes farther down than widowed showing there are more divorced than widowed.
Looking at the plot, there seems to be a connection between marriage and obesity because the boxes representing overweight people in every category besides married are similar in size. The overweight married section is much larger than the other three and suggests that there is a connection between being overweight and married.
{r, echo=FALSE}
work <- read.csv(“C:/Users/Jerry/Desktop/work.csv”)
mytable <- (work$marriage)
barplot(table(work$marriage), main = “Marital Status”, xlab = “marriage”)
mytable=table(work\(obese,work\)marriage)
barplot(mytable,legend=rownames(mytable))
mytable=table(work\(obese,work\)gender)
barplot(mytable,legend=rownames(mytable))
mytable=table(work\(marriage,work\)gender)
barplot(mytable,legend=rownames(mytable))
mosaicplot(gender ~ obese, data = work, main = “Gender and Obesity”)
mosaicplot(marriage ~ obese, data = work, main = “Marriage and Obesity”)