Problem I

(a) Marriage Barplot

The category “Married” has the most people.

(b) Marriage and Obese Barplot

There appears to be a relationship between obesity and marriage, wherein there is a huge difference in level of underweight people that are married compared to overweight (underweight triumphs). In all scenarios, underweight people are at higher numbers, but those who are married seem to have the biggest difference in size. All other categories have a pretty similar ratio of underweight to overweight people.

(c) Gender and Obese Barplot

It seems as though men are slightly more overwight than women, but they also appear to be a little more ofter underweight than women as well.

(d) Gender and Marriage

It looks as though men are more often widowed than women, by a larger difference than in any other category.

Problem II

(a) Based on the above plot, there is a slightly larger proportion of men in the dataset. This is represented horizontally, by the widths of the boxes in the plot. As seen, the male width on the right is slightly wider than the female on the left.

(b) There is also a much greater proportion of underweight subjects in this dataset, which is represented by the height of the boxes. Underweight being the red heights, and overweight being the blue.

(c) According to the plot, there is a larger proportion of females underweight, because the height of the red box on the left is much higher than that of the blue box on the left, signifying more underweight females than overweight.

(d) There is relatively more overweight men than overweight female. This is shown because the area of the top right box, meaning overweight males, is slightly larger than the overweight female box, on the upper left side.

Problem III

(a) Based on the plot, married and underweight has the most people. This is shown by the fact that the box that represents it has the greatest height and width, therefore giving it the greatest relative area of the plot.

(b) There are more widowed underweight people. The widowed underweight box has a much greater width than the widowed overweight people, even though their heights are nearly the same. This great difference causes the area of the underweight box to be much higher than that of the overweight widow box.

(c) From the plot, we can tell that there are more divorced than widowed people total. This is because the sum of heights of the two top boxes, representing divorced, are greater than the summed heights of the widowed (bottom two) boxes.

(d) From the plot, we can tell that more underweight people are married than overweight people. However, the proportion of underweight to overweight is so similar to that of the other marital statuses that we cannot make a conclusion that based on weight, whether a person is more likely to be married or not. Rather, there is simply more underweight people in the data as a total than overweight.

APPENDIX OF CODE

work=read.csv("~/Desktop/work.csv")
married <- table(work$marriage)
barplot(married, main = "Number of Married", xlab = "Marriage Status")
table2 = table(work$obese, work$marriage)
barplot(table2, main="Obesity and Marriage", xlab="Marriage Status", col = c("blue", "red"), legend = rownames(table2), beside = TRUE)
table3 = table(work$gender, work$obese)
barplot(table3, main="Gender and Obesity", xlab="Weight Status", col = c("blue", "red"), legend = rownames(table3), beside = TRUE)
table4 = table(work$gender, work$marriage)
barplot(table4, main="Gender and Marriage", xlab="Marriage Status", col = c("blue", "red"), legend = rownames(table4), beside = TRUE)
mosaicplot(table3, main="Gender and Obesity", col = c("blue", "red"))
mosaicplot(table2, main="Marriage and Obesity", col = c("blue", "red", "purple", "orange"))