Introduction

In this Markdown, we answer the following questions:

There is probably a linear relationship between height and weight. I expect that taller people are heavier. Probably there is a slightly different relationship between height and weight for men versus women because women have more body fat and men have muscle.

To answer these questions, we’ll use data made available through the Stanford OLI section:

EDA: Examining Relationships > Case Q→Q: Scatterplots > Statistics Package Exercise: Creating a Scatterplot

Results/Analysis

Read the data file:

datafile="height.RData"
load(datafile)

To investigate the relationship between height and weight, I will show a scatter plot with weights on the y axis and heights on the x axis. Because the data file includes heights and weights for men and women, I’ll indicate gender using color and point shape.

title="Height and Weight"
ylab="Weight (pounds)"
xlab="Height (inches)"
men=h[h$gender==0,]
women=h[h$gender==1,]
plot(h$height,h$weight,xlab=xlab,ylab=ylab,pch='.',main=title)
points(men$height,men$weight,pch=15,col="lightblue")
points(women$height,women$weight,pch=16,col="orange")

The scatter plot shows that there is a linear relationship between height and weight for both men and women.

If gender matters to this relationship, then I should observe different coefficients upon performing a linear regression relating height and weight. To investigate, I will use linear regression below:

men_linear_model=lm(weight~height,data=men)
women_linear_model=lm(weight~height,data=women)

The slope of the men’s regression line is: 6.8400473.

The slope of the women’s regression line is: 3.0813069.

The rate of increase for weight with respect to height for men is about 2.2 times larger than for women.

Conclusion

This Markdown answered the following questions:

We showed that there is a linear relationship between height and weight.

Gender does matter. Men’s and women’s weights increase with height at different rates.

Discussion

It’s interesting that men’s weights increase faster than women’s with increase in height. I think that might have something to do with body composition. Men are generally more muscular than women. Women generally have a higher percentage of body fat than man. Maybe this is because muscle weighs more than fat.