1. LON-CAPA Logo
  2. Help
  3. Log In
 

Browsing resource, all submissions are temporary.


Body Mass Index: Part 2

Last week, you looked at the students' weights and heights from a random sampling of the combined Stat 100 and Stat 200 survey data from Fall 2016 and calculated their BMIs. This time you will look at the BMI result more and will perform a hypothesis test on the possible gender difference in BMI.

Instead of sampling 200 students from the data as we did last time, we now sample 500 students in this problem because you will perform a hypothesis test. As you learn in Stat 200, larger sample size has a higher power of detecting an effect. Here are the random sample chosen by the computer. Copy and paste the following commands to your R and execute them.

weight <- c(100, 170, 150, 138, 115, 181, 97, 138, 180, 122, 178, 165, 110, 150, 175, 132, 150, 150, 127, 140, 118, 105, 155, 120, 165, 200, 110, 150, 181, 157, 165, 145, 140, 123, 210, 128, 147, 282, 138, 160, 158, 130, 116, 175, 170, 102, 107, 135, 111, 130, 155, 125, 142, 140, 175, 140, 170, 115, 163, 130, 140, 150, 244, 150, 111, 160, 80, 245, 155, 155, 145, 150, 208, 165, 122, 190, 132, 180, 149, 163, 160, 123, 145, 145, 121, 226, 123, 120, 123, 125, 140, 176, 88, 139, 140, 171, 111, 175, 130, 135, 160, 167, 120, 116, 103, 120, 190, 115, 177, 155, 135, 125, 108, 265, 105, 150, 134, 245, 90, 128, 140, 114, 176, 111, 132, 144, 110, 95, 130, 130, 205, 150, 119, 138, 125, 145, 125, 155, 125, 160, 148, 180, 140, 163, 200, 135, 167, 135, 120, 125, 130, 215, 86, 140, 160, 142, 128, 108, 156, 167, 162, 180, 150, 225, 160, 158, 140, 152, 154, 229, 230, 130, 125, 160, 100, 112, 192, 174, 153, 160, 135, 113, 145, 124, 142, 130, 135, 165, 140, 150, 110, 150, 220, 125, 110, 150, 165, 170, 140, 155, 100, 116, 80, 165, 135, 115, 175, 200, 160, 167, 180, 139, 105, 180, 120, 135, 141, 175, 155, 92, 100, 155, 116, 218, 104, 116, 101, 115, 132, 187, 132, 130, 210, 85, 128, 212, 150, 135, 150, 132, 200, 102, 118, 130, 115, 110, 167, 145, 150, 132, 160, 115, 123, 126, 140, 140, 180, 140, 120, 125, 190, 126, 153, 135, 165, 168, 185, 150, 105, 140, 125, 132, 120, 154, 130, 126, 125, 120, 140, 204, 125, 130, 148, 90, 202, 145, 125, 195, 170, 157, 177, 150, 165, 143, 120, 165, 170, 115, 160, 137, 142, 125, 155, 145, 108, 122, 98, 140, 127, 145, 200, 125, 145, 145, 151, 150, 150, 145, 167, 147, 228, 115, 127, 182, 130, 166, 140, 100, 120, 165, 140, 265, 200, 175, 120, 142, 170, 132, 86, 170, 140, 121, 160, 138, 150, 87, 195, 190, 120, 151, 126, 100, 152, 170, 240, 150, 123, 120, 180, 135, 185, 135, 126, 175, 130, 172, 160, 105, 135, 170, 100, 175, 120, 108, 148, 140, 175, 140, 162, 151, 165, 90, 110, 137, 106, 141, 196, 118, 160, 140, 140, 122, 130, 170, 155, 120, 212, 132, 125, 100, 139, 90, 230, 138, 140, 143, 140, 120, 105, 210, 150, 140, 174, 130, 120, 125, 135, 153, 108, 140, 250, 135, 103, 156, 123, 115, 180, 180, 150, 120, 153, 123, 116, 90, 145, 220, 108, 170, 205, 175, 148, 130, 130, 163, 180, 155, 170, 205, 145, 117, 190, 175, 170, 108, 140, 160, 108, 146, 115, 105, 130, 160, 83, 122, 130, 149, 128, 150, 145, 143, 190, 133, 150, 130, 140, 180, 165, 166, 133, 105, 157, 126, 119, 220, 102, 125, 200, 128, 149, 122, 140, 118, 135, 114, 134, 110, 140, 165, 150, 120)

height <- c(58, 64, 72, 68, 64, 75, 66, 63, 65, 67, 65, 73, 60, 72, 72, 62, 73, 69, 63, 65, 67, 63, 71, 63, 70, 71, 64, 66, 67, 65, 70, 74, 69, 61, 67, 62, 67, 71, 66, 65, 71, 62, 67, 66, 70, 60, 67, 62, 62, 65, 74, 62, 67, 66, 77, 64, 61, 66, 68, 68, 67, 68, 70, 70, 64, 68, 76, 75, 64, 69, 63, 63, 70, 69, 67, 60, 66, 63, 65, 73, 69, 63, 72, 66, 67, 65, 65, 64, 61, 60, 65, 75, 68, 56, 66, 65, 65, 76, 63, 64, 70, 65, 62, 63, 77, 62, 73, 63, 67, 65, 67, 66, 64, 69, 63, 67, 68, 75, 65, 66, 72, 64, 70, 62, 72, 58, 62, 64, 61, 62, 73, 64, 66, 65, 65, 66, 67, 72, 62, 69, 70, 67, 63, 66, 72, 65, 62, 70, 65, 63, 69, 75, 66, 66, 74, 65, 65, 61, 63, 71, 73, 67, 67, 72, 66, 68, 66, 68, 72, 65, 66, 68, 64, 72, 60, 66, 72, 67, 66, 68, 64, 61, 74, 68, 70, 67, 66, 74, 70, 69, 78, 69, 74, 62, 63, 74, 68, 67, 63, 70, 63, 66, 48, 71, 65, 70, 71, 68, 62, 70, 70, 68, 61, 73, 63, 69, 60, 70, 74, 64, 64, 75, 64, 73, 64, 67, 65, 65, 69, 72, 70, 65, 63, 62, 61, 62, 63, 67, 67, 64, 70, 63, 64, 65, 68, 65, 67, 68, 70, 64, 69, 76, 73, 64, 73, 67, 71, 65, 63, 65, 69, 67, 63, 68, 65, 72, 72, 68, 63, 64, 61, 66, 62, 64, 65, 60, 64, 64, 68, 64, 66, 67, 69, 64, 70, 63, 64, 67, 67, 63, 71, 63, 68, 63, 65, 67, 67, 62, 66, 62, 68, 64, 71, 66, 66, 65, 61, 67, 67, 68, 73, 63, 71, 70, 63, 72, 66, 63, 71, 68, 74, 63, 65, 70, 66, 71, 68, 64, 64, 70, 66, 76, 73, 71, 64, 69, 67, 62, 65, 69, 67, 62, 68, 65, 68, 63, 74, 72, 60, 69, 55, 63, 68, 62, 63, 65, 66, 64, 70, 65, 71, 62, 66, 68, 66, 68, 65, 64, 64, 64, 57, 74, 63, 62, 72, 68, 69, 61, 68, 73, 71, 60, 64, 66, 62, 64, 72, 68, 66, 67, 72, 71, 63, 62, 68, 64, 69, 72, 66, 65, 65, 60, 70, 66, 68, 62, 69, 66, 66, 75, 77, 70, 65, 65, 63, 68, 67, 66, 63, 65, 72, 64, 68, 68, 66, 61, 70, 72, 68, 64, 72, 67, 68, 66, 65, 73, 63, 69, 69, 69, 72, 63, 65, 70, 72, 70, 68, 71, 67, 68, 75, 66, 68, 61, 67, 68, 65, 68, 62, 60, 66, 70, 73, 65, 64, 67, 63, 65, 71, 63, 69, 68, 68, 67, 69, 63, 71, 70, 62, 62, 68, 68, 64, 72, 64, 63, 63, 64, 73, 67, 65, 62, 64, 64, 67, 63, 66, 74, 62, 64)

gender <- c("F", "F", "M", "F", "F", "M", "F", "F", "F", "F", "F", "M", "F", "F", "M", "F", "M", "M", "F", "F", "M", "F", "M", "F", "M", "M", "F", "F", "F", "F", "M", "M", "M", "F", "F", "F", "F", "M", "M", "F", "M", "F", "M", "F", "F", "F", "F", "F", "F", "F", "F", "F", "M", "F", "M", "F", "F", "F", "M", "F", "F", "F", "M", "F", "F", "M", "F", "M", "F", "M", "F", "F", "M", "M", "F", "F", "F", "F", "F", "M", "M", "F", "M", "F", "F", "F", "M", "F", "F", "F", "F", "M", "M", "F", "F", "M", "F", "M", "F", "F", "M", "M", "F", "F", "F", "F", "M", "F", "F", "F", "F", "F", "F", "M", "F", "M", "F", "M", "M", "F", "M", "F", "M", "F", "M", "F", "F", "F", "F", "F", "M", "F", "F", "F", "F", "F", "F", "M", "F", "M", "F", "F", "F", "F", "M", "M", "F", "F", "F", "F", "F", "M", "F", "F", "M", "M", "F", "F", "F", "M", "M", "M", "F", "M", "F", "M", "M", "F", "M", "F", "M", "F", "F", "M", "F", "F", "M", "F", "M", "M", "F", "F", "M", "F", "M", "F", "F", "M", "M", "F", "M", "M", "M", "F", "F", "M", "M", "M", "F", "M", "F", "F", "F", "M", "F", "M", "M", "M", "F", "M", "F", "M", "F", "M", "F", "F", "F", "M", "M", "F", "F", "M", "F", "M", "F", "F", "M", "F", "M", "M", "M", "F", "F", "F", "F", "F", "F", "F", "M", "F", "F", "F", "F", "F", "F", "F", "M", "M", "M", "F", "M", "F", "M", "F", "M", "F", "M", "F", "F", "F", "M", "F", "F", "F", "F", "M", "M", "F", "F", "F", "F", "F", "F", "F", "F", "F", "F", "F", "F", "F", "F", "F", "M", "F", "M", "F", "F", "F", "M", "F", "M", "F", "M", "F", "F", "F", "F", "F", "F", "F", "M", "F", "M", "F", "F", "F", "F", "M", "F", "F", "M", "F", "M", "M", "F", "M", "F", "F", "M", "F", "M", "F", "F", "M", "M", "M", "F", "F", "F", "M", "F", "M", "M", "M", "F", "M", "M", "F", "F", "F", "F", "F", "F", "F", "M", "F", "M", "M", "F", "M", "F", "F", "M", "M", "F", "F", "F", "F", "F", "F", "M", "F", "F", "M", "M", "F", "M", "F", "F", "F", "F", "M", "F", "F", "M", "M", "M", "F", "M", "M", "M", "F", "F", "F", "F", "F", "M", "F", "M", "F", "F", "M", "F", "F", "M", "F", "M", "M", "F", "F", "F", "F", "M", "F", "F", "F", "F", "F", "F", "M", "M", "F", "F", "F", "F", "M", "F", "F", "F", "M", "M", "F", "F", "M", "F", "F", "M", "M", "F", "F", "M", "F", "M", "F", "F", "M", "F", "M", "M", "F", "M", "F", "F", "M", "M", "M", "M", "M", "M", "M", "M", "F", "F", "F", "M", "M", "F", "F", "F", "F", "F", "M", "M", "F", "F", "F", "F", "F", "M", "F", "M", "F", "M", "F", "F", "F", "M", "M", "F", "F", "F", "F", "F", "M", "F", "F", "M", "F", "M", "F", "F", "F", "F", "F", "F", "F", "M", "M", "F", "F")

Recall that weight is measured in pounds and height is in inches. Calculate the BMI according to the formula BMI = 703×(Wlb/H2in) kg/m2 as in the previous problem.

People are classified as "underweight", "normal weight", "overweight" and "obese" if their BMI fall into the following ranges:

BMI < 18.5 kg/m2    underweight
18.5 kg/m2 ≤ BMI < 25 kg/m2    normal weight
25 kg/m2 ≤ BMI < 30 kg/m2    overweight
BMI ≥ 30 kg/m2    obese

a. Calculate the percentages of students in the sample who are underweight, normal weight, overweight and obese.
Consistency check: Make sure the percentages add up to 100%.
Sanity check: percentage in a category = (number of students in that category / total number × 100)% = (number of students in that category / 5)% since there are 500 students in the sample. Any integer divided by 5 can have at most 1 decimal point. So make sure all of your answers are numbers with no more than 1 decimal point.

Percentage of underweight students = %

Percentage of normal weight students = %

Percentage of overweight students = %

Percentage of obese students = %

 Tries 0/5

b. The gender variable contains the information of individual student's gender ("F" = female, "M" = male). Calculate the number of male and female students in the sample.
Consistency check: The two numbers should add up to 500, the total number of students in the sample.

Number of female students =

Number of male students =

 Tries 0/3

c. Calculate the mean and sample standard deviation of the BMI for the male and female students. Give your answers to 3 decimal places.

Female students: mean BMI = ,     sample sd of BMI = .

 Tries 0/3

Male students: mean BMI = ,     sample sd of BMI = .

 Tries 0/3

The average of BMI between male and female is not the same. To determine if the difference is statistically significant. We now perform a two-sample z-test. The test assumes the following null and alternative hypothesis:

H0: The mean BMI for the male and female students are the same. The observed difference is due to chance variation.
Ha: The mean BMI for the male and female students are not the same.

The two-sample z test computes the z-score assuming H0:

z = (observed difference) / SEdifference.

Here observed difference = mean of BMI for male students - mean of BMI for female students = BMIM - BMIF,

SEdifference = √SE2M + SE2F, where SEM is the standard error for BMIM and SEF is the standard error for BMIF. Since the sample is random, we have

SE2M = σ2M / nM and SE2F = σ2F / nF. Here nM is the number of male students and nF is the number of female students in the sample. Unlike many problems you've encountered in Stat 200, nM and nF are not the same in this problem. σ2M is the population variance of the BMI for male students, and σ2F is the population variance of the BMI for female students. We don't know the population variances, but we can use the sample variances as substitutes since we have a decent sample size.

To summarize, the test statistics z can be calculated using the formula

z = (BMIM - BMIF) / SEdifference   ,

SEdifference = √s2M/nM + s2F/nF  .

Here BMIM, BMIF, sM and sF are the means and sample standard deviations calculated in part (c), nM and nF are the number of male and female students calculated in part (b).

d. Enter the value of z to 2 decimal places.
Note: Be careful about the rounding issue. It's generally a good idea to store all of your calculations in variables and use the variables for further calculations. This way you are sure that your values are accurate within the machine roundoff error, which is about 16 significant figures for real numbers.

z =

 Tries 0/3

e. Calculate the p-value associated with z. Adopting the null cut-off α = 5%, what do you conclude?


 Tries 0/1

When the full data are used to do the analysis, the gender difference in BMI is highly significant (z = 5.68, p-value = 1.3×10-8). However, you are not using the full data in this problem. A simulation was performed where 500 samples were random drawn from the data and then a z-test was performed. The experiment was repeated 10,000 times to see how many times the z-test failed to reject the null. The result is that for a sample of 500, the type II error rate is about 5%. This means that there is 5% chance that you will fail to reject the null in your test. The type II error rate is much higher for a sample size of 200. That's why we don't use 200 in this problem.

The gender difference in BMI is also observed in a larger population, and the difference in general changes with ages (see, e.g., http://halls.md/bmi-difference-men-women/).